eMBMasterRegInputCB() function
Callback function used if the value of a Input Register is required by the protocol stack. The starting register address is given by \c usAddress and the last register is given by usAddress + usNRegs - 1.
Arguments
pucRegBuffer
A buffer where the callback function should write the current value of the modbus registers to.
usAddress
The starting address of the register. Input registers are in the range 1 - 65535.
usNRegs
Number of registers the callback function must supply.
Return value
The function must return one of the following error codes: - eMBErrorCode::MB_ENOERR If no error occurred. In this case a normal Modbus response is sent. - eMBErrorCode::MB_ENOREG if can not map the data of the registers - eMBErrorCode::MB_EILLSTATE if can not procceed with data transfer due to critical error - eMBErrorCode::MB_EINVAL if value data can not be transferred