int CSeaMaxW32::Ioctl ( slave_address_t  slave_id,
IOCTL_t  which,
void *  data 
)

Multi-function tool to configure and access non-standard Modbus features of the SeaI/O module.

Deprecated:
Version 2.x
Parameters
[in]slave_idSlave ID of the module
[in]whichIOCTL function to perform
[in,out]dataAppropriate data structure (depending on IOCTL function)
Return values
>=0Success.
-22A null pointer has been supplied where a pointer to a data buffer was expected.
(*)Also valid are return values for CSeaMaxW32::Read() and CSeaMaxW32::Write().

Ioctl has been provided as a multi-function tool to configure and access non-standard Modbus features of the SeaI/O module.

The actual Modbus transaction is specified by the 'which' argument. Ioctl can be used to set module parameters, configure state, and access data. Consult the provided example source for model specific information.

The final parameter, data, is a pointer to a datatype which is appropriate for the particular IOCTL call.

Note
The following are deviations from SeaMAX v2:
  • An invalid IOCTL will return -1.
  • For IOCTL_READ_COMM_PARAM, the ioctl_struct will not be populated with a magic cookie value.

References SM_GetADDAConfig(), SM_GetADDAExtendedConfig(), SM_GetDeviceConfig(), SM_GetPIODirection(), SM_SelectDevice(), SM_SetADDAConfig(), SM_SetCommunications(), SM_SetPIODirection(), and SM_SetSoftwareAddress().

 
 
Generated on Mon Nov 26 2018.