Commit 608a4af672900d3cd3d4ddd1edc3ce7f0c3d3a25

Authored by Peter M. Groen
1 parent a457c658

Implmenting ModbusBase class

documentation/graphics/originals/.~lock.modbus_drawings.odg# deleted
1   -Peter Groen,pgroen,nuc64.osdev.nl,24.09.2022 16:00,file:///home/pgroen/.config/.openoffice/4;
2 0 \ No newline at end of file
documentation/modbus-cpp.asta 0 → 100644
No preview for this file type
src/modbusbase.cpp
... ... @@ -7,6 +7,8 @@
7 7  
8 8 #include "modbusbase.h"
9 9  
  10 +using namespace osdev::components::modbus;
  11 +
10 12 int ModbusBase::readCoils(uint16_t address, uint16_t amount, bool *buffer)
11 13 {
12 14 if (m_connected)
... ...
src/modbusbase.h
... ... @@ -44,6 +44,10 @@
44 44  
45 45 #define BAD_CON -1
46 46  
  47 +namespace osdev {
  48 +namespace components {
  49 +namespace modbus {
  50 +
47 51 // Modbus base class. Providing all Modbus PDUs without transport implementation
48 52 class ModbusBase
49 53 {
... ... @@ -169,3 +173,8 @@ private: // Members (Giggity!)
169 173 int m_slaveId{};
170 174  
171 175 };
  176 +
  177 +} // End namespace modbus
  178 +} // End namespace components
  179 +} // End namespace osdev
  180 +
... ...