opencrbasic 1.0.0__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.
Files changed (117) hide show
  1. opencrbasic/__init__.py +3 -0
  2. opencrbasic/__main__.py +5 -0
  3. opencrbasic/analysis.py +184 -0
  4. opencrbasic/bindings.py +1034 -0
  5. opencrbasic/catalog.py +173 -0
  6. opencrbasic/checkconfig.py +144 -0
  7. opencrbasic/checker/__init__.py +977 -0
  8. opencrbasic/checker/cr3xx.py +3118 -0
  9. opencrbasic/checker/ess.py +81 -0
  10. opencrbasic/checker/expressions.py +3581 -0
  11. opencrbasic/checker/instr_data.py +1802 -0
  12. opencrbasic/checker/instr_measure.py +1547 -0
  13. opencrbasic/checker/instr_rules.py +3540 -0
  14. opencrbasic/checker/instructions.py +17 -0
  15. opencrbasic/checker/intervals.py +678 -0
  16. opencrbasic/checker/longconv.py +133 -0
  17. opencrbasic/checker/scan_time.py +580 -0
  18. opencrbasic/checker/storage.py +456 -0
  19. opencrbasic/checker/structs.py +240 -0
  20. opencrbasic/checker/structure.py +6213 -0
  21. opencrbasic/checker/symbols.py +609 -0
  22. opencrbasic/checker/terminals.py +249 -0
  23. opencrbasic/checker/unused.py +186 -0
  24. opencrbasic/checker/var_types.py +564 -0
  25. opencrbasic/checker/warnings.py +661 -0
  26. opencrbasic/checks.py +491 -0
  27. opencrbasic/cli.py +391 -0
  28. opencrbasic/commands.py +128 -0
  29. opencrbasic/compiler.py +320 -0
  30. opencrbasic/consteval.py +327 -0
  31. opencrbasic/data/background_calibration.json +4 -0
  32. opencrbasic/data/before_beginprog.json +99 -0
  33. opencrbasic/data/cr1000x/background_calibration.json +4 -0
  34. opencrbasic/data/cr1000x/before_beginprog.json +138 -0
  35. opencrbasic/data/cr1000x/ess_variables.json +1087 -0
  36. opencrbasic/data/cr1000x/fnotch.json +29 -0
  37. opencrbasic/data/cr1000x/functions.json +1337 -0
  38. opencrbasic/data/cr1000x/instructions.json +4836 -0
  39. opencrbasic/data/cr1000x/measure.json +121 -0
  40. opencrbasic/data/cr1000x/mode.json +111 -0
  41. opencrbasic/data/cr1000x/pipeline_tasks.json +88 -0
  42. opencrbasic/data/cr1000x/settings_fields.json +321 -0
  43. opencrbasic/data/cr1000x/status_members.json +318 -0
  44. opencrbasic/data/cr1000x/symbols.json +872 -0
  45. opencrbasic/data/cr1000x/terminals.json +225 -0
  46. opencrbasic/data/cr300/before_beginprog.json +42 -0
  47. opencrbasic/data/cr300/ess_variables.json +1087 -0
  48. opencrbasic/data/cr300/fnotch.json +22 -0
  49. opencrbasic/data/cr300/functions.json +1261 -0
  50. opencrbasic/data/cr300/instructions.json +2837 -0
  51. opencrbasic/data/cr300/measure.json +33 -0
  52. opencrbasic/data/cr300/mode.json +121 -0
  53. opencrbasic/data/cr300/settings_fields.json +259 -0
  54. opencrbasic/data/cr300/status_members.json +303 -0
  55. opencrbasic/data/cr300/symbols.json +584 -0
  56. opencrbasic/data/cr300/terminals.json +193 -0
  57. opencrbasic/data/cr350/before_beginprog.json +44 -0
  58. opencrbasic/data/cr350/ess_variables.json +1087 -0
  59. opencrbasic/data/cr350/fnotch.json +22 -0
  60. opencrbasic/data/cr350/functions.json +1262 -0
  61. opencrbasic/data/cr350/instructions.json +2848 -0
  62. opencrbasic/data/cr350/measure.json +35 -0
  63. opencrbasic/data/cr350/mode.json +121 -0
  64. opencrbasic/data/cr350/settings_fields.json +292 -0
  65. opencrbasic/data/cr350/status_members.json +303 -0
  66. opencrbasic/data/cr350/symbols.json +572 -0
  67. opencrbasic/data/cr350/terminals.json +190 -0
  68. opencrbasic/data/ess_variables.json +1087 -0
  69. opencrbasic/data/fnotch.json +34 -0
  70. opencrbasic/data/functions.json +1337 -0
  71. opencrbasic/data/instructions.json +4965 -0
  72. opencrbasic/data/measure.json +123 -0
  73. opencrbasic/data/mode.json +121 -0
  74. opencrbasic/data/notices_cr6.json +890 -0
  75. opencrbasic/data/pipeline_tasks.json +84 -0
  76. opencrbasic/data/settings_fields.json +322 -0
  77. opencrbasic/data/status_members.json +319 -0
  78. opencrbasic/data/status_table.json +684 -0
  79. opencrbasic/data/symbols.json +902 -0
  80. opencrbasic/data/terminals.json +195 -0
  81. opencrbasic/data/type_codes.json +249 -0
  82. opencrbasic/diagnostics.py +196 -0
  83. opencrbasic/editing.py +827 -0
  84. opencrbasic/formatting.py +310 -0
  85. opencrbasic/helpdocs.py +677 -0
  86. opencrbasic/hover.py +667 -0
  87. opencrbasic/inlay.py +169 -0
  88. opencrbasic/lexer.py +183 -0
  89. opencrbasic/lsp/__init__.py +5 -0
  90. opencrbasic/lsp/__main__.py +7 -0
  91. opencrbasic/lsp/config.py +202 -0
  92. opencrbasic/lsp/features.py +602 -0
  93. opencrbasic/lsp/server.py +741 -0
  94. opencrbasic/lsp/session.py +1189 -0
  95. opencrbasic/lsp/worker.py +128 -0
  96. opencrbasic/mode.py +143 -0
  97. opencrbasic/navigation.py +401 -0
  98. opencrbasic/parser.py +3264 -0
  99. opencrbasic/positions.py +274 -0
  100. opencrbasic/preprocess.py +269 -0
  101. opencrbasic/profiles.py +266 -0
  102. opencrbasic/provenance.py +17 -0
  103. opencrbasic/quickfix.py +331 -0
  104. opencrbasic/rename.py +662 -0
  105. opencrbasic/signature.py +33 -0
  106. opencrbasic/source.py +600 -0
  107. opencrbasic/sources.py +125 -0
  108. opencrbasic/syntax.py +337 -0
  109. opencrbasic/tables.py +2173 -0
  110. opencrbasic/tables_hook.py +14 -0
  111. opencrbasic/tdf.py +142 -0
  112. opencrbasic/timing.py +565 -0
  113. opencrbasic-1.0.0.dist-info/METADATA +223 -0
  114. opencrbasic-1.0.0.dist-info/RECORD +117 -0
  115. opencrbasic-1.0.0.dist-info/WHEEL +4 -0
  116. opencrbasic-1.0.0.dist-info/entry_points.txt +3 -0
  117. opencrbasic-1.0.0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,33 @@
