#include <ModbusBridge.h>
|
void | clearQueue () |
|
short | debug () |
|
Mudbus * | getMudbus () |
|
short | info () |
|
short | loop () |
|
short | loop_test () |
|
short | loopPoll () |
|
Modbus * | modbus () |
|
| ModbusBridge (App *owner) |
|
Query * | nextByPrio (uchar state, int prio) |
|
Query * | nextQueryByOwner (uchar state=DONE, int owner=-1) |
|
Query * | nextQueryByState (uchar state=DONE, int owner=-1) |
|
Query * | nextQueryByState2 (uchar state, int owner) |
|
Query * | nextSame (uchar state, short slave, int addr, short fn, int value) |
|
int | numByState (int state=DONE) |
|
int | numSame (uchar state, short slave, int addr, short fn, int value) |
|
int | numSameOwner (uchar state, short slave, int addr, short fn, int value, int owner) |
|
void | print () |
|
short | qstate () |
|
short | query (int slave, short function, long start, int coils, Component *_owner, ComponentFnPtr _responseFn) |
|
short | query (int slave, short function, long start, int coils, int _ownerId) |
|
short | queryState () |
|
void | setDebugSend (bool debug) |
|
short | setup () |
|
bool | skipRead (int slave, int fn, int addr, int num, int prio) |
|
Definition at line 107 of file ModbusBridge.h.
◆ FLAGS
◆ ModbusBridge()
ModbusBridge::ModbusBridge |
( |
App * |
owner | ) |
|
|
inline |
Definition at line 117 of file ModbusBridge.h.
117 : Component(
"ModbusBridge", 1000, Component::COMPONENT_DEFAULT, (Component *)owner),
121 setFlag(OBJECT_RUN_FLAGS::E_OF_DEBUG);
◆ clearQueue()
void ModbusBridge::clearQueue |
( |
| ) |
|
◆ debug()
short ModbusBridge::debug |
( |
| ) |
|
◆ getMudbus()
Mudbus* ModbusBridge::getMudbus |
( |
| ) |
|
|
inline |
◆ info()
short ModbusBridge::info |
( |
| ) |
|
◆ loop()
short ModbusBridge::loop |
( |
| ) |
|
◆ loop_test()
short ModbusBridge::loop_test |
( |
| ) |
|
◆ loopPoll()
short ModbusBridge::loopPoll |
( |
| ) |
|
Definition at line 393 of file ModbusBridge.cpp.
451 long onMessageError = 0;
455 c->onResponse(onMessageError);
◆ modbus()
Modbus * ModbusBridge::modbus |
( |
| ) |
|
◆ nextByPrio()
Query * ModbusBridge::nextByPrio |
( |
uchar |
state, |
|
|
int |
prio |
|
) |
| |
◆ nextQueryByOwner()
Query * ModbusBridge::nextQueryByOwner |
( |
uchar |
state = DONE , |
|
|
int |
owner = -1 |
|
) |
| |
◆ nextQueryByState()
Query * ModbusBridge::nextQueryByState |
( |
uchar |
state = DONE , |
|
|
int |
owner = -1 |
|
) |
| |
◆ nextQueryByState2()
Query * ModbusBridge::nextQueryByState2 |
( |
uchar |
state, |
|
|
int |
owner |
|
) |
| |
◆ nextSame()
Query * ModbusBridge::nextSame |
( |
uchar |
state, |
|
|
short |
slave, |
|
|
int |
addr, |
|
|
short |
fn, |
|
|
int |
value |
|
) |
| |
◆ numByState()
int ModbusBridge::numByState |
( |
int |
state = DONE | ) |
|
◆ numSame()
int ModbusBridge::numSame |
( |
uchar |
state, |
|
|
short |
slave, |
|
|
int |
addr, |
|
|
short |
fn, |
|
|
int |
value |
|
) |
| |
◆ numSameOwner()
int ModbusBridge::numSameOwner |
( |
uchar |
state, |
|
|
short |
slave, |
|
|
int |
addr, |
|
|
short |
fn, |
|
|
int |
value, |
|
|
int |
owner |
|
) |
| |
◆ print()
void ModbusBridge::print |
( |
| ) |
|
Definition at line 273 of file ModbusBridge.cpp.
275 #ifdef HAS_DEBUG_MODBUS_BRIDGE_PRINT_QUEUE
276 Serial.print(
"----- Queries : --- ");
277 Serial.print(
"Proccessing : ");
279 Serial.print(
" | QUEUED : ");
281 Serial.print(
" | DONE: ");
283 Serial.print(
" | ADDR: ");
285 Serial.print(
" | FN: ");
287 Serial.print(
" | NOW : ");
288 Serial.print(millis());
289 Serial.print(
"-----\n");
298 Serial.print(
". \t ");
◆ qstate()
short ModbusBridge::qstate |
( |
| ) |
|
◆ query() [1/2]
short ModbusBridge::query |
( |
int |
slave, |
|
|
short |
function, |
|
|
long |
start, |
|
|
int |
coils, |
|
|
Component * |
_owner, |
|
|
ComponentFnPtr |
_responseFn |
|
) |
| |
Definition at line 316 of file ModbusBridge.cpp.
336 #ifdef HAS_DEBUG_MODBUS_BRIDGE_PRINT_QUERY
339 Serial.print(
"\n --------------Modbus QUERY --------- SLAVE : ");
341 Serial.print(
" | FN : ");
343 Serial.print(
" | NB : ");
345 Serial.print(
" | Address : ");
346 Serial.print(
cAddr, HEX);
347 Serial.print(
" | STATE : ");
349 Serial.print(
" | OWNER : ");
350 Serial.println(
rOwner->id);
351 Serial.println(
" \n ");
◆ query() [2/2]
short ModbusBridge::query |
( |
int |
slave, |
|
|
short |
function, |
|
|
long |
start, |
|
|
int |
coils, |
|
|
int |
_ownerId |
|
) |
| |
Definition at line 359 of file ModbusBridge.cpp.
372 #ifdef HAS_DEBUG_MODBUS_BRIDGE_PRINT_QUERY
375 Serial.print(
"\n --------------Modbus QUERY --------- SLAVE : ");
377 Serial.print(
" | FN : ");
379 Serial.print(
" | NB : ");
381 Serial.print(
" | Address : ");
382 Serial.print(
cAddr, HEX);
383 Serial.print(
" | STATE : ");
385 Serial.print(
" | OWNER : ");
387 Serial.println(
" \n ");
◆ queryState()
short ModbusBridge::queryState |
( |
| ) |
|
◆ setDebugSend()
void ModbusBridge::setDebugSend |
( |
bool |
debug | ) |
|
◆ setup()
short ModbusBridge::setup |
( |
| ) |
|
◆ skipRead()
bool ModbusBridge::skipRead |
( |
int |
slave, |
|
|
int |
fn, |
|
|
int |
addr, |
|
|
int |
num, |
|
|
int |
prio |
|
) |
| |
◆ app
◆ cAddr
short ModbusBridge::cAddr |
◆ cFN
◆ cNB
◆ cSlave
short ModbusBridge::cSlave |
◆ debug_flags
long ModbusBridge::debug_flags |
◆ mb
◆ ModbusSlaveRegisters
uint16_t ModbusBridge::ModbusSlaveRegisters[8] |
◆ nextWaitingTime
int ModbusBridge::nextWaitingTime |
◆ onError
ComponentFnPtr ModbusBridge::onError |
◆ onMessage
ComponentRxFn ModbusBridge::onMessage |
◆ ownerId
int ModbusBridge::ownerId |
◆ queries
◆ responseFn
ComponentFnPtr ModbusBridge::responseFn |
◆ rOwner
Component* ModbusBridge::rOwner |
◆ startTS
millis_t ModbusBridge::startTS |
The documentation for this class was generated from the following files: