Documentation updated

This commit is contained in:
2025-09-15 09:19:13 -05:00
parent ac20b82496
commit 5a0b02ccdf
41 changed files with 673 additions and 377 deletions

View File

@@ -23,6 +23,12 @@
#include <ModbusRTU.h> // Or your specific Modbus RTU library
#endif
/**
* @defgroup ModbusCategoryCodes Modbus Point Category Codes
* @brief Integer constants used in the `modbusMap` to identify the type of Modbus point.
* These codes determine which `ModbusPoint` subclass is created by the factory.
* @{
*/
const int COIL = 0; /**< @brief 0x: R/W Coil */
const int DI = 1; /**< @brief 1x: R Discrete Inputs */
const int IR = 3; /**< @brief 3x: R Input Register - Single word */
@@ -33,6 +39,7 @@ const int HR = 4; /**< @brief 4x: R/W Holding Register - Single word *
const int HR_10x = 41; /**< @brief 4x: R/W Holding Register - Single word, 10x scaled */
const int HR_LONG = 42; /**< @brief 4x: R/W Holding Register - Double word, Long type */
const int HR_FLOAT = 43; /**< @brief 4x: R/W Holding Register - Double word, Float encoding */
/** @} */
/**
* @struct modbusMap
@@ -47,10 +54,16 @@ struct modbusMap
};
/**
* @brief The main loop previous milliseconds.
* @brief Timestamp for managing the main application loop interval.
* Used in the main `.cpp` file to control the frequency of the `EquipmentInstance.update()` call.
*/
unsigned long previousMillis = 0;
/**
* @defgroup GlobalInstances Global Instances
* @brief Globally accessible objects for the Modbus server and Equipment.
* @{
*/
/**
* @brief Global Modbus object instance.
* The type is determined at compile time based on the USE_MODBUS_IP flag.
@@ -64,6 +77,6 @@ extern ModbusRTU mb; // Use ModbusRTU class
/** @brief An instance of the Equipment class, representing the emulated Equipment unit. */
Equipment<ModbusRTU> EquipmentInstance(&mb);
#endif
/** @} */
#endif // CORE_H