|
Lydia - Printhead
|
#include <Bridge.h>
Public Member Functions | |
| Bridge (Component *_owner) | |
| short | debug () |
| Virtual function to debug the component. | |
| SComponentInfo * | hasMethod (ushort id, String method) |
| short | list () |
| virtual short | onMessage (int id, E_CALLS verb, E_MessageFlags flags, const void *user, Component *src) |
| Handles incoming messages. | |
| SComponentInfo * | registerMemberFunction (ushort id, Component *clazz, char *method, ComponentFnPtr ptr) |
| short | setup () |
| Virtual function to set up the component. | |
Public Member Functions inherited from Component | |
| void | clearFlag (byte flag) |
| Clears a specific flag for the component. | |
| Component () | |
| Default constructor for the Component class. | |
| Component (String _name) | |
| Constructor for the Component class with a specified name. | |
| Component (String _name, short _id) | |
| Constructor for the Component class with a specified name and ID. | |
| Component (String _name, short _id, int _flags) | |
| Constructor for the Component class with a specified name, ID, and flags. | |
| Component (String _name, short _id, int _flags, Component *_owner) | |
| Constructor for the Component class with a specified name, ID, flags, and owner. | |
| virtual short | debug (short val0, short val1) |
| Virtual function to debug the component. | |
| virtual short | destroy () |
| Virtual function to destroy the component. | |
| void | disable () |
| Disables the component. | |
| void | enable () |
| Enables the component. | |
| bool | enabled () |
| Checks if the component is enabled. | |
| bool | hasFlag (byte flag) |
| Checks if the component has a specific flag. | |
| virtual short | info () |
| Virtual function to display information about the component. | |
| virtual short | info (short val0, short val1) |
| Virtual function to display information about the component. | |
| virtual short | loop () |
| Virtual function to run the component in a loop. | |
| virtual short | onError (short id, short error) |
| virtual short | onRawResponse (short size, uint8_t rxBuffer[]) |
| virtual short | onRegisterMethods (Bridge *bridge) |
| virtual short | onResponse (short error) |
| void | setFlag (byte flag) |
| Sets a specific flag for the component. | |
| ~Component () | |
| Destructor for the Component class. | |
Public Member Functions inherited from ModbusGateway | |
| short | getAddress () |
| MB_FC | getFunctionCode () |
| short | getNumberAddresses () |
| virtual String | getRegisterDescription (short flags=0) |
| const char * | getRegisterMode () |
| ModbusGateway () | |
| ModbusGateway (short _addr) | |
| ModbusGateway (short _addr, short _fc) | |
| void | setAddress (short _addr) |
| void | setFunctionCode (MB_FC fc) |
| void | setGateway (Mudbus *mudbus) |
| void | setNumberAddresses (short _nbAddr) |
| void | setRegisterMode (MB_REGISTER_MODE mode) |
Static Public Attributes | |
| static constexpr char * | METHOD_DELIMITER = C_STR(":") |
Static Public Attributes inherited from Component | |
| static const int | COMPONENT_DEFAULT = 1 << OBJECT_RUN_FLAGS::E_OF_LOOP | 1 << OBJECT_RUN_FLAGS::E_OF_SETUP |
| The default run flags for a component. | |
| static const int | COMPONENT_NO_ID = 0 |
| The default ID for a component. | |
Additional Inherited Members | |
Public Attributes inherited from Component | |
| int | flags |
| The run flags for the component. | |
| const short | id |
| The ID of the component. | |
| millis_t | last |
| The last tick time in milliseconds. | |
| String | name |
| The name of the component. | |
| int | nFlags |
| The network capabilities of the component. | |
| millis_t | now |
| The current time in milliseconds. | |
| Component * | owner |
| The owner of the component. | |
Public Attributes inherited from ModbusGateway | |
| short | addr |
| MB_FC | fn |
| uchar | lastMQSlot |
| Mudbus * | mudbus |
| short | nbAddr |
| short | registerMode |
| Bridge::Bridge | ( | Component * | _owner | ) |
Definition at line 19 of file Bridge.cpp.
|
virtual |
Virtual function to debug the component.
| stream | The stream to output the debug information to. |
Reimplemented from Component.
Definition at line 41 of file Bridge.cpp.
| SComponentInfo * Bridge::hasMethod | ( | ushort | id, |
| String | method ) |
Definition at line 28 of file Bridge.cpp.
| short Bridge::list | ( | ) |
Definition at line 45 of file Bridge.cpp.
|
virtual |
Handles incoming messages.
This function is called when a message is received by the component. It processes the message and returns a short value indicating the status of the operation.
| id | The ID of the message. |
| verb | The type of operation to be performed. |
| flags | The flags associated with the message. |
| user | A pointer to user-defined data. |
| src | The source component that sent the message. |
Reimplemented from Component.
Definition at line 111 of file Bridge.cpp.
| SComponentInfo * Bridge::registerMemberFunction | ( | ushort | id, |
| Component * | clazz, | ||
| char * | method, | ||
| ComponentFnPtr | ptr ) |
Definition at line 56 of file Bridge.cpp.
|
virtual |
Virtual function to set up the component.
Reimplemented from Component.
Definition at line 22 of file Bridge.cpp.