@@ -32,7 +32,7 @@ typedef struct TTransaction {
3232 uint8_t * _frame = nullptr ;
3333 void * data = nullptr ;
3434 TAddress startreg;
35- bool operator ==(const TTransaction &obj) const {
35+ bool operator ==(const TTransaction &obj) const {
3636 return transactionId == obj.transactionId ;
3737 }
3838};
@@ -70,7 +70,7 @@ class ModbusIP : public Modbus {
7070 bool isTransaction (uint16_t id);
7171 bool isConnected (IPAddress ip);
7272 bool connect (IPAddress ip);
73- bool disconnect (IPAddress addr) {} // Not implemented yet
73+ bool disconnect (IPAddress ip);
7474 void slave ();
7575 void master ();
7676 void task ();
@@ -79,8 +79,9 @@ class ModbusIP : public Modbus {
7979 void onDisconnect (cbModbusConnect cb = nullptr );
8080 IPAddress eventSource ();
8181 void autoConnect (bool enabled = true );
82+ void dropTransactions ();
8283
83- uint16_t writeCoil (IPAddress ip, uint16_t offset, bool value, cbTransaction cb = nullptr , uint8_t unit = MODBUSIP_UNIT);
84+ uint16_t writeCoil (IPAddress ip, uint16_t offset, bool value, cbTransaction cb = nullptr , uint8_t unit = MODBUSIP_UNIT);
8485 uint16_t writeHreg (IPAddress ip, uint16_t offset, uint16_t value, cbTransaction cb = nullptr , uint8_t unit = MODBUSIP_UNIT);
8586 uint16_t writeCoil (IPAddress ip, uint16_t offset, bool * value, uint16_t numregs = 1 , cbTransaction cb = nullptr , uint8_t unit = MODBUSIP_UNIT);
8687 uint16_t writeHreg (IPAddress ip, uint16_t offset, uint16_t * value, uint16_t numregs = 1 , cbTransaction cb = nullptr , uint8_t unit = MODBUSIP_UNIT);
0 commit comments