Library Features
2025-01-10
- ⚡ Non-blocking: Uses library ticks to prevent blocking.
- 🪶 Thread-free: A single tick drives the entire master-slave chain, allowing for periodic execution of ticks in any manner.
- 🌠 No interrupt usage: Free port binding allows for arbitrary management of data flow.
- 💪 Multi-master and multi-slave: Any master or slave is an independent object, allowing for the activation of any number of masters and slaves in the program.
- 🗽 Arbitrary mapping of register address tables to memory addresses: A key feature of this library, solving the mapping relationship between Modbus virtual addresses and actual variables, making development simpler and more flexible. The entire library usage revolves around this mapping table, and future maintenance will only require updates to the mapping table.
- ⚖️ Different address mapping lookup times should not exceed 500 clock cycles: It is difficult to claim this has been fully achieved. Since Modbus has a maximum of 0xFFFF virtual addresses, a binary search method is used, but this is still not flexible enough. A better table lookup structure will be sought in the future (perhaps). This is a challenge for library upgrades; if you have any solutions, please contact me. Thank you very much! 😘
- 🏃♀️ Restrained event callbacks: A minimal number of callback mechanisms. Stack polling is used as much as possible to minimize the impact on system timing.