Adjusted mutex lock and delay for modbus
This commit is contained in:
@@ -8,9 +8,21 @@
|
||||
class remoteIO
|
||||
{
|
||||
public:
|
||||
typedef enum {CH1, CH2, CH3, CH4, CH5, CH6, CH7, CH8, CH_MAX} channel_t;
|
||||
typedef enum
|
||||
{
|
||||
CH1,
|
||||
CH2,
|
||||
CH3,
|
||||
CH4,
|
||||
CH5,
|
||||
CH6,
|
||||
CH7,
|
||||
CH8,
|
||||
CH_MAX
|
||||
} channel_t;
|
||||
|
||||
private:
|
||||
const uint32_t c_minDelay = 100;
|
||||
const uint16_t REG_VERSION = 0x8000;
|
||||
const uint16_t REG_COILS = 0x0000;
|
||||
const uint16_t REG_INPUT = 0x0000;
|
||||
@@ -32,8 +44,12 @@ public:
|
||||
|
||||
void resetAll(const bool value);
|
||||
|
||||
private:
|
||||
void delayRequest();
|
||||
|
||||
private:
|
||||
bool m_initialized;
|
||||
drivers::MODBUS &m_bus;
|
||||
const uint8_t m_address;
|
||||
uint32_t m_lastRequest;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user