int CSeaMaxW32::Open ( char *  filename)

Opens the specified resource.

Deprecated:
Version 2.x
Parameters
[in]filename
Return values
0Success.
-38The length of the filename is greater than 256 characters.
-22The specified protocol is invalid, or, the module could not be contacted.
-9The specified location is invalid.

Opens the specified resource. The filename parameter can be one of two different types, Modbus RTU or Modbus TCP.

To specifiy a Modbus RTU connection (used for all non-Ethernet enabled modules) the string "sealevel_rtu://COMx" should be used, where x is a valid COM port number.

To specify a Modbus TCP connection (used only for Ethernet enabled modules) the string "sealevel_tcp://x.x.x.x" should be used, where x's represent the valid IP address of the module to be addressed.

References SM_Open().

 
 
Generated on Mon Nov 26 2018.