eMBSetSlaveID() function
Configure the slave id of the device. This function should be called when the Modbus function Report Slave ID is enabled ( By defining MB_FUNC_OTHER_REP_SLAVEID_ENABLED in mbconfig.h ).
Arguments
ucSlaveID
Values is returned in the Slave ID byte of the Report Slave ID response.
xIsRunning
If TRUE the Run Indicator Status byte is set to 0xFF. otherwise the Run Indicator Status is 0x00.
pucAdditional
Values which should be returned in the Additional bytes of the Report Slave ID response.
usAdditionalLen
Length of the buffer pucAdditonal.
Return value
If the static buffer defined by MB_FUNC_OTHER_REP_SLAVEID_BUF in mbconfig.h is to small it returns eMBErrorCode::MB_ENORES. Otherwise it returns eMBErrorCode::MB_ENOERR.