Fix lock on MODBUS
This commit is contained in:
@@ -60,6 +60,10 @@ namespace drivers
|
||||
MODBUS(const MODBUS &) = delete; // remove copy constructors
|
||||
MODBUS &operator=(const MODBUS &) = delete;
|
||||
|
||||
// Get transaction lock
|
||||
std::unique_lock<std::mutex> getLock() {
|
||||
return std::unique_lock<std::mutex>(m_mutex);
|
||||
}
|
||||
|
||||
// Func 0x01
|
||||
const bool readCoils(const uint8_t device, const uint16_t reg, const uint16_t num, std::vector<bool> &coils);
|
||||
|
||||
Reference in New Issue
Block a user