 |
Lydia - Printhead
|
Go to the documentation of this file.
5 #ifndef MODBUS_BRIDGE_H
6 #define MODBUS_BRIDGE_H
47 for (
int i = 0; i < spaces; i++)
57 Serial.print(
"SLAVE: ");
59 Serial.print(
" \t | Address: ");
62 Serial.print(
" \t | VALUE: ");
64 Serial.print(
" \t | STATE ");
67 Serial.print(
"Done ");
71 Serial.print(
"Processsing");
75 Serial.print(
"Queued ");
77 Serial.print(
" \t | FN: ");
79 Serial.print(
" \t | PRIO: ");
83 Serial.print(
" \t | OWNER: ");
86 Serial.print(
" \t | DT: ");
87 Serial.print(millis() -
ts);
117 ModbusBridge(App *owner) : Component(
"ModbusBridge", 1000, Component::COMPONENT_DEFAULT, (Component *)owner),
121 setFlag(OBJECT_RUN_FLAGS::E_OF_DEBUG);
150 short query(
int slave,
short function,
long start,
int coils, Component *_owner, ComponentFnPtr _responseFn);
151 short query(
int slave,
short function,
long start,
int coils,
int _ownerId);
176 Query *
nextSame(uchar state,
short slave,
int addr,
short fn,
int value);
177 bool skipRead(
int slave,
int fn,
int addr,
int num,
int prio);
178 int numSame(uchar state,
short slave,
int addr,
short fn,
int value);
179 int numSameOwner(uchar state,
short slave,
int addr,
short fn,
int value,
int owner);
bool skipRead(int slave, int fn, int addr, int num, int prio)
void printNumber(int number)
Query * nextByPrio(uchar state, int prio)
int numByState(int state=DONE)
short query(int slave, short function, long start, int coils, Component *_owner, ComponentFnPtr _responseFn)
uint16_t ModbusSlaveRegisters[8]
Query queries[MAX_QUERY_BUFFER]
Query * nextSame(uchar state, short slave, int addr, short fn, int value)
Query * nextQueryByState(uchar state=DONE, int owner=-1)
void setDebugSend(bool debug)
int numSameOwner(uchar state, short slave, int addr, short fn, int value, int owner)
int numSame(uchar state, short slave, int addr, short fn, int value)
Query * nextQueryByState2(uchar state, int owner)
Query * nextQueryByOwner(uchar state=DONE, int owner=-1)
ComponentFnPtr responseFn
Arduino class library for communicating with Modbus devices over USB/RS232/485 (via RTU protocol).