Enumerations

class quanser.communications.enumerations.BooleanProperty

Used to get or set boolean properties of the stream.

IS_EXCLUSIVE = 2

Gain exclusive access to the stream. e.g. used with I2C to combine messages by sending/receiving without releasing the bus.

IS_READ_ONLY = 0

Stream cannot be written but is read-only e.g. “myfile.txt?mode=r”. Used by persistent streams.

IS_WRITE_ONLY = 1

Stream cannot be read but is write-only e.g. “myfile.txt?mode=w”. Used by persistent streams.

NO_READ_AHEAD = 3

Do not read ahead on receives i.e. do not attempt to fill receive buffer. Only read requested number of bytes.

SERIAL_CTS = 7

Used to get the clear-to-send (CTS) signal of serial ports.

SERIAL_DSR = 6

Used to get the data-set-ready (DSR) signal of serial ports.

SERIAL_DTR = 4

Used to set or clear the data-terminal-ready (DTR) signal of serial ports.

SERIAL_RTS = 5

Used to set or clear the ready-to-send (RTS) signal of serial ports.

class quanser.communications.enumerations.ByteOrder

Used to get or set the byte order of the stream.

BIG_ENDIAN = 2

Stream uses big-endian (Motorola) byte order.

LITTLE_ENDIAN = 1

Stream uses little-endian (Intel) byte order.

NATIVE_ENDIAN = 0

Stream uses the native byte order.

class quanser.communications.enumerations.PollFlag

A bit mask indicating the conditions for which to check during a poll.

ACCEPT = 4

Not valid on a client stream. On a listening stream, check whether there is a pending client connection.

CONNECT = 8

Not valid on a listening stream. On a client stream, check whether the connection has completed.

FLUSH = 128

Not valid on a listening stream. On a client stream, check whether it is possible to flush any more data without blocking.

RECEIVE = 1

On a listening stream, check for connections pending from clients. On a client stream, check whether there is any data available to receive.

SEND = 2

Not valid on a listening stream. On a client stream, check whether there is space in the stream buffer to store any data.

class quanser.communications.enumerations.QBDataType

Defines the data types in a Quanser Binary.

BIT = 15

Bit type (binary value).

CELL = 14

Cell type.

CUSTOM = 16

Custom data type.

DOUBLE = 9

Double-precision floating-point type.

INT16 = 2

Signed 16-bit integer type.

INT32 = 4

Signed 32-bit integer type.

INT64 = 6

Signed 64-bit integer type.

INT8 = 0

Signed 8-bit integer type.

SINGLE = 8

Single-precision floating-point type.

STRUCTURE = 13

Structure type.

UINT16 = 3

Unsigned 16-bit integer type.

UINT32 = 5

Unsigned 32-bit integer type.

UINT64 = 7

Unsigned 64-bit integer type.

UINT8 = 1

Unsigned 8-bit integer type.

UTF16 = 11

Unicode UTF-16 string type.

UTF32 = 12

Unicode UTF-32 string type.

UTF8 = 10

Unicode UTF-8 string type.

class quanser.communications.enumerations.QBPredefinedTag

Defines predefined tags in a Quanser Binary.

CHECKSUM = 5

Introduces a checksum - followed by number of prior bytes (t_uint32) and checksum value (t_uint32).

DEFINITIONS = 0

Introduces a signal definition table.

END = 6

Introduces the end of the data (for streams that include a finite Quanser binary within other data).

NUM_PREDEFINED = 7

The number of predefined tags.

REPEAT = 3

Introduces a repeat (t_uint32) - repeats the last periodic signal value the given number of times.

SEQUENCE = 4

Introduces a sequence number (t_uint32) - used with unreliable protocols like UDP to detect lost datagrams.

SIZE_OF_TAG = 1

Introduces the number of bytes (t_uint8) in a tag (default is 1).

TIMESTAMP_WRAP = 2

Introduces a timestamp wrap (t_uint32) - number of times the timebase has wrapped for an asynchronous signal that has not changed in a long time.

class quanser.communications.enumerations.QBSignalFlag

A bit mask indicating special characteristics of a signal.

BIG_ENDIAN = 4

Signal is big-endian.

COMPLEX = 1

Signal is complex.

LITTLE_ENDIAN = 0

Signal is little-endian.

REAL = 0

Signal is real.

VARIABLE = 2

Signal is variable size.

class quanser.communications.enumerations.QBSignalType

Defines the signal types in a Quanser Binary.

ASYNCHRONOUS = 2

Signal which requires a timestamp for each sample (event-driven signals).

FRAGMENT = 4

Defines a tag that allows large samples to be split, potentially interleaved with other signals.

GROUP = 3

Defines a tag that groups signals together to reduce overhead when they can be written at the same time.

PERIODIC = 1

Periodic signal whose timestamp is implicit.

TIME = 0

A timebase or timestamp.