ooxcb.types¶
-
ooxcb.types.build_list(conn, stream, list_, type)¶ writes a list_ of objects of the elementar data type type (where type is a
struct-compatible type char) to stream.For each item, this checks if the item is a
ooxcb.protobj.Protobj. If it is, the object’s build method is called.
-
ooxcb.types.make_array(data, typecode)¶ return a packed representation of the data data.
Parameters: - data: list or str or unicode
should be a list of numeric values, each item suitable for the given typecode. If it’s a str or unicode instance, each char is converted to its ordinal value and then packed. Any element’s get_internal method will be called if present.
- typecode: str
- one of:
- ‘b’, 8 bit signed
- ‘B’, 8 bit unsigned
- ‘h’, 16 bit signed,
- ‘H’, 16 bit unsigned
- ‘i’, 32 bit signed
- ‘I’, 32 bit unsigned
- ‘f’, float
- ‘d’, double
Returns: a string
-
ooxcb.types.make_void_array(data, format)¶ Return a packed representation of the data data. The only difference to make_array is that you pass the count of bytes per value to make_void_array, and all values are treated as unsigned.
Parameters: format – the count of bits to pack per value, one of 8, 16, 32.