Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
enums.hpp
Go to the documentation of this file.
1#ifndef IV_SRC_COMMS_MODBUS_ENUMS_HPP_
2#define IV_SRC_COMMS_MODBUS_ENUMS_HPP_
3
4#include "core/assert.hpp"
5#include "core/enums.hpp"
6
7namespace iv::comms::modbus
8{
9
11{
12 IllegalFunction = 0x01, // Function Code not Supported
13 IllegalAddress = 0x02, // Output Address not exists
14 IllegalValue = 0x03, // Output Value not in Range
15 ServerFailure = 0x04, // Slave Deive Fails to process request
16 Acknowledge = 0x05, // Service Need Long Time to Execute
17 ServerBusy = 0x06, // Server Was Unable to Accept MB Request PDU
18 GatewayProblemPath = 0x0A, // Gateway Path not Available
19 GatewayProblemFailed = 0x0B,// Target Device Failed to Response
20};
21
22enum class eFunctionCode : uint16_t
23{
24 ReadCoils = 0x01,
25 ReadDiscreteInputs = 0x02,
27 ReadInputRegisters = 0x04,
28 WriteSingleCoil = 0x05,
30 WriteCoils = 0x0F,
31 WriteRegisters = 0x10
32};
33
68
69enum class eType
70{
71 Rtu,
72 Tcp,
73 Udp
74};
75
76}// namespace iv::comms::modbus
77
78#endif//IV_SRC_COMMS_MODBUS_ENUMS_HPP_
#define IV_ASSERT_UNREACHABLE()
Definition assert.hpp:146
Definition AbstractModbusCommunicationProtocol.cpp:8
eType
Definition enums.hpp:70
eFunctionCode
Definition enums.hpp:23
eExceptionCode
Definition enums.hpp:11
iv::comms::modbus::eRegisterType functionCodeFromRegisterType(const iv::comms::modbus::eFunctionCode functionCode)
Definition enums.hpp:35
eRegisterType
Definition enums.hpp:315