|
SMACC2
|
SMACC2 Client for controlling Modbus TCP relays. More...
#include <cl_modbus_tcp_relay.hpp>


Public Member Functions | |
| ClModbusTcpRelay () | |
| virtual | ~ClModbusTcpRelay () |
| void | onInitialize () override |
| template<typename TOrthogonal , typename TSourceObject > | |
| void | onStateOrthogonalAllocation () |
| CpModbusConnection * | getConnectionComponent () |
| CpModbusRelay * | getRelayComponent () |
Public Member Functions inherited from smacc2::ISmaccClient | |
| ISmaccClient () | |
| virtual | ~ISmaccClient () |
| virtual std::string | getName () const |
| template<typename TComponent > | |
| TComponent * | getComponent () |
| template<typename TComponent > | |
| TComponent * | getComponent (std::string name) |
| template<typename TComponent > | |
| TComponent * | getComponent (int index) |
| virtual smacc2::introspection::TypeInfo::Ptr | getType () |
| ISmaccStateMachine * | getStateMachine () |
| template<typename TSmaccSignal , typename T > | |
| void | connectSignal (TSmaccSignal &signal, void(T::*callback)(), T *object) |
| template<typename SmaccClientType > | |
| void | requiresClient (SmaccClientType *&storage) |
| void | getComponents (std::vector< std::shared_ptr< ISmaccComponent > > &components) |
| const std::vector< std::shared_ptr< ISmaccComponent > > & | iterateComponents () const |
| template<typename EventType > | |
| void | postEvent (const EventType &ev) |
| template<typename EventType > | |
| void | postEvent () |
Private Attributes | |
| CpModbusConnection * | connectionComponent_ = nullptr |
| CpModbusRelay * | relayComponent_ = nullptr |
Additional Inherited Members | |
Protected Member Functions inherited from smacc2::ISmaccClient | |
| template<typename TOrthogonal , typename TClient > | |
| void | onComponentInitialization () |
| template<typename TOrthogonal , typename TSourceObject > | |
| void | onStateOrthogonalAllocation () |
| template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs> | |
| SmaccComponentType * | createComponent (TArgs... targs) |
| template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs> | |
| SmaccComponentType * | createNamedComponent (std::string name, TArgs... targs) |
| rclcpp::Node::SharedPtr | getNode () |
| rclcpp::Logger | getLogger () |
Protected Attributes inherited from smacc2::ISmaccClient | |
| std::map< ComponentKey, std::shared_ptr< smacc2::ISmaccComponent > > | components_ |
SMACC2 Client for controlling Modbus TCP relays.
This client manages connection and control of Modbus TCP relay devices, specifically designed for 8-channel relays like the Waveshare POE ETH Relay.
Configuration is loaded from YAML parameters: modbus_relay.ip_address: IP address of the relay (default: "192.168.1.254") modbus_relay.port: Modbus TCP port (default: 502) modbus_relay.slave_id: Modbus slave ID (default: 1) modbus_relay.heartbeat_interval_ms: Heartbeat check interval (default: 1000) modbus_relay.connect_on_init: Connect automatically on init (default: true)
Definition at line 64 of file cl_modbus_tcp_relay.hpp.
| cl_modbus_tcp_relay::ClModbusTcpRelay::ClModbusTcpRelay | ( | ) |
Definition at line 26 of file cl_modbus_tcp_relay.cpp.
|
virtual |
Definition at line 28 of file cl_modbus_tcp_relay.cpp.
|
inline |
Definition at line 96 of file cl_modbus_tcp_relay.hpp.
References connectionComponent_.
|
inline |
Definition at line 99 of file cl_modbus_tcp_relay.hpp.
References relayComponent_.
|
overridevirtual |
Reimplemented from smacc2::ISmaccClient.
Definition at line 30 of file cl_modbus_tcp_relay.cpp.
References smacc2::ISmaccClient::getLogger().

|
inline |
Definition at line 74 of file cl_modbus_tcp_relay.hpp.
References connectionComponent_, smacc2::ISmaccClient::createComponent(), onStateOrthogonalAllocation(), and relayComponent_.
Referenced by onStateOrthogonalAllocation().


|
private |
Definition at line 102 of file cl_modbus_tcp_relay.hpp.
Referenced by getConnectionComponent(), and onStateOrthogonalAllocation().
|
private |
Definition at line 103 of file cl_modbus_tcp_relay.hpp.
Referenced by getRelayComponent(), and onStateOrthogonalAllocation().