Photomechanics API
Photomechanics.Photo3DStudio.TurntableControl.Mft.MftSerialMessagesTransport Class Reference

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

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

Public Member Functions

 MftSerialMessagesTransport (SerialPort serialPort)
 Construct messages transport using provided SerialPort. More...
 
override String ToString ()
 
- Public Member Functions inherited from Photomechanics.Photo3DStudio.TurntableControl.Mft.MftMessagesTransport
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.Mft.MftMessagesTransport
void RaiseCharacterOutsideOfMessageReceived (Char ch)
 Raise CharacterOutsideOfMessageReceived. More...
 
void RaiseMessageReceived (String message)
 Raise MessageReceived. More...
 
void ThrowIfDisposed ()
 Throws exception if transport is disposed. More...
 

Properties

SerialPort SerialPort [get]
 Underlying serial port. More...
 
- Properties inherited from Photomechanics.Photo3DStudio.TurntableControl.Mft.MftMessagesTransport
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.Mft.MftMessagesTransport
const Char CommandBegin = '#'
 PC-to-turntable command begin character. More...
 
const Char CommandEnd = '.'
 PC-to-turntable command end character. More...
 
const Char MessageBegin = '['
 Turntable-to-PC message begin character. More...
 
const Char MessageEnd = ']'
 Turntable-to-PC message end character. More...
 
- Events inherited from Photomechanics.Photo3DStudio.TurntableControl.Mft.MftMessagesTransport
TypedEventHandler< MftMessagesTransport, Char > CharacterOutsideOfMessageReceived
 Occurs when received character that is not inside message (not preceded by message begin character). More...
 
TypedEventHandler< MftMessagesTransport, 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

◆ MftSerialMessagesTransport()

Photomechanics.Photo3DStudio.TurntableControl.Mft.MftSerialMessagesTransport.MftSerialMessagesTransport ( SerialPort  serialPort)

Construct messages transport using provided SerialPort.

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

Property Documentation

◆ SerialPort

SerialPort Photomechanics.Photo3DStudio.TurntableControl.Mft.MftSerialMessagesTransport.SerialPort
get

Underlying serial port.