InertiaSDK

Loading...
Searching...
No Matches
VMonBoardConfig.h
1#pragma once
2
3#include "data/config/GenericConfig.h"
4
5 namespace inertia
6{
7
9 enum VmonBoardType {
10 VMON_NON_DIFF = 0,
11 VMON_VOLTAGE_IEPE = 1
12};
13
15 enum ChannelInputSelect {
16 STRAIGHT_TO_INSTR_AMP = 0,
17 DECOUPLED_240K,
18 DECOUPLED_24K,
19 DECOUPLED_2_4K
20};
21
23 enum ResistiveFeedbackSelect {
24 RESISTIVE_FEEDBACK_24K = 0,
25 RESISTIVE_FEEDBACK_1M,
26 RESISTIVE_FEEDBACK_10M,
27 RESISTIVE_FEEDBACK_100M
28};
29
31 enum CapacitiveFeedbackSelect {
32 CAPACITIVE_FEEDBACK_10P = 0,
33 CAPACITIVE_FEEDBACK_100P,
34 CAPACITIVE_FEEDBACK_1N,
35 CAPACITIVE_FEEDBACK_10N
36};
37
38 struct INERTIA_API ChannelConfig {
39 bool inputSelectEnable, resistiveFeedbackSelectEnable, capacitiveFeedbackSelectEnable,
40 currentInjectEnable, gainPotEnable, currentInjectPotEnable;
41 ChannelInputSelect inputSelect;
42 ResistiveFeedbackSelect resistiveFeedback;
43 CapacitiveFeedbackSelect capacitiveFeedback;
44 uint8_t amplifierGain, injectCurrent;
45 uint16_t lowPassCutoffFrequency;
46
47 ChannelConfig();
48 ChannelConfig(uint8_t const* in);
49 ChannelConfig(std::wstring const& argString);
50
51#ifdef WITH_BOOST_PROGRAM_OPTIONS
52 static const po::options_description GetOptionDescription();
53#endif
54
55 void GetBytes(std::vector<uint8_t>& out) const;
56 const std::wstring ToString() const;
57 const std::wstring ToSimpleString() const;
58};
59
60 struct INERTIA_API IndustrialBoardNonDiff {
61 VmonBoardType type;
62 uint8_t stackPosition, ibndRevision;
63 ChannelConfig channels[4];
64
65 IndustrialBoardNonDiff();
66 IndustrialBoardNonDiff(uint8_t const* in);
67 IndustrialBoardNonDiff(std::wstring const& argString);
68
69#ifdef WITH_BOOST_PROGRAM_OPTIONS
70 static const po::options_description GetOptionDescription();
71#endif
72
73 void GetBytes(std::vector<uint8_t>& out) const;
74 const std::wstring ToString() const;
75};
76
77 struct INERTIA_API IEPE_voltage {
78 VmonBoardType type;
79 bool enable, potEnable;
80 uint8_t voltage;
81 uint8_t reserved;
82
83 IEPE_voltage();
84 IEPE_voltage(uint8_t const* in);
85 IEPE_voltage(std::wstring const& argString);
86
87#ifdef WITH_BOOST_PROGRAM_OPTIONS
88 static const po::options_description GetOptionDescription();
89#endif
90
91 void GetBytes(std::vector<uint8_t>& out) const;
92 const std::wstring ToString() const;
93 const std::wstring ToSimpleString() const;
94};
95
96 struct INERTIA_API VmonBoardConfig
97 : GenericConfig
98{
99 std::vector<IndustrialBoardNonDiff> nonDiffBoards;
100 IEPE_voltage voltageIEPE;
101
102 VmonBoardConfig();
103 VmonBoardConfig(uint8_t const* in);
104 VmonBoardConfig(std::wstring const& argString);
105
106#ifdef WITH_BOOST_PROGRAM_OPTIONS
107 static const po::options_description GetOptionDescription();
108#endif
109
110 void GetBytes(std::vector<uint8_t>& out) const override;
111 ConfigType GetConfigType() const override;
112 const std::wstring ToString() const override;
113};
114
115}
inertia
Definition FlashCommands.h:6
inertia::VmonBoardType
VmonBoardType
Definition VMonBoardConfig.h:9
inertia::CapacitiveFeedbackSelect
CapacitiveFeedbackSelect
Definition VMonBoardConfig.h:31
inertia::ConfigType
ConfigType
Definition ConfigChannel.h:7
inertia::ResistiveFeedbackSelect
ResistiveFeedbackSelect
Definition VMonBoardConfig.h:23
inertia::ChannelInputSelect
ChannelInputSelect
Definition VMonBoardConfig.h:15
inertia::ChannelConfig
Definition VMonBoardConfig.h:38
inertia::IEPE_voltage
Definition VMonBoardConfig.h:77