Modbus RTU class for slave devices. It shares data with other software components via a Message queue object, and can exist more than one Modbus Slave RTU instances in a application program.

Dependents:   Nucleo_modbus_protocol_test

Revision:
5:7cec6597adee
Parent:
4:9751b0a81ded
Child:
6:0143a57e0c8e
--- a/ModbusSlaveRTU.h	Mon Jan 19 08:21:11 2015 +0000
+++ b/ModbusSlaveRTU.h	Mon Jan 19 15:20:47 2015 +0000
@@ -46,12 +46,12 @@
 private:    
     /*! Modbus response message bytes indexes. */
     enum MbByteIndex_t {
-        ADDRESS         = 0, /**< Modbus address position.*/
-        FUNCTION        = 1, /**< Modbus function position.*/
-        BYTE_COUNT      = 2, /**< Byte count high byte position.*/
-        DATA_START      = 3, /**< Returned data start position.*/
-        BYTE_OFFSET     = 2, /**< Starting register in bytes, high byte position.*/
-        REGISTER_COUNT  = 4  /**< Number of registers to be read, high byte position.*/
+        ADDRESS         = 0x00, /**< Modbus address position.*/
+        FUNCTION        = 0x01, /**< Modbus function position.*/
+        BYTE_COUNT      = 0x02, /**< Byte count high byte position.*/
+        DATA_START      = 0x03, /**< Returned data start position.*/
+        BYTE_OFFSET     = 0x02, /**< Starting register in bytes, high byte position.*/
+        REGISTER_COUNT  = 0x04  /**< Number of registers to be read, high byte position.*/
     };
 
     /*! Modbus errors reported during message processing. */