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 \ No newline at end of file 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,6 +7,8 @@
7 7
8 #include "modbusbase.h" 8 #include "modbusbase.h"
9 9
  10 +using namespace osdev::components::modbus;
  11 +
10 int ModbusBase::readCoils(uint16_t address, uint16_t amount, bool *buffer) 12 int ModbusBase::readCoils(uint16_t address, uint16_t amount, bool *buffer)
11 { 13 {
12 if (m_connected) 14 if (m_connected)
src/modbusbase.h
@@ -44,6 +44,10 @@ @@ -44,6 +44,10 @@
44 44
45 #define BAD_CON -1 45 #define BAD_CON -1
46 46
  47 +namespace osdev {
  48 +namespace components {
  49 +namespace modbus {
  50 +
47 // Modbus base class. Providing all Modbus PDUs without transport implementation 51 // Modbus base class. Providing all Modbus PDUs without transport implementation
48 class ModbusBase 52 class ModbusBase
49 { 53 {
@@ -169,3 +173,8 @@ private: // Members (Giggity!) @@ -169,3 +173,8 @@ private: // Members (Giggity!)
169 int m_slaveId{}; 173 int m_slaveId{};
170 174
171 }; 175 };
  176 +
  177 +} // End namespace modbus
  178 +} // End namespace components
  179 +} // End namespace osdev
  180 +