py-eb-model 1.1.4__py3-none-any.whl → 1.1.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- eb_model/models/__init__.py +5 -5
- eb_model/models/abstract.py +10 -5
- eb_model/models/eb_doc.py +8 -8
- eb_model/models/eclipse_project.py +0 -3
- eb_model/models/importer_xdm.py +7 -8
- eb_model/models/os_xdm.py +19 -19
- eb_model/models/rte_xdm.py +41 -11
- eb_model/tests/models/test_ecuc_container.py +3 -3
- {py_eb_model-1.1.4.dist-info → py_eb_model-1.1.5.dist-info}/METADATA +8 -1
- {py_eb_model-1.1.4.dist-info → py_eb_model-1.1.5.dist-info}/RECORD +14 -14
- {py_eb_model-1.1.4.dist-info → py_eb_model-1.1.5.dist-info}/LICENSE +0 -0
- {py_eb_model-1.1.4.dist-info → py_eb_model-1.1.5.dist-info}/WHEEL +0 -0
- {py_eb_model-1.1.4.dist-info → py_eb_model-1.1.5.dist-info}/entry_points.txt +0 -0
- {py_eb_model-1.1.4.dist-info → py_eb_model-1.1.5.dist-info}/top_level.txt +0 -0
eb_model/models/__init__.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
from .abstract import *
|
2
|
-
from .os_xdm import *
|
3
|
-
from .rte_xdm import *
|
4
|
-
from .eb_doc import *
|
5
|
-
from .importer_xdm import *
|
1
|
+
from .abstract import * # noqa F403
|
2
|
+
from .os_xdm import * # noqa F403
|
3
|
+
from .rte_xdm import * # noqa F403
|
4
|
+
from .eb_doc import * # noqa F403
|
5
|
+
from .importer_xdm import * # noqa F403
|
eb_model/models/abstract.py
CHANGED
@@ -2,15 +2,16 @@ from abc import ABCMeta
|
|
2
2
|
from typing import Dict
|
3
3
|
import re
|
4
4
|
|
5
|
+
|
5
6
|
class EcucObject(metaclass=ABCMeta):
|
6
7
|
def __init__(self, parent, name) -> None:
|
7
|
-
if type(self)
|
8
|
+
if type(self) is EcucObject:
|
8
9
|
raise ValueError("Abstract EcucObject cannot be initialized.")
|
9
10
|
|
10
11
|
self.name = name
|
11
12
|
self.parent = parent # type: EcucObject
|
12
13
|
|
13
|
-
if isinstance(parent,
|
14
|
+
if isinstance(parent, EcucParamConfContainerDef):
|
14
15
|
parent.addElement(self)
|
15
16
|
|
16
17
|
def getName(self):
|
@@ -30,14 +31,15 @@ class EcucObject(metaclass=ABCMeta):
|
|
30
31
|
def getFullName(self) -> str:
|
31
32
|
return self.parent.getFullName() + "/" + self.name
|
32
33
|
|
33
|
-
|
34
|
+
|
35
|
+
class EcucParamConfContainerDef(EcucObject):
|
34
36
|
def __init__(self, parent, name) -> None:
|
35
37
|
super().__init__(parent, name)
|
36
38
|
|
37
39
|
self.elements = {} # type: Dict[str, EcucObject]
|
38
40
|
|
39
41
|
def getTotalElement(self) -> int:
|
40
|
-
#return len(list(filter(lambda a: not isinstance(a, ARPackage) , self.elements.values())))
|
42
|
+
# return len(list(filter(lambda a: not isinstance(a, ARPackage) , self.elements.values())))
|
41
43
|
return len(self.elements)
|
42
44
|
|
43
45
|
def addElement(self, object: EcucObject):
|
@@ -60,6 +62,7 @@ class EcucContainer(EcucObject):
|
|
60
62
|
return None
|
61
63
|
return self.elements[name]
|
62
64
|
|
65
|
+
|
63
66
|
class EcucRefType:
|
64
67
|
def __init__(self, value: str) -> None:
|
65
68
|
self.value = value
|
@@ -82,6 +85,7 @@ class EcucRefType:
|
|
82
85
|
return m.group(1)
|
83
86
|
return self.value
|
84
87
|
|
88
|
+
|
85
89
|
class Version:
|
86
90
|
def __init__(self):
|
87
91
|
self.majorVersion = None
|
@@ -115,7 +119,8 @@ class Version:
|
|
115
119
|
def getVersion(self) -> str:
|
116
120
|
return "%d.%d.%d" % (self.majorVersion, self.minorVersion, self.patchVersion)
|
117
121
|
|
118
|
-
|
122
|
+
|
123
|
+
class Module(EcucParamConfContainerDef):
|
119
124
|
def __init__(self, parent, name):
|
120
125
|
super().__init__(parent, name)
|
121
126
|
|
eb_model/models/eb_doc.py
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
from .importer_xdm import SystemDescriptionImporter
|
2
2
|
from .rte_xdm import Rte
|
3
3
|
from .os_xdm import Os
|
4
|
-
from .abstract import
|
4
|
+
from .abstract import EcucParamConfContainerDef, EcucObject
|
5
5
|
|
6
6
|
|
7
|
-
class AbstractModel(
|
7
|
+
class AbstractModel(EcucParamConfContainerDef):
|
8
8
|
def getFullName(self):
|
9
9
|
return self.name
|
10
10
|
|
11
11
|
def clear(self):
|
12
12
|
self.elements = {}
|
13
13
|
|
14
|
-
def find_object(self, referred_name: str, element:
|
14
|
+
def find_object(self, referred_name: str, element: EcucParamConfContainerDef) -> EcucObject:
|
15
15
|
name_list = referred_name.split("/")
|
16
16
|
# element = EBModel.getInstance()
|
17
17
|
for name in name_list:
|
@@ -37,19 +37,19 @@ class EBModel(AbstractModel):
|
|
37
37
|
if (EBModel.__instance is not None):
|
38
38
|
raise Exception("The EBModel is singleton!")
|
39
39
|
|
40
|
-
|
40
|
+
EcucParamConfContainerDef.__init__(self, None, "")
|
41
41
|
EBModel.__instance = self
|
42
42
|
|
43
43
|
def find(self, referred_name: str) -> EcucObject:
|
44
44
|
return self.find_object(referred_name, EBModel.getInstance())
|
45
45
|
|
46
46
|
def getOs(self) -> Os:
|
47
|
-
container =
|
47
|
+
container = EcucParamConfContainerDef(self, "Os")
|
48
48
|
Os(container)
|
49
49
|
return self.find("/Os/Os")
|
50
50
|
|
51
51
|
def getRte(self) -> Rte:
|
52
|
-
container =
|
52
|
+
container = EcucParamConfContainerDef(self, "Rte")
|
53
53
|
Rte(container)
|
54
54
|
return self.find("/Rte/Rte")
|
55
55
|
|
@@ -67,10 +67,10 @@ class PreferenceModel(AbstractModel):
|
|
67
67
|
if (PreferenceModel.__instance is not None):
|
68
68
|
raise Exception("The PreferenceModel is singleton!")
|
69
69
|
|
70
|
-
|
70
|
+
EcucParamConfContainerDef.__init__(self, None, "")
|
71
71
|
PreferenceModel.__instance = self
|
72
72
|
|
73
|
-
container =
|
73
|
+
container = EcucParamConfContainerDef(self, "ImporterExporterAdditions")
|
74
74
|
SystemDescriptionImporter(container, "SystemDescriptionImporters")
|
75
75
|
|
76
76
|
def find(self, referred_name: str) -> EcucObject:
|
eb_model/models/importer_xdm.py
CHANGED
@@ -7,6 +7,7 @@ import os
|
|
7
7
|
import re
|
8
8
|
import logging
|
9
9
|
|
10
|
+
|
10
11
|
class SystemDescriptionImporter(EcucObject):
|
11
12
|
def __init__(self, parent, name):
|
12
13
|
super().__init__(parent, name)
|
@@ -28,7 +29,7 @@ class SystemDescriptionImporter(EcucObject):
|
|
28
29
|
file_list.append(file)
|
29
30
|
return file_list
|
30
31
|
|
31
|
-
def getParsedInputFiles(self, params
|
32
|
+
def getParsedInputFiles(self, params={}) -> List[str]:
|
32
33
|
file_list = []
|
33
34
|
for input_file in self.inputFiles:
|
34
35
|
m = re.match(r'\$\{(env_var:\w+)\}(.*)', input_file)
|
@@ -50,7 +51,7 @@ class SystemDescriptionImporter(EcucObject):
|
|
50
51
|
file_list.append(input_file)
|
51
52
|
return file_list
|
52
53
|
|
53
|
-
def getAllPaths(self, path
|
54
|
+
def getAllPaths(self, path: str) -> List[str]:
|
54
55
|
path_segments = path.split("/")
|
55
56
|
|
56
57
|
result = []
|
@@ -61,11 +62,11 @@ class SystemDescriptionImporter(EcucObject):
|
|
61
62
|
if long_path == "":
|
62
63
|
long_path = path_segment
|
63
64
|
else:
|
64
|
-
long_path = long_path +"/" + path_segment
|
65
|
+
long_path = long_path + "/" + path_segment
|
65
66
|
result.append(long_path)
|
66
67
|
return result
|
67
68
|
|
68
|
-
def getNameByPath(self, path
|
69
|
+
def getNameByPath(self, path: str):
|
69
70
|
path_segments = path.split("/")
|
70
71
|
|
71
72
|
result = []
|
@@ -76,10 +77,10 @@ class SystemDescriptionImporter(EcucObject):
|
|
76
77
|
else:
|
77
78
|
result.append(path_segment)
|
78
79
|
|
79
|
-
return (count
|
80
|
+
return (count, "/".join(result))
|
80
81
|
|
81
82
|
def getLinks(self, file_list: List[str]) -> List[Link]:
|
82
|
-
path_sets = {}
|
83
|
+
path_sets = {} # type: Dict[str, List[str]]
|
83
84
|
path_segment_sets = []
|
84
85
|
|
85
86
|
for file in file_list:
|
@@ -111,5 +112,3 @@ class SystemDescriptionImporter(EcucObject):
|
|
111
112
|
links.append(link)
|
112
113
|
|
113
114
|
return links
|
114
|
-
|
115
|
-
|
eb_model/models/os_xdm.py
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
from typing import Dict, List # noqa F401
|
2
2
|
import logging
|
3
|
-
from ..models.abstract import
|
3
|
+
from ..models.abstract import EcucParamConfContainerDef, EcucObject, EcucRefType, Module
|
4
4
|
|
5
5
|
|
6
|
-
class OsAlarmAction(
|
6
|
+
class OsAlarmAction(EcucParamConfContainerDef):
|
7
7
|
def __init__(self, parent, name) -> None:
|
8
8
|
super().__init__(parent, name)
|
9
9
|
|
10
10
|
|
11
|
-
class OsAlarmAutostart(
|
11
|
+
class OsAlarmAutostart(EcucParamConfContainerDef):
|
12
12
|
def __init__(self, parent, name) -> None:
|
13
13
|
super().__init__(parent, name)
|
14
14
|
|
@@ -110,7 +110,7 @@ class OsAlarmSetEvent(OsAlarmAction):
|
|
110
110
|
return self
|
111
111
|
|
112
112
|
|
113
|
-
class OsAlarm(
|
113
|
+
class OsAlarm(EcucParamConfContainerDef):
|
114
114
|
def __init__(self, parent, name) -> None:
|
115
115
|
super().__init__(parent, name)
|
116
116
|
|
@@ -160,7 +160,7 @@ class OsAlarm(EcucContainer):
|
|
160
160
|
return "\n".join(result)
|
161
161
|
|
162
162
|
|
163
|
-
class OsApplicationHooks(
|
163
|
+
class OsApplicationHooks(EcucParamConfContainerDef):
|
164
164
|
def __init__(self, parent, name):
|
165
165
|
super().__init__(parent, name)
|
166
166
|
|
@@ -198,7 +198,7 @@ class OsApplicationHooks(EcucContainer):
|
|
198
198
|
return self
|
199
199
|
|
200
200
|
|
201
|
-
class OsApplicationTrustedFunction(
|
201
|
+
class OsApplicationTrustedFunction(EcucParamConfContainerDef):
|
202
202
|
def __init__(self, parent, name):
|
203
203
|
super().__init__(parent, name)
|
204
204
|
|
@@ -220,12 +220,12 @@ class OsApplicationTrustedFunction(EcucContainer):
|
|
220
220
|
return self
|
221
221
|
|
222
222
|
|
223
|
-
class OsAppMode(
|
223
|
+
class OsAppMode(EcucParamConfContainerDef):
|
224
224
|
def __init__(self, parent, name):
|
225
225
|
super().__init__(parent, name)
|
226
226
|
|
227
227
|
|
228
|
-
class OsApplication(
|
228
|
+
class OsApplication(EcucParamConfContainerDef):
|
229
229
|
def __init__(self, parent, name) -> None:
|
230
230
|
super().__init__(parent, name)
|
231
231
|
|
@@ -344,7 +344,7 @@ class OsApplication(EcucContainer):
|
|
344
344
|
return self
|
345
345
|
|
346
346
|
|
347
|
-
class OsDriver(
|
347
|
+
class OsDriver(EcucParamConfContainerDef):
|
348
348
|
def __init__(self, parent, name) -> None:
|
349
349
|
super().__init__(parent, name)
|
350
350
|
|
@@ -364,7 +364,7 @@ class OsDriver(EcucContainer):
|
|
364
364
|
return self
|
365
365
|
|
366
366
|
|
367
|
-
class OsTimeConstant(
|
367
|
+
class OsTimeConstant(EcucParamConfContainerDef):
|
368
368
|
def __init__(self, parent, name) -> None:
|
369
369
|
super().__init__(parent, name)
|
370
370
|
|
@@ -384,7 +384,7 @@ class OsTimeConstant(EcucContainer):
|
|
384
384
|
return self
|
385
385
|
|
386
386
|
|
387
|
-
class OsCounter(
|
387
|
+
class OsCounter(EcucParamConfContainerDef):
|
388
388
|
|
389
389
|
OS_COUNTER_TYPE_HARDWARE = "HARDWARE"
|
390
390
|
OS_COUNTER_TYPE_SOFTWARE = "SOFTWARE"
|
@@ -482,12 +482,12 @@ class OsCounter(EcucContainer):
|
|
482
482
|
return self
|
483
483
|
|
484
484
|
|
485
|
-
class OsResource(
|
485
|
+
class OsResource(EcucParamConfContainerDef):
|
486
486
|
def __init__(self) -> None:
|
487
487
|
pass
|
488
488
|
|
489
489
|
|
490
|
-
class OsIsrResourceLock(
|
490
|
+
class OsIsrResourceLock(EcucParamConfContainerDef):
|
491
491
|
def __init__(self) -> None:
|
492
492
|
self.osIsrResourceLockBudget = None
|
493
493
|
self.osIsrResourceLockResourceRef = None
|
@@ -724,7 +724,7 @@ class OsTask(EcucObject):
|
|
724
724
|
return self.osTaskAutostart is not None
|
725
725
|
|
726
726
|
|
727
|
-
class OsScheduleTableAutostart(
|
727
|
+
class OsScheduleTableAutostart(EcucParamConfContainerDef):
|
728
728
|
def __init__(self, parent, name) -> None:
|
729
729
|
super().__init__(parent, name)
|
730
730
|
|
@@ -754,7 +754,7 @@ class OsScheduleTableAutostart(EcucContainer):
|
|
754
754
|
return self
|
755
755
|
|
756
756
|
|
757
|
-
class OsScheduleTblAdjustableExpPoint(
|
757
|
+
class OsScheduleTblAdjustableExpPoint(EcucParamConfContainerDef):
|
758
758
|
def __init__(self, parent, name) -> None:
|
759
759
|
super().__init__(parent, name)
|
760
760
|
|
@@ -776,7 +776,7 @@ class OsScheduleTblAdjustableExpPoint(EcucContainer):
|
|
776
776
|
return self
|
777
777
|
|
778
778
|
|
779
|
-
class OsScheduleTableTaskActivation(
|
779
|
+
class OsScheduleTableTaskActivation(EcucParamConfContainerDef):
|
780
780
|
def __init__(self, parent, name) -> None:
|
781
781
|
super().__init__(parent, name)
|
782
782
|
|
@@ -790,7 +790,7 @@ class OsScheduleTableTaskActivation(EcucContainer):
|
|
790
790
|
return self
|
791
791
|
|
792
792
|
|
793
|
-
class OsScheduleTableEventSetting(
|
793
|
+
class OsScheduleTableEventSetting(EcucParamConfContainerDef):
|
794
794
|
def __init__(self, parent, name) -> None:
|
795
795
|
super().__init__(parent, name)
|
796
796
|
|
@@ -814,7 +814,7 @@ class OsScheduleTableEventSetting(EcucContainer):
|
|
814
814
|
return self
|
815
815
|
|
816
816
|
|
817
|
-
class OsScheduleTableExpiryPoint(
|
817
|
+
class OsScheduleTableExpiryPoint(EcucParamConfContainerDef):
|
818
818
|
def __init__(self, parent, name) -> None:
|
819
819
|
super().__init__(parent, name)
|
820
820
|
|
@@ -854,7 +854,7 @@ class OsScheduleTableExpiryPoint(EcucContainer):
|
|
854
854
|
return self
|
855
855
|
|
856
856
|
|
857
|
-
class OsScheduleTable(
|
857
|
+
class OsScheduleTable(EcucParamConfContainerDef):
|
858
858
|
|
859
859
|
OS_TIME_UNIT_NANOSECONDS = "NANOSECONDS"
|
860
860
|
OS_TIME_UNIT_TICKS = "TICKS"
|
eb_model/models/rte_xdm.py
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
from typing import Dict, List
|
2
|
-
from ..models.abstract import
|
3
|
-
|
2
|
+
from ..models.abstract import EcucParamConfContainerDef, EcucRefType, Module
|
3
|
+
|
4
|
+
|
5
|
+
class RteEventToIsrMapping(EcucParamConfContainerDef):
|
4
6
|
def __init__(self, parent, name) -> None:
|
5
7
|
super().__init__(parent, name)
|
6
8
|
|
@@ -10,7 +12,8 @@ class RteEventToIsrMapping(EcucContainer):
|
|
10
12
|
self.RteRipsFillRoutineRef = None
|
11
13
|
self.RteRipsFlushRoutineRef = None
|
12
14
|
|
13
|
-
|
15
|
+
|
16
|
+
class AbstractEventToTaskMapping(EcucParamConfContainerDef):
|
14
17
|
def __init__(self, parent, name) -> None:
|
15
18
|
super().__init__(parent, name)
|
16
19
|
|
@@ -23,6 +26,7 @@ class AbstractEventToTaskMapping(EcucContainer):
|
|
23
26
|
self.rtePositionInTask = value
|
24
27
|
return self
|
25
28
|
|
29
|
+
|
26
30
|
class RteEventToTaskMapping(AbstractEventToTaskMapping):
|
27
31
|
def __init__(self, parent, name) -> None:
|
28
32
|
super().__init__(parent, name)
|
@@ -174,8 +178,9 @@ class RteEventToTaskMapping(AbstractEventToTaskMapping):
|
|
174
178
|
|
175
179
|
def setRteVirtuallyMappedToTaskRef(self, value):
|
176
180
|
self.rteVirtuallyMappedToTaskRef = value
|
177
|
-
return self
|
178
|
-
|
181
|
+
return self
|
182
|
+
|
183
|
+
|
179
184
|
class RteEventToTaskMappingV3(RteEventToTaskMapping):
|
180
185
|
def __init__(self, parent, name):
|
181
186
|
super().__init__(parent, name)
|
@@ -189,6 +194,7 @@ class RteEventToTaskMappingV3(RteEventToTaskMapping):
|
|
189
194
|
self.rteEventRef = value
|
190
195
|
return self
|
191
196
|
|
197
|
+
|
192
198
|
class RteEventToTaskMappingV4(RteEventToTaskMapping):
|
193
199
|
def __init__(self, parent, name):
|
194
200
|
super().__init__(parent, name)
|
@@ -208,6 +214,7 @@ class RteEventToTaskMappingV4(RteEventToTaskMapping):
|
|
208
214
|
raise ValueError("Unsupported RteEventRef of RteEventToTaskMapping <%s> " % self.name)
|
209
215
|
return self.rteEventRefs[0]
|
210
216
|
|
217
|
+
|
211
218
|
class RteBswEventToTaskMapping(AbstractEventToTaskMapping):
|
212
219
|
def __init__(self, parent, name) -> None:
|
213
220
|
super().__init__(parent, name)
|
@@ -329,6 +336,7 @@ class RteBswEventToTaskMapping(AbstractEventToTaskMapping):
|
|
329
336
|
self.rteRipsFlushRoutineRef = value
|
330
337
|
return self
|
331
338
|
|
339
|
+
|
332
340
|
class RteBswEventToTaskMappingV3(RteBswEventToTaskMapping):
|
333
341
|
def __init__(self, parent, name):
|
334
342
|
super().__init__(parent, name)
|
@@ -343,6 +351,7 @@ class RteBswEventToTaskMappingV3(RteBswEventToTaskMapping):
|
|
343
351
|
self.rteBswEventRef = value
|
344
352
|
return self
|
345
353
|
|
354
|
+
|
346
355
|
class RteBswEventToTaskMappingV4(RteBswEventToTaskMapping):
|
347
356
|
def __init__(self, parent, name):
|
348
357
|
super().__init__(parent, name)
|
@@ -361,10 +370,12 @@ class RteBswEventToTaskMappingV4(RteBswEventToTaskMapping):
|
|
361
370
|
raise ValueError("Unsupported RteEventRef of RteEventToTaskMapping <%s> " % self.name)
|
362
371
|
return self.rteBswEventRefs[0]
|
363
372
|
|
364
|
-
|
373
|
+
|
374
|
+
class AbstractRteInstance(EcucParamConfContainerDef):
|
365
375
|
def __init__(self, parent, name) -> None:
|
366
376
|
super().__init__(parent, name)
|
367
377
|
|
378
|
+
|
368
379
|
class RteSwComponentInstance(AbstractRteInstance):
|
369
380
|
def __init__(self, parent, name) -> None:
|
370
381
|
super().__init__(parent, name)
|
@@ -443,6 +454,7 @@ class RteSwComponentInstance(AbstractRteInstance):
|
|
443
454
|
self.rteNvRamAllocations.append(value)
|
444
455
|
return self
|
445
456
|
|
457
|
+
|
446
458
|
class RteBswModuleInstance(AbstractRteInstance):
|
447
459
|
def __init__(self, parent, name) -> None:
|
448
460
|
super().__init__(parent, name)
|
@@ -551,25 +563,43 @@ class RteBswModuleInstance(AbstractRteInstance):
|
|
551
563
|
def setRteMappedToOsApplicationRef(self, value):
|
552
564
|
self.rteMappedToOsApplicationRef = value
|
553
565
|
return self
|
554
|
-
|
566
|
+
|
567
|
+
|
555
568
|
class Rte(Module):
|
556
569
|
def __init__(self, parent) -> None:
|
557
570
|
super().__init__(parent, "Rte")
|
558
571
|
|
572
|
+
self.rteBswModuleInstances = [] # type: List[RteBswModuleInstance]
|
573
|
+
self.rteSwComponentInstances = [] # type: List[RteSwComponentInstance]
|
574
|
+
|
575
|
+
def getRteBswModuleInstance(self, name: str) -> RteBswModuleInstance:
|
576
|
+
result = list(filter(lambda a: a.name == name, self.rteBswModuleInstances))
|
577
|
+
if len(result) > 0:
|
578
|
+
return result[0]
|
579
|
+
return None
|
580
|
+
|
559
581
|
def getRteBswModuleInstanceList(self) -> List[RteBswModuleInstance]:
|
560
|
-
return list(sorted(
|
582
|
+
return list(sorted(self.rteBswModuleInstances, key=lambda o: o.name))
|
561
583
|
|
562
584
|
def addRteBswModuleInstance(self, value: RteBswModuleInstance):
|
563
585
|
self.elements[value.getName()] = value
|
586
|
+
self.rteBswModuleInstances.append(value)
|
587
|
+
|
588
|
+
def getRteSwComponentInstance(self, name: str) -> RteSwComponentInstance:
|
589
|
+
result = list(filter(lambda a: a.name == name, self.rteSwComponentInstances))
|
590
|
+
if len(result) > 0:
|
591
|
+
return result[0]
|
592
|
+
return None
|
564
593
|
|
565
594
|
def getRteSwComponentInstanceList(self) -> List[RteSwComponentInstance]:
|
566
|
-
return list(sorted(
|
595
|
+
return list(sorted(self.rteSwComponentInstances, key=lambda o: o.name))
|
567
596
|
|
568
597
|
def addRteSwComponentInstance(self, value: RteSwComponentInstance):
|
569
598
|
self.elements[value.getName()] = value
|
599
|
+
self.rteSwComponentInstances.append(value)
|
570
600
|
|
571
601
|
def getRteModuleInstanceList(self) -> List[AbstractRteInstance]:
|
572
|
-
return list(sorted(filter(lambda a: isinstance(a, AbstractRteInstance), self.elements.values()), key=
|
602
|
+
return list(sorted(filter(lambda a: isinstance(a, AbstractRteInstance), self.elements.values()), key=lambda o: o.name))
|
573
603
|
|
574
604
|
def _addToRteEventToOsTasks(self, mapping: AbstractEventToTaskMapping, os_tasks: Dict[str, List[AbstractEventToTaskMapping]]):
|
575
605
|
if isinstance(mapping, RteBswEventToTaskMapping):
|
@@ -601,4 +631,4 @@ class Rte(Module):
|
|
601
631
|
else:
|
602
632
|
raise NotImplementedError("Invalid Rte Module Instance <%s>" % type(instance))
|
603
633
|
|
604
|
-
return os_tasks
|
634
|
+
return os_tasks
|
@@ -1,12 +1,12 @@
|
|
1
1
|
|
2
2
|
from ...models.eb_doc import EBModel
|
3
|
-
from ...models.abstract import
|
3
|
+
from ...models.abstract import EcucParamConfContainerDef, EcucObject
|
4
4
|
|
5
5
|
class TestEcucContainer:
|
6
6
|
|
7
7
|
def test_create_container(self):
|
8
8
|
document = EBModel.getInstance()
|
9
|
-
os_container =
|
9
|
+
os_container = EcucParamConfContainerDef(document, "Os")
|
10
10
|
|
11
11
|
assert (os_container.getFullName() == "/Os")
|
12
12
|
assert (os_container.getParent() == document)
|
@@ -18,5 +18,5 @@ class TestEcucContainer:
|
|
18
18
|
assert (container.getParent() == document)
|
19
19
|
assert (container.getName() == "Os")
|
20
20
|
|
21
|
-
assert(isinstance(container,
|
21
|
+
assert(isinstance(container, EcucParamConfContainerDef))
|
22
22
|
assert(isinstance(container, EcucObject))
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: py-eb-model
|
3
|
-
Version: 1.1.
|
3
|
+
Version: 1.1.5
|
4
4
|
Summary: The parser for EB XDM file
|
5
5
|
Home-page: UNKNOWN
|
6
6
|
Author: melodypapa
|
@@ -198,3 +198,10 @@ PrefSystemImporter --base-path c:/EB/ACG-8_8_8_WIN32X86/workspace/simple_demo_rt
|
|
198
198
|
2. Add the isOsTaskAutostart method to get the enabled flag of osTaskAutostart.
|
199
199
|
3. Add the flake8 change rules.
|
200
200
|
|
201
|
+
**Version 1.1.5**
|
202
|
+
|
203
|
+
1. Add the new interfaces to support to get the instance by name.
|
204
|
+
* Rte::getRteBswModuleInstance
|
205
|
+
* Rte::getRteBswModuleInstance
|
206
|
+
|
207
|
+
|
@@ -3,13 +3,13 @@ eb_model/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
eb_model/cli/os_xdm_2_xls_cli.py,sha256=zUnxJ4uHWRSjMmpSK5hXRAzVt-_YGEyiMXrexnJSk6g,1970
|
4
4
|
eb_model/cli/pref_system_importer_cli.py,sha256=Cra-rVpgxruLLyWHRdYAgbwfcHVPV2L8Jk6ck0v4lJU,3361
|
5
5
|
eb_model/cli/rte_xdm_2_xls_cli.py,sha256=83uzE2Vk0h267gWxF9mnWN3Bh69RJpYyKULFXpxTByY,2127
|
6
|
-
eb_model/models/__init__.py,sha256=
|
7
|
-
eb_model/models/abstract.py,sha256=
|
8
|
-
eb_model/models/eb_doc.py,sha256=
|
9
|
-
eb_model/models/eclipse_project.py,sha256=
|
10
|
-
eb_model/models/importer_xdm.py,sha256=
|
11
|
-
eb_model/models/os_xdm.py,sha256=
|
12
|
-
eb_model/models/rte_xdm.py,sha256=
|
6
|
+
eb_model/models/__init__.py,sha256=Jn4oOg6CxbAvULNaVt0obDLGPZC2sLzeo6rQt4eTDQ0,245
|
7
|
+
eb_model/models/abstract.py,sha256=rYy45TV8HzcG1dQWbXD0yalWpkxubUzjAvwOugAwtbE,3884
|
8
|
+
eb_model/models/eb_doc.py,sha256=Kx0eExrQCmkWdPC0OnzVcZAOeXtRcwNM6AFMANntgAQ,2671
|
9
|
+
eb_model/models/eclipse_project.py,sha256=I1y4UUPJQqy8Bh77sJkufzcH9wXMN1Wk82er-m1Sxhc,155
|
10
|
+
eb_model/models/importer_xdm.py,sha256=wUdwZQ-uq75EkhU4nzrYeNR5UphaTJ41MjywOPcCHsE,4246
|
11
|
+
eb_model/models/os_xdm.py,sha256=Kj5DuBP3-RJUdEf3d5Q1iKhpqCF_lnM-evougloAsZo,33983
|
12
|
+
eb_model/models/rte_xdm.py,sha256=dEsGhpnaG-VG5QfEPv6hxQdopzwMkHHz8kDHj_7MuYM,21851
|
13
13
|
eb_model/parser/__init__.py,sha256=7VOmPr4dng_TrOyDZFu2_s3r0BJZQGiOUxALMY8EnqI,170
|
14
14
|
eb_model/parser/eb_parser.py,sha256=_5sUl2pMt1SchHvrLOhU2axqa3FmKTWElSB79taz0O4,8188
|
15
15
|
eb_model/parser/eb_parser_factory.py,sha256=zqsqq52uImU4-WcS5dvHfhM95hiEPAGRtNzVik8i8wc,971
|
@@ -25,14 +25,14 @@ eb_model/reporter/excel_reporter/rte_xdm.py,sha256=OHuVPUV7xCdDzxELyXi766YJ6GejT
|
|
25
25
|
eb_model/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
26
26
|
eb_model/tests/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
27
27
|
eb_model/tests/models/test_eb_model.py,sha256=3fpIHhzQlf9KZjm4fZxcSTT4Zio6YhTrcn9UBvlhOfo,1632
|
28
|
-
eb_model/tests/models/test_ecuc_container.py,sha256
|
28
|
+
eb_model/tests/models/test_ecuc_container.py,sha256=-M_XZTSeWGVIJac6sj_an2-Ui65QVNXbfbETOD_Ipm8,758
|
29
29
|
eb_model/tests/models/test_importer_xdm.py,sha256=F80kO77jeyfCkLPRgRLjEj3UPcrACimR5LhBhFgX_m4,3372
|
30
30
|
eb_model/writer/__init__.py,sha256=CXvQAsNV1OvYClkHdKCG7Q300OVBzcl2TmoD68MyQOs,95
|
31
31
|
eb_model/writer/project_writer.py,sha256=9BQU1CJAktVxFvQk89Pj4IbizTJXnlQidt4eX_CIFXU,2800
|
32
32
|
eb_model/writer/text_writer.py,sha256=7d4_PUTJk5Y6S_EQflAH3ACDnUw9VwJzP90GFDh0n0I,991
|
33
|
-
py_eb_model-1.1.
|
34
|
-
py_eb_model-1.1.
|
35
|
-
py_eb_model-1.1.
|
36
|
-
py_eb_model-1.1.
|
37
|
-
py_eb_model-1.1.
|
38
|
-
py_eb_model-1.1.
|
33
|
+
py_eb_model-1.1.5.dist-info/LICENSE,sha256=I52rGS7W1IwAmYCUfqTpDaSHoFAdt7grcNiBhk-Z3eI,1088
|
34
|
+
py_eb_model-1.1.5.dist-info/METADATA,sha256=ZT0KjMQ8x1ezJYgwhkrupkz4lcb0-hKKVw4WWxTyKcI,6476
|
35
|
+
py_eb_model-1.1.5.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
36
|
+
py_eb_model-1.1.5.dist-info/entry_points.txt,sha256=yDLH9wnJ5Fp7ImgyFRSnr3mU6nvaenuKZnbe2rgs8Mk,183
|
37
|
+
py_eb_model-1.1.5.dist-info/top_level.txt,sha256=DGBNh6YW_x4RF_UoLKW3cKqb2SLnmfuEIZlkTewR66A,9
|
38
|
+
py_eb_model-1.1.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|