Actin®  Version 5.3.0
Software for Robotics Simulation and Control
analogDigitalIoPlugin.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------
2 // Copyright (c) 2015 Energid Technologies. All rights reserved.
3 //
5 //
7 //
9 //
10 //-----------------------------------------------------------------------------
11 
12 #ifndef analogDigitalIoPlugin_H_
13 #define analogDigitalIoPlugin_H_
14 
15 // Includes
16 #include <foundCore/ecMacros.h>
17 #include <actin/actin_config.h>
18 
19 #include <foundCore/ecPlugin.h>
20 #include <foundCore/ecTypes.h>
22 
25 
28 {
29 protected:
32  (
33  );
34 
36  virtual ~analogDigitalIoPlugin
37  (
38  );
39 
41  virtual EcBoolean initState
42  (
43  ) EC_OVERRIDE;
44 
46  virtual EcBoolean init
47  (
48  ) EC_OVERRIDE;
49 
51  virtual EcBoolean shutdown
52  (
53  ) EC_OVERRIDE;
54 
55 public:
58  virtual EcBoolean readConfigurationFile
59  (
60  const EcString& filename
61  );
62 
65  virtual EcBoolean writeConfigurationFile
66  (
67  const EcString& filename
68  ) const;
69 
71  virtual EcBoolean initializeIoModules
72  (
73  );
74 
76  virtual EcStringVector getAnalogInputChannelIdentifiers
77  (
78  );
79 
81  virtual EcStringVector getAnalogOutputChannelIdentifiers
82  (
83  );
84 
86  virtual EcStringVector getDigitalInputChannelIdentifiers
87  (
88  );
89 
91  virtual EcStringVector getDigitalOutputChannelIdentifiers
92  (
93  );
94 
96  virtual EcBoolean getAnalogInputChannelByIdentifier
97  (
98  EcString identifier,
99  EcU32& channel
100  ) const;
101 
103  virtual EcBoolean getDigitalInputChannelByIdentifier
104  (
105  EcString identifier,
106  EcU32& channel
107  ) const;
108 
110  virtual EcBoolean getAnalogOutputChannelByIdentifier
111  (
112  EcString identifier,
113  EcU32& channel
114  ) const;
115 
117  virtual EcBoolean getDigitalOutputChannelByIdentifier
118  (
119  EcString identifier,
120  EcU32& channel
121  ) const;
122 
124  virtual EcBoolean getAnalogInputChannelRange
125  (
126  const EcU32 channel,
127  EcReal& min,
128  EcReal& max
129  ) const;
130 
132  virtual EcBoolean getAnalogOutputChannelRange
133  (
134  const EcU32 channel,
135  EcReal& min,
136  EcReal& max
137  ) const;
138 
140  virtual EcBoolean readAnalogInput
141  (
142  const EcU32 channel,
143  EcReal& value
144  );
145 
147  virtual EcBoolean readAnalogOutput
148  (
149  const EcU32 channel,
150  EcReal& value
151  );
152 
154  virtual EcBoolean writeAnalog
155  (
156  const EcU32 channel,
157  const EcReal value
158  );
159 
161  virtual EcBoolean writeAnalogToDefault
162  (
163  const EcU32 channel
164  );
165 
167  virtual EcBoolean readDigitalInput
168  (
169  const EcU32 channel,
170  EcBoolean& value
171  );
172 
174  virtual EcBoolean readDigitalOutput
175  (
176  const EcU32 channel,
177  EcBoolean& value
178  );
179 
181  virtual EcBoolean writeDigital
182  (
183  const EcU32 channel,
184  const EcBoolean value
185  );
186 
188  virtual EcBoolean writeDigitalToDefault
189  (
190  const EcU32 channel
191  );
192 
194  virtual void update
195  (
196  const EcReal time
197  ) EC_OVERRIDE
198  {}
199 
200 protected:
201  virtual EcU32 moduleIndexAndChannelToUnifiedChannel
202  (
203  const EcU32 moduleIndex,
204  const EcU32 channel
205  ) const;
206 
207  virtual EcU32 unifiedChannelToModuleIndex
208  (
209  const EcU32 unifiedChannel
210  ) const;
211 
212  virtual EcU32 unifiedChannelToModuleChannel
213  (
214  const EcU32 unifiedChannel
215  ) const;
216 
217  EcString m_ConfigFilename;
219  EcAnalogDigitalIoModuleDataVector m_vIoModuleData;
220 };
221 
222 #endif // analogDigitalIoPlugin_H_
223 
224 
virtual EcBoolean initState()
Definition: ecPlugin.h:142
Class to hold analog digital IO plugin configuration.
#define EC_ACTIN_ANALOG_DIGITAL_IO_DECL
analogDigitalIoPlugin directory
Definition: actin_config.h:52
#define EC_OVERRIDE
Add wrapper around c++11 override keyword.
Definition: ecMacros.h:36
virtual EcBoolean shutdown()
Definition: ecPlugin.h:153
boost::uint32_t EcU32
32-bit unsigned integer
Definition: ecTypes.h:53
A defininition of basic types of data and structs.
virtual EcBoolean init()
Definition: ecPlugin.h:454
std::vector< EcString > EcStringVector
string organization using vectors
Definition: ecTypes.h:138
bool EcBoolean
Boolean (0 or 1)
Definition: ecTypes.h:21
EcF64 EcReal
Alias for 64-bit float.
Definition: ecTypes.h:30
std::basic_string< char > EcString
a character string
Definition: ecTypes.h:116
Macros and C-style general functions.
Provides an abstract class to be used as a template for creating dynamically loaded functions...
Definition: ecPlugin.h:82
a plugin to interface with analog and digital IO modules.
virtual void update(const EcReal time)=0
Configuration header for the actin hierarchy.
Created by Energid Technologies www.energid.com
Copyright © 2016 Energid. All trademarks mentioned in this document are property of their respective owners.