◆ SeaMaxLinGetCommHandle()

HANDLE SeaMaxLinGetCommHandle ( SeaMaxLin SeaMaxPointer)

Get the handle to the actual communication medium. For RTU types it will be a normal file pointer, but TCP will be a socket handle. For this reason, it was decided to only return RTU file pointers. An attempt to get the socket handle will return an ENODEV error.

Parameters
[in]*SeaMaxPointerPointer to a previously opened seaMaxModule
Returns
int Error code.
Return values
>0Pointer to communications termios struct.
-EBADFNo open module.
-ENODEVThis is not an RTU type connection.

References MODBUS_RTU.

Referenced by CSeaMaxLin::getCommHandle().

 
 
Generated on Tue Sep 19 2017.