◆ SeaMaxLinWrite()

int SeaMaxLinWrite ( SeaMaxLin SeaMaxPointer,
slave_address_t  slaveId,
seaio_type_t  type,
address_loc_t  starting_address,
address_range_t  range,
unsigned char *  data 
)

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

Parameters
[in]*SeaMaxPointerPointer to an open seaMaxModule.
[in]slaveIdAddress of the device you wish to write.
[in]typeThe write type to preform.
[in]starting_addressWhere to start the write; MODBUS is base 1.
[in]rangeHow many consecutive addresses to write.
[in]*dataPointer to data 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::Write().

 
 
Generated on Tue Sep 19 2017.