◆ SeaMaxLinRead()

int SeaMaxLinRead ( SeaMaxLin SeaMaxPointer,
slave_address_t  slaveId,
seaio_type_t  type,
address_loc_t  starting_address,
address_range_t  range,
void *  data 
)

Read from a module. This is a multifunction read that can read from a module previously opened. Any SeaIO devices attached to that module can then be read from in one of the following ways.

Parameters
[in]*SeaMaxPointerPointer to an open seaMaxModule.
[in]slaveIdAddress of the device you wish to read.
[in]typeThe read type to preform.
[in]starting_addressWhere to start the read; MODBUS is base 1.
[in]rangeHow many consecutive addresses to read.
[out]*dataPointer to data storage buffer.
Returns
int Error code.
Return values
>0Number of bytes of data in the buffer.
-EBADFNo module open or write error.
-EINVALNull buffer or too much data in buffer.
-ENOMEMLow memory.
-ENODEVDidn't receive response.
-EFAULTMODBUS exception. First byte of buffer contains exception.

References NO_CONNECT.

Referenced by CSeaMaxLin::Read().

 
 
Generated on Tue Sep 19 2017.