Photomechanics API
Photomechanics.Photo3DStudio.TurntableControl.Legacy.Mft.LegacyMftSerialMessagesTransport Class Reference

Messages transport for serial port. When connected via USB, turntables appear as COM ports. More...

Inheritance diagram for Photomechanics.Photo3DStudio.TurntableControl.Legacy.Mft.LegacyMftSerialMessagesTransport:
[legend]

Public Member Functions

 LegacyMftSerialMessagesTransport (SerialPort serialPort)
 Construct messages transport using provided serial port. More...
 
override String ToString ()
 
override void StartListening ()
 Start listening for messages. More...
 
override void SendCommand (String command)
 Send given command string. Command begin and end inserted automatically; More...
 
- Public Member Functions inherited from Photomechanics.Photo3DStudio.TurntableControl.Legacy.Mft.LegacyMftMessagesTransport
void Dispose ()
 

Public Attributes

override String ConnectionInfo => SerialPort.PortName
 

Protected Member Functions

override void Dispose (Boolean disposing)
 Standard Dispose pattern.
 
- Protected Member Functions inherited from Photomechanics.Photo3DStudio.TurntableControl.Legacy.Mft.LegacyMftMessagesTransport
void RaiseMessageReceived (String message)
 Raise MessageReceived. More...
 
void ThrowIfDisposed ()
 Throws exception if transport is disposed. More...
 

Properties

SerialPort SerialPort [get]
 
- Properties inherited from Photomechanics.Photo3DStudio.TurntableControl.Legacy.Mft.LegacyMftMessagesTransport
abstract String ConnectionInfo [get]
 ITurntableApi.ConnectionInfo. More...
 
Boolean IsDisposed [get]
 
- Properties inherited from Photomechanics.Photo3DStudio.Common.Interfaces.IDisposableExtended
Boolean IsDisposed [get]
 Determines whether the object is being disposed or already disposed and no longer functional. More...
 

Additional Inherited Members

- Static Public Attributes inherited from Photomechanics.Photo3DStudio.TurntableControl.Legacy.Mft.LegacyMftMessagesTransport
const Char CommandBegin = '#'
 PC-to-turntable command begin character. More...
 
const Char CommandEnd = '.'
 PC-to-turntable command end character. More...
 
- Events inherited from Photomechanics.Photo3DStudio.TurntableControl.Legacy.Mft.LegacyMftMessagesTransport
TypedEventHandler< LegacyMftMessagesTransport, String > MessageReceived
 Occurs when message is received. More...
 
TypedEventHandler< IDisposableExtendedDisposed
 Messages transport is disposing or disposed and no longer functional. More...
 
- Events inherited from Photomechanics.Photo3DStudio.Common.Interfaces.IDisposableExtended
TypedEventHandler< IDisposableExtendedDisposed
 Occurs when object is disposed. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ LegacyMftSerialMessagesTransport()

Photomechanics.Photo3DStudio.TurntableControl.Legacy.Mft.LegacyMftSerialMessagesTransport.LegacyMftSerialMessagesTransport ( SerialPort  serialPort)

Construct messages transport using provided serial port.

Ensure that provided SerialPort is compliant with requirements mentioned in LegacyMftSerialMessagesTransport description.

Member Function Documentation

◆ StartListening()

override void Photomechanics.Photo3DStudio.TurntableControl.Legacy.Mft.LegacyMftSerialMessagesTransport.StartListening ( )
virtual

◆ SendCommand()

override void Photomechanics.Photo3DStudio.TurntableControl.Legacy.Mft.LegacyMftSerialMessagesTransport.SendCommand ( String  command)
virtual

Send given command string. Command begin and end inserted automatically;

Implements Photomechanics.Photo3DStudio.TurntableControl.Legacy.Mft.LegacyMftMessagesTransport.