eMBMasterTCPInit() function
Initialize the Modbus Master protocol stack for Modbus TCP. This function initializes the Modbus TCP Module. Please note that frame processing is still disabled until eMBEnable( ) is called.
Arguments
usTCPPort
The TCP port to listen on.
Return value
If the protocol stack has been initialized correctly the function returns eMBErrorCode::MB_ENOERR. Otherwise one of the following error codes is returned: - eMBErrorCode::MB_EINVAL If the slave address was not valid. Valid slave addresses are in the range 1 - 247. - eMBErrorCode::MB_EPORTERR IF the porting layer returned an error.