Download Control Microsystems SCADAPack2 C/C++ Tools

Transcript
mTcpSetInterface
Set Modbus IP Interface Settings
Syntax
#include <ctools.h>
BOOLEAN mTcpSetInterface( COM_INTERFACE ifType, MTCP_IF_SETTINGS *
pSettings );
Description
The mTcpSetInterface function is used to set the interface settings used by the Modbus
IP protocols. If the selected interface or the settings are invalid, FALSE is returned;
otherwise TRUE is returned and the settings are set for the specified interface.
The valid value for ifType is CIF_Ethernet1. The enumeration type COM_INTERFACE
and the structure MTCP_IF_SETTINGS are described in the Structures and Types
section.
To save these settings with the controller settings in flash memory so that they are
loaded on controller reset, call flashSettingsSave as shown below.
request_resource(FLASH_MEMORY);
flashSettingsSave(CS_RUN);
release_resource(FLASH_MEMORY);
2
SCADAPack C++ Tools User Manual
328