SlaveErrorRegistersDevice.h
Go to the documentation of this file.
1#pragma once
2
3
6
8
10{
12 {
13 public:
15
16 std::uint8_t linkLostCounterPort0{0};
17 std::uint8_t linkLostCounterPort1{0};
18 // std::uint8_t linkLostCounterPort2{0};
19 // std::uint8_t linkLostCounterPort3{0};
20
21 std::uint8_t frameErrorCounterPort0{0};
22 std::uint8_t frameErrorCounterPort1{0};
23 // std::uint8_t frameErrorCounterPort2{0};
24 // std::uint8_t frameErrorCounterPort3{0};
25
26 std::uint8_t rxErrorCounterPort0{0};
27 std::uint8_t rxErrorCounterPort1{0};
28 // std::uint8_t rxErrorCounterPort2{0};
29 // std::uint8_t rxErrorCounterPort3{0};
30
33
34 // std::uint8_t forwardedRxErrorCounterPort2{0};
35 // std::uint8_t forwardedRxErrorCounterPort3{0};
36
39 {
41
43 "LinkLostCounter.Port0");
45 "LinkLostCounter.Port1");
46 // svi.addMemberVariable(&SlaveErrorRegistersSensorValue::linkLostCounterPort2,
47 // "LinkLostCounter.Port2");
48 // svi.addMemberVariable(&SlaveErrorRegistersSensorValue::linkLostCounterPort3,
49 // "LinkLostCounter.Port3");
50
52 "FrameErrorCounter.Port0");
54 "FrameErrorCounter.Port1");
55 // svi.addMemberVariable(&SlaveErrorRegistersSensorValue::frameErrorCounterPort2,
56 // "FrameErrorCounter.Port2");
57 // svi.addMemberVariable(&SlaveErrorRegistersSensorValue::frameErrorCounterPort3,
58 // "FrameErrorCounter.Port3");
59
61 "RxErrorCounter.Port0");
63 "RxErrorCounter.Port1");
64 // svi.addMemberVariable(&SlaveErrorRegistersSensorValue::rxErrorCounterPort2,
65 // "RxErrorCounter.Port2");
66 // svi.addMemberVariable(&SlaveErrorRegistersSensorValue::rxErrorCounterPort3,
67 // "RxErrorCounter.Port3");
68
70 "ForwardedRxErrorCounter.Port0");
72 "ForwardedRxErrorCounter.Port1");
73 // svi.addMemberVariable(&SlaveErrorRegistersSensorValue::forwardedRxErrorCounterPort2,
74 // "ForwardedRxErrorCounter.Port2");
75 // svi.addMemberVariable(&SlaveErrorRegistersSensorValue::forwardedRxErrorCounterPort3,
76 // "ForwardedRxErrorCounter.Port3");
77
78 return svi;
79 }
80 };
81
83
84 /**
85 * @class SlaveErrorRegistersDevice
86 * @ingroup Library-ethercat
87 * @brief Brief description of class SlaveErrorRegistersDevice.
88 *
89 * Detailed description of class SlaveErrorRegistersDevice.
90 */
92 {
93 public:
94 SlaveErrorRegistersDevice(const std::string& name, std::uint16_t slaveIndex) :
95 DeviceBase(name), SensorDevice(name), slaveIndex(slaveIndex)
96 {
97 }
98
99 /**
100 * @see RtUtility:startLowLatencyMode
101 * @see armarx::control::ethercat::SlaveIdentifier::vendorID
102 */
103 const SensorValueBase*
104 getSensorValue() const override
105 {
106 return &value;
107 }
108
110
112
113 private:
114 std::uint16_t slaveIndex;
115 };
116
117} // namespace armarx::control::ethercat
#define TYPEDEF_PTRS_SHARED(T)
#define DETAIL_SensorValueBase_DEFAULT_METHOD_IMPLEMENTATION
DeviceBase(const std::string &name)
Create a Device with the given name.
Definition DeviceBase.h:33
SensorDevice(const std::string &name)
Create a SensorDevice with the given name.
The SensorValueBase class.
introspection::ClassMemberInfo< SensorValueBase, DerivedClass > SensorValueInfo
Brief description of class SlaveErrorRegistersDevice.
SlaveErrorRegistersDevice(const std::string &name, std::uint16_t slaveIndex)
const SensorValueBase * getSensorValue() const override
DETAIL_SensorValueBase_DEFAULT_METHOD_IMPLEMENTATION std::uint8_t linkLostCounterPort0
static SensorValueInfo< SlaveErrorRegistersSensorValue > GetClassMemberInfo()
Brief description of struct RegisterDataList.
EntryConfigurator< ClassType > addMemberVariable(MemberType ClassType::*ptr, const std::string &name)
add a member variable of the current class