1
+ {
2
+ "delay": {
3
+ "option1_limit": 86400000000
4
+ },
5
+ "tablefile": {"drives": ["CPU"], "option_mod100": true},
6
+ "string_prefixes": [
7
+ {"instr": "FILEMANAGE", "pos": 1, "prefixes": ["CPU"], "ext": "CR300", "message": "FileManage invalid drive: {drive}."},
8
+ {"instr": "RUNPROGRAM", "pos": 1, "prefixes": ["CPU"], "ext": "CR300", "message": "FileManage invalid drive: {drive}."}
9
+ ],
10
+ "const_ranges": [
11
+ {"inf_max": true, "instr": "THERM107", "pos": 5, "min": 10, "max": 2147483647, "allow": [0], "message": "Settling time {value} too short, min time is 10."},
12
+ {"inf_max": true, "instr": "THERM108", "pos": 5, "min": 10, "max": 2147483647, "allow": [0], "message": "Settling time {value} too short, min time is 10."},
13
+ {"inf_max": true, "instr": "THERM109", "pos": 5, "min": 10, "max": 2147483647, "allow": [0], "message": "Settling time {value} too short, min time is 10."},
14
+ {"inf_max": true, "instr": "VOLTSE", "pos": 6, "allow": [0], "min": 10, "max": 2147483647, "message": "Settling time {value} too short, min time is 10."},
15
+ {"inf_max": true, "instr": "VOLTSE", "pos": 6, "min": -2147483648, "max": 50000, "message": "Settling time {value} too long, max time is 50000."},
16
+ {"inf_max": true, "instr": "VOLTDIFF", "pos": 6, "allow": [0], "min": 10, "max": 2147483647, "message": "Settling time {value} too short, min time is 10."},
17
+ {"inf_max": true, "instr": "VOLTDIFF", "pos": 6, "min": -2147483648, "max": 50000, "message": "Settling time {value} too long, max time is 50000."},
18
+ {"inf_max": true, "instr": "TCSE", "pos": 8, "allow": [0], "min": 10, "max": 2147483647, "message": "Settling time {value} too short, min time is 10."},
19
+ {"inf_max": true, "instr": "TCSE", "pos": 8, "min": -2147483648, "max": 50000, "message": "Settling time {value} too long, max time is 50000."},
20
+ {"inf_max": true, "instr": "TCDIFF", "pos": 8, "allow": [0], "min": 10, "max": 2147483647, "message": "Settling time {value} too short, min time is 10."},
21
+ {"inf_max": true, "instr": "TCDIFF", "pos": 8, "min": -2147483648, "max": 50000, "message": "Settling time {value} too long, max time is 50000."},
22
+ {"inf_max": true, "instr": "BRHALF", "pos": 9, "allow": [0], "min": 10, "max": 2147483647, "message": "Settling time {value} too short, min time is 10."},
23
+ {"inf_max": true, "instr": "BRHALF", "pos": 9, "min": -2147483648, "max": 50000, "message": "Settling time {value} too long, max time is 50000."},
24
+ {"inf_max": true, "instr": "BRFULL", "pos": 10, "allow": [0], "min": 10, "max": 2147483647, "message": "Settling time {value} too short, min time is 10."},
25
+ {"inf_max": true, "instr": "BRFULL", "pos": 10, "min": -2147483648, "max": 50000, "message": "Settling time {value} too long, max time is 50000."},
26
+ {"instr": "SEMAPHOREGET", "pos": 1, "min": 1, "max": 3, "message": "Illegal Semaphore, 1..3 are legal"},
27
+ {"instr": "SEMAPHORERELEASE", "pos": 1, "min": 1, "max": 3, "message": "Illegal Semaphore, 1..3 are legal"},
28
+ {"instr": "BROADCAST", "pos": 2, "values": [0, 12, 13, 14], "message": "Illegal message type {value}"},
29
+ {"instr": "STATICROUTE", "pos": 2, "wrap16": true, "overflow": null, "min": 1, "max": 4094, "message": "Illegal neighbor address {value}, range 1..4095"},
30
+ {"instr": "STATICROUTE", "pos": 3, "show": 2, "wrap16": true, "overflow": null, "min": 1, "max": 4094, "message": "Illegal PakBus address {value}, range 1..4095"},
31
+ {"instr": "DNP", "pos": 1, "invalid_raw": {"strings": true, "nan": true}, "message": "ComPort {value} illegal."}
32
+ ]
33
+ }
@@ -0,0 +1,121 @@
1
+ {
2
+ "always_sequential": [
3
+ "SDMAO4",
4
+ "SDMAO4A",
5
+ "SDMCAN",
6
+ "SDMCD16AC",
7
+ "SDMCVO4",
8
+ "SDMIO16",
9
+ "TDR100",
10
+ "TDR200",
11
+ "WRITEIO"
12
+ ],
13
+ "task_instructions": [
14
+ "AM25T",
15
+ "BATTERY",
16
+ "BRFULL",
17
+ "BRFULL6W",
18
+ "BRHALF",
19
+ "BRHALF3W",
20
+ "BRHALF4W",
21
+ "CALIBRATE",
22
+ "CDM_BATTERY",
23
+ "CDM_BRFULL",
24
+ "CDM_BRFULL6W",
25
+ "CDM_BRHALF",
26
+ "CDM_BRHALF3W",
27
+ "CDM_BRHALF4W",
28
+ "CDM_CURRENTDIFF",
29
+ "CDM_EXCITEV",
30
+ "CDM_MUXSELECT",
31
+ "CDM_PANELTEMP",
32
+ "CDM_PERIODAVG",
33
+ "CDM_PULSEPORT",
34
+ "CDM_SW12",
35
+ "CDM_SW5",
36
+ "CDM_SWPOWER",
37
+ "CDM_TCDIFF",
38
+ "CDM_TCSE",
39
+ "CDM_THERM107",
40
+ "CDM_THERM108",
41
+ "CDM_THERM109",
42
+ "CDM_VOLTDIFF",
43
+ "CDM_VOLTSE",
44
+ "CS616",
45
+ "CS7500",
46
+ "CSAT3",
47
+ "DELAY",
48
+ "EC100",
49
+ "EXCITEI",
50
+ "EXCITEV",
51
+ "LI7200",
52
+ "LI7700",
53
+ "MUXSELECT",
54
+ "PANELTEMP",
55
+ "PERIODAVG",
56
+ "PORTGET",
57
+ "PORTSET",
58
+ "PULSECOUNT",
59
+ "PULSEPORT",
60
+ "RESISTANCE",
61
+ "SDMINT8",
62
+ "SDMSW8A",
63
+ "SDMTRIGGER",
64
+ "SDMX50",
65
+ "SERIALINRECORD",
66
+ "SERIALOUTBLOCK",
67
+ "SETDAC",
68
+ "SW12",
69
+ "TCDIFF",
70
+ "TCSE",
71
+ "TGA",
72
+ "THERM107",
73
+ "THERM108",
74
+ "THERM109",
75
+ "VIBRATINGWIRE",
76
+ "VOLTDIFF",
77
+ "VOLTSE"
78
+ ],
79
+ "nonconstant_arg": {
80
+ "CDM_EXCITEI": [
81
+ 3
82
+ ],
83
+ "CDM_EXCITEV": [
84
+ 3
85
+ ],
86
+ "CDM_MUXSELECT": [
87
+ 5
88
+ ],
89
+ "CDM_SW12": [
90
+ 3
91
+ ],
92
+ "CDM_SW5": [
93
+ 3
94
+ ],
95
+ "CDM_SWPOWER": [
96
+ 2
97
+ ],
98
+ "EXCITEI": [
99
+ 1
100
+ ],
101
+ "EXCITEV": [
102
+ 1
103
+ ],
104
+ "MUXSELECT": [
105
+ 3
106
+ ],
107
+ "PORTSET": [
108
+ 1
109
+ ],
110
+ "VIBRATINGWIRE": [
111
+ 3,
112
+ 4
113
+ ]
114
+ },
115
+ "variable_arg": {
116
+ "CDM_SW12": 4,
117
+ "CDM_SW5": 4,
118
+ "CDM_SWPOWER": 3,
119
+ "SW12": 2
120
+ }
121
+ }
@@ -0,0 +1,259 @@
1
+ {
2
+ "_comment": "Names accepted by SetSetting (`settings`) and, in addition, by SetStatus (`status`; SetStatus accepts `settings` too). Candidate names came from the compiler's own field tables (pointer arrays in the exe, see docs/instructions.md 'SetSetting and SetStatus field names') and every candidate was confirmed with the oracle (2026-10-02). Matching is case-insensitive.",
3
+ "index_size": {"BAUDRATE": 8, "SECURITY": 3},
4
+ "trim_trailing_blanks": false,
5
+ "empty_name": "(null)",
6
+ "settings": [
7
+ "StationName",
8
+ "Security",
9
+ "PakBusAddress",
10
+ "PakBusEncryptionKey",
11
+ "PakBusTCPPassword",
12
+ "CPUDriveFree",
13
+ "UTCOffset",
14
+ "PakBusWebURL",
15
+ "PakBusWebHost",
16
+ "PakBusWebHandle",
17
+ "CloudConfigURL",
18
+ "NTPServer",
19
+ "DNS",
20
+ "IsRouter",
21
+ "CommsMemAlloc",
22
+ "RouteFilters",
23
+ "CentralRouters",
24
+ "FilesManager",
25
+ "IncludeFile",
26
+ "MaxPacketSize",
27
+ "RS232Power",
28
+ "RS232Timeout",
29
+ "UDPBroadcastFilter",
30
+ "IPTraceComport",
31
+ "IPTraceCode",
32
+ "PCAP",
33
+ "EthernetInfo",
34
+ "EthernetPower",
35
+ "IPAddressEth",
36
+ "IPMaskEth",
37
+ "IPGateway",
38
+ "pppInterface",
39
+ "PPPInfo",
40
+ "pppIPAddr",
41
+ "pppIPMask",
42
+ "pppUsername",
43
+ "pppPassword",
44
+ "pppDial",
45
+ "pppDialResponse",
46
+ "HTTPEnabled",
47
+ "PakbusWebEnabled",
48
+ "FTPEnabled",
49
+ "TelnetEnabled",
50
+ "PingEnabled",
51
+ "PakBusPort",
52
+ "FTPPort",
53
+ "HTTPPort",
54
+ "FTPUserName",
55
+ "FTPPassword",
56
+ "PakBusTCPClients",
57
+ "TrustedHosts",
58
+ "TCPMSS",
59
+ "TLSConnections",
60
+ "HTTPSEnabled",
61
+ "HTTPSPort",
62
+ "TLSstatus",
63
+ "TLSPrivateKey",
64
+ "TLSCertificate",
65
+ "TLSRootCA",
66
+ "TLSPassword",
67
+ "Baudrate",
68
+ "Beacon",
69
+ "Verify",
70
+ "Neighbors",
71
+ "CellAPN",
72
+ "CellStateInt",
73
+ "CellState",
74
+ "CellRSSI",
75
+ "CellRSRP",
76
+ "CellECIO",
77
+ "CellRSRQ",
78
+ "CellInfo",
79
+ "CellStatus",
80
+ "CellUsageToday",
81
+ "CellUsageYesterday",
82
+ "CellUsageMonth",
83
+ "CellUsageLastMonth",
84
+ "CellBillingDay",
85
+ "CellDiversity",
86
+ "CellIPProtocol",
87
+ "CellRoaming",
88
+ "CellOSUpdate",
89
+ "CellModOTAUpdate",
90
+ "CellNetCellID",
91
+ "CellNetBand",
92
+ "CellPwrStartTime",
93
+ "CellPwrDuration",
94
+ "CellPwrRepeat",
95
+ "MQTTStatusInterval",
96
+ "MQTTStateInterval",
97
+ "MQTTBaseTopic",
98
+ "UID",
99
+ "MQTTEndpoint",
100
+ "MQTTPortNumber",
101
+ "MQTTClientID",
102
+ "MQTTUserName",
103
+ "MQTTPassword",
104
+ "MQTTWillTopic",
105
+ "MQTTWillMessage",
106
+ "MQTTWillQoS",
107
+ "MQTTWillRetain",
108
+ "MQTTCleanSession",
109
+ "MQTTKeepAlive",
110
+ "MQTTEnable",
111
+ "CampbellCloudEnable",
112
+ "MQTTState",
113
+ "WiFiConfig",
114
+ "WiFiStatus",
115
+ "IPAddressWiFi",
116
+ "IPGatewayWiFi",
117
+ "WLANDomainName",
118
+ "WiFiSSID",
119
+ "WiFiPassword",
120
+ "WiFiTxPowerLevel",
121
+ "WiFiPowerMode",
122
+ "WiFiEapMethod",
123
+ "WiFiEapUser",
124
+ "WiFiEapPassword",
125
+ "WiFiChannel",
126
+ "WiFiNetworks",
127
+ "RadioEnable",
128
+ "RadioNetID",
129
+ "RadioMAC",
130
+ "RadioFirmwareVer",
131
+ "RadioModuleVer",
132
+ "RadioRSSI",
133
+ "RadioRSSIAddr",
134
+ "RadioAvailFreq",
135
+ "RadioChanMask",
136
+ "RadioHopSeq",
137
+ "RadioTxLevel",
138
+ "RadioPwrMode",
139
+ "RadioRetries",
140
+ "RadioProtocol",
141
+ "GOESEnabled",
142
+ "GOESComport",
143
+ "GOESMsgWindow",
144
+ "GOESRepeatCount",
145
+ "GOESGainSetting",
146
+ "GOESPlatformID",
147
+ "GOESRTBaudRate",
148
+ "GOESRTChannel",
149
+ "GOESSTBaudRate",
150
+ "GOESSTChannel",
151
+ "GOESRTInterval",
152
+ "GOESSTInterval",
153
+ "GOESSTOffset",
154
+ "GOESid",
155
+ "GOESdateTime",
156
+ "GOESversion",
157
+ "GOESAntennaGain",
158
+ "GOESCurrentbattery",
159
+ "GOESCurrenttemperature",
160
+ "GOESbatteryBeforeTx",
161
+ "GOEStemperatureBeforeTx",
162
+ "GOESbatteryDuringTx",
163
+ "GOESLatitude",
164
+ "GOESLongitude",
165
+ "GOESAltitude",
166
+ "GOESTimeLastGPSPosition",
167
+ "GOESNumberOfMissedGPS",
168
+ "GOESTimeLastMissedGPSFix",
169
+ "GOESGPSAcquisitionStatus",
170
+ "GOESGPSAntennaStatus",
171
+ "GOESFailSafeIndicator",
172
+ "GOESDurationOfTransmit",
173
+ "GOESForwardTxPower",
174
+ "GOESReflectedRfPower",
175
+ "GOESVSWR",
176
+ "GOESLastTxControlFlags",
177
+ "GOESLastTxStartTime",
178
+ "GOESLastTxChannel",
179
+ "GOESLastTypeCode",
180
+ "GOESLastDatalength",
181
+ "GOESLastHDRFlagWord",
182
+ "GOESTxResultCode",
183
+ "GOESCurrentTxState",
184
+ "MemorySize",
185
+ "MemoryFree",
186
+ "UserStr",
187
+ "UserVal",
188
+ "DataStorageSize",
189
+ "DataStorageFree",
190
+ "IPInfo",
191
+ "ChargeBatteryType",
192
+ "TCPPort",
193
+ "PakBusNodes",
194
+ "BaudrateRS232",
195
+ "BaudrateCOM1",
196
+ "BeaconRS232",
197
+ "BeaconCOM1",
198
+ "BeaconCOMRF",
199
+ "BeaconIP",
200
+ "VerifyRS232",
201
+ "VerifyCOM1",
202
+ "VerifyCOMRF",
203
+ "VerifyIP",
204
+ "IPMaskEthWiFi",
205
+ "RadioEnabled",
206
+ "CellEnabled",
207
+ "CellPDPUsername",
208
+ "CellPDPPassword",
209
+ "CellPDPAuth",
210
+ "CellKeepAlive",
211
+ "CellKeepAliveTime",
212
+ "CellListNetOperators",
213
+ "CellNetOperator",
214
+ "CellNetAccessTech",
215
+ "USBconfig"
216
+ ],
217
+ "status": [
218
+ "OSVersion",
219
+ "OSDate",
220
+ "OSSignature",
221
+ "SerialNumber",
222
+ "RevBoard",
223
+ "ProgName",
224
+ "StartTime",
225
+ "RunSignature",
226
+ "ProgSignature",
227
+ "WatchdogErrors",
228
+ "PanelTemp",
229
+ "Battery",
230
+ "LithiumBattery",
231
+ "CompileResults",
232
+ "StartUpCode",
233
+ "ProgErrors",
234
+ "VarOutOfBound",
235
+ "SkippedScan",
236
+ "SkippedSlowScan",
237
+ "CommsMemFree",
238
+ "FullMemReset",
239
+ "MeasureTime",
240
+ "ProcessTime",
241
+ "MaxProcTime",
242
+ "LastSlowScan",
243
+ "SlowProcTime",
244
+ "MaxSlowProcTime",
245
+ "PortStatus",
246
+ "PortConfig",
247
+ "SW12Volts",
248
+ "PakBusRoutes",
249
+ "CalOffset",
250
+ "WiFiUpdateReq",
251
+ "SerialFlashErrors",
252
+ "CalGainSlow2500",
253
+ "CalGainMed2500",
254
+ "CalGainFast2500",
255
+ "CalGainSlow34",
256
+ "CalGainMed34",
257
+ "CalGainFast34"
258
+ ]
259
+ }