Readme files updates

This commit is contained in:
Emmanuel HC
2025-09-21 17:58:42 -05:00
parent 6dffd66af2
commit a60b0cb3ed
24 changed files with 454 additions and 597 deletions

View File

@@ -14,8 +14,6 @@ In industrial automation, a machine has different operating modes: **Standby**,
The **State Pattern** organizes the code to mirror these real-world machine modes.
* **Analogy:** Think of a PLC program. Instead of having one massive ladder logic routine with dozens of branches checking `IF machine_is_running THEN... ELSE IF machine_is_in_standby THEN...`, you create separate routines for each mode.
* **How it works here:**
* The `Equipment` class is our main "machine".
* We have separate classes for each state: `State_Standby`, `State_Running`, `State_Fail`.
@@ -95,6 +93,9 @@ The **Decorator Pattern** lets us "wrap" a basic Modbus point to add this extra
## How to Modify or Extend the Emulator
### Use Equipment library
Look for the equipment type you want to use in the `src` folder, equipments are organized in BMS or EPMS type, there are subfolders for specify types.
1. **To add or change a Modbus point:**
* Open `config.h`.
* Set Wifi parameters to communicate to the network.
@@ -110,4 +111,22 @@ The **Decorator Pattern** lets us "wrap" a basic Modbus point to add this extra
* Implement the logic for that mode, including adding strategies for how points should behave.
* Update the state-switching logic (e.g., in `State_Running.cpp` or `State_Standby.cpp`) to allow transitioning into your new `CleaningState`.
### Create a new Equipment type
1. **Copy the base**
* Copy one of the base folders in `src`, depending on the communication you need RTU or TCP, both configurations works with Firebeetle 2 ESP32.
2. **Save it into the correct folder**
* Save that folder into the correct type location.
* Use a standar name, using this stucture
Type_Manufacturer_Series_Protocol
Example:
VFD_ABB_ACH580_RTU
3. **Modify `platformio.ini` file**
* Copy a base configuration depending it's RTU or TCP
* Paste it within the same file
* Change the name of the configuration, preferrably using the same folder name
* Add the folder to the configuration +<`folder_name'>
---