Commit 1909846
committed
Replace mapping in class PDO with proper PdoMaps object.
The mechanisms to lookup objects, implemented in class PdoMaps, did
not apply to the PDO class itself, because it simply used a dictionary
instead of a PdoMaps object. That also violates the static typing
rules.
Make the PdoBase.maps attribute mandatory and accept only type
PdoMaps. To allow a basically "empty" PdoMaps object, adjust its
constructor to skip adding entries when neither offset parameter is
given as non-zero. Instead, access the PdoMaps.maps attribute
directly to inject the offset-based TX and RX PdoMap objects in the
PDO class constructor. Add some explanation why relative indices
cannot be used here.1 parent d4d7fe2 commit 1909846
2 files changed
+11
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
35 | | - | |
| 37 | + | |
36 | 38 | | |
37 | | - | |
| 39 | + | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
161 | 164 | | |
162 | 165 | | |
163 | 166 | | |
| |||
0 commit comments