Add Gateway Modbus component with configuration and bridge implementation
- Created CMakeLists.txt for the Gateway Modbus component. - Added header file `gateway_modbus.hpp` defining configuration structures, enums, and point structures. - Implemented the `gateway_modbus.cpp` source file containing the logic for managing Modbus points, including reading and writing operations. - Introduced utility functions for converting configurations to and from DaliValue, and for handling Modbus space and access types. - Established a bridge class to manage Modbus points and their interactions with the DaliBridgeEngine. Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
namespace gateway {
|
||||
|
||||
class DaliDomainService;
|
||||
class GatewayCache;
|
||||
|
||||
struct GatewayBridgeServiceConfig {
|
||||
bool bridge_enabled{true};
|
||||
@@ -35,6 +36,7 @@ struct GatewayBridgeHttpResponse {
|
||||
class GatewayBridgeService {
|
||||
public:
|
||||
GatewayBridgeService(DaliDomainService& dali_domain,
|
||||
GatewayCache& cache,
|
||||
GatewayBridgeServiceConfig config = {});
|
||||
~GatewayBridgeService();
|
||||
|
||||
@@ -52,6 +54,7 @@ class GatewayBridgeService {
|
||||
const ChannelRuntime* findRuntime(uint8_t gateway_id) const;
|
||||
|
||||
DaliDomainService& dali_domain_;
|
||||
GatewayCache& cache_;
|
||||
GatewayBridgeServiceConfig config_;
|
||||
std::vector<std::unique_ptr<ChannelRuntime>> runtimes_;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user