py-l5x 0.5.2__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.
- py_l5x/__init__.py +177 -0
- py_l5x/build/__init__.py +40 -0
- py_l5x/build/aoi.py +599 -0
- py_l5x/build/datatype.py +299 -0
- py_l5x/build/export.py +1174 -0
- py_l5x/build/program.py +106 -0
- py_l5x/build/specs.py +421 -0
- py_l5x/build/tag.py +156 -0
- py_l5x/build/template.py +184 -0
- py_l5x/data/builtin_types.L5X.gz +0 -0
- py_l5x/parse.py +112 -0
- py_l5x/parsers/__init__.py +5 -0
- py_l5x/parsers/aoi.py +1531 -0
- py_l5x/parsers/atomic_types.py +931 -0
- py_l5x/parsers/base.py +652 -0
- py_l5x/parsers/controller.py +378 -0
- py_l5x/parsers/datatype.py +725 -0
- py_l5x/parsers/layout.py +628 -0
- py_l5x/parsers/migrate.py +517 -0
- py_l5x/parsers/module.py +963 -0
- py_l5x/parsers/names.py +49 -0
- py_l5x/parsers/program.py +548 -0
- py_l5x/parsers/project.py +595 -0
- py_l5x/parsers/routine.py +777 -0
- py_l5x/parsers/schema.py +194 -0
- py_l5x/parsers/specialty_tags.py +398 -0
- py_l5x/parsers/tag.py +3509 -0
- py_l5x/parsers/task.py +298 -0
- py_l5x/parsers/utils.py +140 -0
- py_l5x/writer.py +119 -0
- py_l5x-0.5.2.dist-info/METADATA +1560 -0
- py_l5x-0.5.2.dist-info/RECORD +35 -0
- py_l5x-0.5.2.dist-info/WHEEL +5 -0
- py_l5x-0.5.2.dist-info/licenses/LICENSE +21 -0
- py_l5x-0.5.2.dist-info/top_level.txt +1 -0
py_l5x/__init__.py
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
"""py_l5x - Parse and inspect Rockwell Logix 5000 L5X project files.
|
|
2
|
+
|
|
3
|
+
Usage:
|
|
4
|
+
>>> from py_l5x import load
|
|
5
|
+
>>> project = load("my_project.L5X")
|
|
6
|
+
>>> print(project.controller.name)
|
|
7
|
+
MyController
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from py_l5x.build import (
|
|
11
|
+
AOISpec,
|
|
12
|
+
DataTypeSpec,
|
|
13
|
+
LocalTagSpec,
|
|
14
|
+
MemberSpec,
|
|
15
|
+
ParameterSpec,
|
|
16
|
+
ProgramSpec,
|
|
17
|
+
ProtectedContentWarning,
|
|
18
|
+
RoutineSpec,
|
|
19
|
+
RungSpec,
|
|
20
|
+
TagSpec,
|
|
21
|
+
aoi_call_operands,
|
|
22
|
+
build_aoi,
|
|
23
|
+
build_datatype,
|
|
24
|
+
build_program,
|
|
25
|
+
build_tag,
|
|
26
|
+
export_component,
|
|
27
|
+
stamp,
|
|
28
|
+
substitute,
|
|
29
|
+
)
|
|
30
|
+
from py_l5x.parse import load, loads
|
|
31
|
+
from py_l5x.parsers.aoi import (
|
|
32
|
+
AOIDefinition,
|
|
33
|
+
AOILocalArrayTag,
|
|
34
|
+
AOILocalAtomicTag,
|
|
35
|
+
AOILocalBoolTag,
|
|
36
|
+
AOILocalDateTimeTag,
|
|
37
|
+
AOILocalFloatTag,
|
|
38
|
+
AOILocalIntegerTag,
|
|
39
|
+
AOILocalStringTag,
|
|
40
|
+
AOILocalStructTag,
|
|
41
|
+
AOILocalTag,
|
|
42
|
+
AOILocalTimeTag,
|
|
43
|
+
AOIParameter,
|
|
44
|
+
AOIParameterAtomicTag,
|
|
45
|
+
AOIParameterBoolTag,
|
|
46
|
+
AOIParameterDateTimeTag,
|
|
47
|
+
AOIParameterFloatTag,
|
|
48
|
+
AOIParameterIntegerTag,
|
|
49
|
+
AOIParameterTimeTag,
|
|
50
|
+
CallSite,
|
|
51
|
+
ProtectedAOI,
|
|
52
|
+
ProtectedAOICollection,
|
|
53
|
+
)
|
|
54
|
+
from py_l5x.parsers.controller import ControllerInfo
|
|
55
|
+
from py_l5x.parsers.datatype import DataType, DataTypeMember
|
|
56
|
+
from py_l5x.parsers.module import Module, ModuleTagRef, ModuleTagsView
|
|
57
|
+
from py_l5x.parsers.program import Program
|
|
58
|
+
from py_l5x.parsers.project import Project, ProjectTagsView
|
|
59
|
+
from py_l5x.parsers.routine import (
|
|
60
|
+
ProtectedRoutine,
|
|
61
|
+
ProtectedRoutinesCollection,
|
|
62
|
+
Routine,
|
|
63
|
+
)
|
|
64
|
+
from py_l5x.parsers.tag import (
|
|
65
|
+
AliasTag,
|
|
66
|
+
ArrayNode,
|
|
67
|
+
ArrayTag,
|
|
68
|
+
AtomicNode,
|
|
69
|
+
AtomicTag,
|
|
70
|
+
AxisTag,
|
|
71
|
+
BoolNode,
|
|
72
|
+
BoolTag,
|
|
73
|
+
ConsumeInfo,
|
|
74
|
+
DateTimeNode,
|
|
75
|
+
DateTimeTag,
|
|
76
|
+
FloatNode,
|
|
77
|
+
FloatTag,
|
|
78
|
+
IntegerNode,
|
|
79
|
+
IntegerTag,
|
|
80
|
+
MessageTag,
|
|
81
|
+
MotionGroupTag,
|
|
82
|
+
ProduceInfo,
|
|
83
|
+
StringNode,
|
|
84
|
+
StringTag,
|
|
85
|
+
StructNode,
|
|
86
|
+
StructTag,
|
|
87
|
+
Tag,
|
|
88
|
+
TagNode,
|
|
89
|
+
TimeNode,
|
|
90
|
+
TimeTag,
|
|
91
|
+
UnknownTag,
|
|
92
|
+
)
|
|
93
|
+
from py_l5x.parsers.task import Task
|
|
94
|
+
|
|
95
|
+
__all__ = [
|
|
96
|
+
"AOISpec",
|
|
97
|
+
"AOIDefinition",
|
|
98
|
+
"AOILocalArrayTag",
|
|
99
|
+
"AOILocalAtomicTag",
|
|
100
|
+
"AOILocalBoolTag",
|
|
101
|
+
"AOILocalDateTimeTag",
|
|
102
|
+
"AOILocalFloatTag",
|
|
103
|
+
"AOILocalIntegerTag",
|
|
104
|
+
"AOILocalStringTag",
|
|
105
|
+
"AOILocalStructTag",
|
|
106
|
+
"AOILocalTag",
|
|
107
|
+
"AOILocalTimeTag",
|
|
108
|
+
"AOIParameter",
|
|
109
|
+
"AOIParameterAtomicTag",
|
|
110
|
+
"AOIParameterBoolTag",
|
|
111
|
+
"AOIParameterDateTimeTag",
|
|
112
|
+
"AOIParameterFloatTag",
|
|
113
|
+
"AOIParameterIntegerTag",
|
|
114
|
+
"AOIParameterTimeTag",
|
|
115
|
+
"AliasTag",
|
|
116
|
+
"ArrayNode",
|
|
117
|
+
"ArrayTag",
|
|
118
|
+
"AtomicNode",
|
|
119
|
+
"AtomicTag",
|
|
120
|
+
"AxisTag",
|
|
121
|
+
"BoolNode",
|
|
122
|
+
"BoolTag",
|
|
123
|
+
"CallSite",
|
|
124
|
+
"ConsumeInfo",
|
|
125
|
+
"ControllerInfo",
|
|
126
|
+
"DataType",
|
|
127
|
+
"DataTypeSpec",
|
|
128
|
+
"DataTypeMember",
|
|
129
|
+
"DateTimeNode",
|
|
130
|
+
"DateTimeTag",
|
|
131
|
+
"FloatNode",
|
|
132
|
+
"FloatTag",
|
|
133
|
+
"IntegerNode",
|
|
134
|
+
"IntegerTag",
|
|
135
|
+
"MessageTag",
|
|
136
|
+
"LocalTagSpec",
|
|
137
|
+
"MemberSpec",
|
|
138
|
+
"Module",
|
|
139
|
+
"ModuleTagRef",
|
|
140
|
+
"ModuleTagsView",
|
|
141
|
+
"MotionGroupTag",
|
|
142
|
+
"ProduceInfo",
|
|
143
|
+
"Program",
|
|
144
|
+
"ParameterSpec",
|
|
145
|
+
"ProgramSpec",
|
|
146
|
+
"Project",
|
|
147
|
+
"ProjectTagsView",
|
|
148
|
+
"ProtectedAOI",
|
|
149
|
+
"ProtectedAOICollection",
|
|
150
|
+
"ProtectedContentWarning",
|
|
151
|
+
"ProtectedRoutine",
|
|
152
|
+
"ProtectedRoutinesCollection",
|
|
153
|
+
"Routine",
|
|
154
|
+
"RoutineSpec",
|
|
155
|
+
"RungSpec",
|
|
156
|
+
"StringNode",
|
|
157
|
+
"StringTag",
|
|
158
|
+
"StructNode",
|
|
159
|
+
"StructTag",
|
|
160
|
+
"Tag",
|
|
161
|
+
"TagNode",
|
|
162
|
+
"TagSpec",
|
|
163
|
+
"Task",
|
|
164
|
+
"TimeNode",
|
|
165
|
+
"TimeTag",
|
|
166
|
+
"UnknownTag",
|
|
167
|
+
"aoi_call_operands",
|
|
168
|
+
"build_aoi",
|
|
169
|
+
"build_datatype",
|
|
170
|
+
"build_program",
|
|
171
|
+
"build_tag",
|
|
172
|
+
"export_component",
|
|
173
|
+
"stamp",
|
|
174
|
+
"substitute",
|
|
175
|
+
"load",
|
|
176
|
+
"loads",
|
|
177
|
+
]
|
py_l5x/build/__init__.py
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"""Spec builders: plain dataclasses turned into Studio-exact XML."""
|
|
2
|
+
|
|
3
|
+
from py_l5x.build.aoi import aoi_call_operands, build_aoi
|
|
4
|
+
from py_l5x.build.datatype import build_datatype
|
|
5
|
+
from py_l5x.build.export import ProtectedContentWarning, export_component
|
|
6
|
+
from py_l5x.build.program import build_program
|
|
7
|
+
from py_l5x.build.specs import (
|
|
8
|
+
AOISpec,
|
|
9
|
+
DataTypeSpec,
|
|
10
|
+
LocalTagSpec,
|
|
11
|
+
MemberSpec,
|
|
12
|
+
ParameterSpec,
|
|
13
|
+
ProgramSpec,
|
|
14
|
+
RoutineSpec,
|
|
15
|
+
RungSpec,
|
|
16
|
+
TagSpec,
|
|
17
|
+
)
|
|
18
|
+
from py_l5x.build.tag import build_tag
|
|
19
|
+
from py_l5x.build.template import stamp, substitute
|
|
20
|
+
|
|
21
|
+
__all__ = [
|
|
22
|
+
"AOISpec",
|
|
23
|
+
"DataTypeSpec",
|
|
24
|
+
"LocalTagSpec",
|
|
25
|
+
"MemberSpec",
|
|
26
|
+
"ParameterSpec",
|
|
27
|
+
"ProgramSpec",
|
|
28
|
+
"RoutineSpec",
|
|
29
|
+
"RungSpec",
|
|
30
|
+
"TagSpec",
|
|
31
|
+
"aoi_call_operands",
|
|
32
|
+
"build_aoi",
|
|
33
|
+
"build_datatype",
|
|
34
|
+
"build_program",
|
|
35
|
+
"build_tag",
|
|
36
|
+
"ProtectedContentWarning",
|
|
37
|
+
"export_component",
|
|
38
|
+
"stamp",
|
|
39
|
+
"substitute",
|
|
40
|
+
]
|