Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions include/modbuspp/asciilayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ namespace Modbus {
*/
AsciiLayer (const std::string & port, const std::string & settings);

/**
* @brief Destructor
*/
virtual ~AsciiLayer() = default;

/**
* @brief Name of the serial port
*
Expand Down
1 change: 1 addition & 0 deletions src/asciilayer_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ namespace Modbus {

public:
Private (const std::string & port, const std::string & settings);
virtual ~Private() = default;

int oneByteTime;
};
Expand Down
1 change: 1 addition & 0 deletions src/device_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ namespace Modbus {

public:
Private (Device * q);
virtual ~Private() = default;
virtual void setBackend (Net net, const std::string & connection,
const std::string & settings);
virtual void setConfig (const nlohmann::json & config);
Expand Down
2 changes: 1 addition & 1 deletion src/master_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ namespace Modbus {

public:
Private (Master * q);
virtual ~Private() = default;

void setBackend (Net net, const std::string & connection,
const std::string & settings) override;
Expand All @@ -39,4 +40,3 @@ namespace Modbus {
}

/* ========================================================================== */

1 change: 1 addition & 0 deletions src/netlayer_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ namespace Modbus {
public:
Private (Net n, const std::string & c, const std::string & s, uint16_t m) :
net (n), connection (c), settings (s), maxAduLength (m) {}
virtual ~Private() = default;

Net net;
std::string connection;
Expand Down
1 change: 1 addition & 0 deletions src/router_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ namespace Modbus {

public:
Private (Router * q);
virtual ~Private() = default;
virtual void setConfig (const nlohmann::json & config);

virtual bool open();
Expand Down
1 change: 1 addition & 0 deletions src/rtulayer_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ namespace Modbus {

public:
Private (const std::string & port, const std::string & settings);
virtual ~Private() = default;

int oneByteTime;
};
Expand Down
2 changes: 1 addition & 1 deletion src/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ namespace Modbus {

// ---------------------------------------------------------------------------
// static
void * Server::Private::loop (std::future<void> run, Private * d) {
void Server::Private::loop (std::future<void> run, Private * d) {
int rc;

while (run.wait_for (std::chrono::milliseconds (100)) == std::future_status::timeout) {
Expand Down
3 changes: 2 additions & 1 deletion src/server_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ namespace Modbus {
static const int MAX_CONNECTIONS = 16;
public:
Private (Server * q);
virtual ~Private() = default;
virtual void setBackend (Net net, const std::string & connection,
const std::string & settings);
virtual void setConfig (const nlohmann::json & config);
Expand All @@ -41,7 +42,7 @@ namespace Modbus {

BufferedSlave * addSlave (int slaveAddr, Device * master);

static void * loop (std::future<void> run, Private * d);
static void loop (std::future<void> run, Private * d);
static int receive (Private * d);

int listen_sock = -1;
Expand Down
1 change: 1 addition & 0 deletions src/slave_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ namespace Modbus {
public:
Private (Slave * q);
Private (Slave * q, int s, Device * d);
virtual ~Private() = default;

inline modbus_t * ctx() {
return dev->backend().context();
Expand Down
1 change: 1 addition & 0 deletions src/tcplayer_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ namespace Modbus {

public:
Private (const std::string & host, const std::string & service);
virtual ~Private() = default;

uint16_t transactionId;
};
Expand Down