File tree 3 files changed +11
-6
lines changed 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,18 @@ the device profiles.
15
15
Examples
16
16
--------
17
17
18
+ To list the currently active emergencies for a particular node, one can use the
19
+ ``.active `` attribute which is a list of :class: `canopen.emcy.EmcyError `
20
+ objects::
18
21
22
+ active_codes = [emcy.code for emcy in node.emcy.active]
23
+ all_codes = [emcy.code for emcy in node.emcy.log]
24
+
25
+ The :class: `canopen.emcy.EmcyError ` objects are actually exceptions so that they
26
+ can be easily raised if that's what you want::
27
+
28
+ if node.emcy.active:
29
+ raise node.emcy.active[-1]
19
30
20
31
21
32
API
Original file line number Diff line number Diff line change 136
136
an underscore + the subindex in hex format.
137
137
138
138
139
- Exceptions
140
- ~~~~~~~~~~
141
-
142
139
.. autoexception :: canopen.ObjectDictionaryError
143
140
:members:
Original file line number Diff line number Diff line change 175
175
actual length of the array.
176
176
177
177
178
- Exceptions
179
- ~~~~~~~~~~
180
-
181
178
.. autoexception :: canopen.SdoAbortedError
182
179
:members:
183
180
You can’t perform that action at this time.
0 commit comments