microspeclib.expert module

class microspeclib.expert.MicroSpecExpertInterface(serial_number=None, device=None, timeout=2.0, retry_timeout=0.001, emulation=False, *args, **kwargs)
flush(timeout=0.1)

Tell hardware to finish sending any remaining commands and flush it’s communication line, then flush the local queue and throw away all waiting replies. This does not send a Reset command.

receiveReply()

Receive one command result command sent. If multiple were sent, receive the next one in FIFO order, if available. A failure to retrieve it does not remove it from the queue, but a reply that contains a failed status does.

Returns

sendAndReceive(command)

Send one command to the sensor, and receive one command result command sent. If multiple were sent, receive the next one in FIFO order, if available. This does NOT mean that the reply will match the command, if you already sent a command that you had not received yet. A failure to retrieve it does not remove it from the queue, but a reply that contains a failed status does.

Parameters

command (CommandObject) – Create one of these objects and pass it as an argument

Returns

sendCommand(command)

Send one command to the sensor, do not wait for a response. You may stack these, and they will return in FIFO order later.

Parameters

command (CommandObject) – Create one of these objects and pass it as an argument

Returns

Return type

None