Photomechanics API
|
Messages transport for serial port. When connected via USB, turntables appear as COM ports. More...
Public Member Functions | |
SerialDataTransport (SerialPort serialPort, ILogger logger) | |
Construct messages transport using provided SerialPort. More... | |
ValueTask | DisposeAsync () |
ValueTask | Write (String data) |
Send string to turntable. More... | |
ValueTask | Write (String data) |
Send string to turntable. More... | |
Properties | |
ILogger | Logger [get] |
IObservable< Char > | CharReceived [get] |
Occurs when char is received from turntable. More... | |
String | ConnectionInfo [get] |
ITurntableApi.ConnectionInfo. More... | |
Properties inherited from IDataTransport | |
IObservable< Char > | CharReceived [get] |
Occurs when char is received from turntable. More... | |
String | ConnectionInfo [get] |
ITurntableApi.ConnectionInfo. More... | |
Messages transport for serial port. When connected via USB, turntables appear as COM ports.
It is recommended to have reasonable write timeout of underlying SerialPort. Otherwise, if COM port used is not Photomechanics turntable, API might hang on "write" operation instead of self-disposing. Read timeout of underlying COM port should be infinite.
SerialDataTransport.SerialDataTransport | ( | SerialPort | serialPort, |
ILogger | logger | ||
) |
Construct messages transport using provided SerialPort.
Ensure that provided SerialPort is compliant with requirements mentioned in SerialDataTransport description.
ValueTask SerialDataTransport.Write | ( | String | data | ) |
Send string to turntable.
Implements IDataTransport.
|
get |
Occurs when char is received from turntable.
Implements IDataTransport.
|
get |
Implements IDataTransport.