Began Framework start
This commit is contained in:
44
ignition/.gitignore
vendored
Normal file
44
ignition/.gitignore
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
*.gwbk
|
||||
my-db/
|
||||
frontend-gateway/config/resources/.resources
|
||||
backend-gateway/config/resources/.resources
|
||||
|
||||
|
||||
# Database files
|
||||
**/db/
|
||||
**/metricsdb/
|
||||
**/autobackup/
|
||||
**/db_backup_sqlite.idb
|
||||
**/valueStore.idb
|
||||
|
||||
# Cache and temporary files
|
||||
**/jar-cache/
|
||||
**/request
|
||||
**/response
|
||||
*.tmp
|
||||
*.bak
|
||||
**/var
|
||||
|
||||
# Log files
|
||||
*.log
|
||||
**/logs
|
||||
|
||||
# Certificates and security
|
||||
**/certificates/
|
||||
**/keystore/
|
||||
|
||||
# Runtime configuration (environment-specific)
|
||||
**/config/local
|
||||
**/config/resources/local
|
||||
|
||||
# Gateway-specific runtime files
|
||||
**/.container-init.conf
|
||||
|
||||
# Backup and converted files
|
||||
**/conversion-report.txt
|
||||
**.digest.json
|
||||
|
||||
# Project conversion artifacts
|
||||
**/projects/conversion-report.txt
|
||||
**/migration-log-*.md
|
||||
**/.resources/
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"pages": {
|
||||
"/": {
|
||||
"title": "Main",
|
||||
"viewPath": "Page/Main"
|
||||
}
|
||||
},
|
||||
"sharedDocks": {
|
||||
"cornerPriority": "top-bottom",
|
||||
"left": [],
|
||||
"top": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"files": [
|
||||
"config.json"
|
||||
],
|
||||
"overridable": true,
|
||||
"restricted": false,
|
||||
"scope": "G",
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"custom": {},
|
||||
"general": {
|
||||
"navigation": {
|
||||
"enableHistoryNavigation": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"files": [
|
||||
"props.json"
|
||||
],
|
||||
"overridable": true,
|
||||
"restricted": false,
|
||||
"scope": "G",
|
||||
"version": 1
|
||||
}
|
||||
9
ignition/project/ignition/global-props/resource.json
Normal file
9
ignition/project/ignition/global-props/resource.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"files": [
|
||||
"props.json"
|
||||
],
|
||||
"overridable": true,
|
||||
"restricted": false,
|
||||
"scope": "G",
|
||||
"version": 1
|
||||
}
|
||||
0
ignition/project/ignition/named-query/.gitkeep
Normal file
0
ignition/project/ignition/named-query/.gitkeep
Normal file
21
ignition/project/ignition/script-python/devices/code.py
Normal file
21
ignition/project/ignition/script-python/devices/code.py
Normal file
@@ -0,0 +1,21 @@
|
||||
# env: Jython 2.7 (Ignition — gateway/client script library)
|
||||
# Access via: project.devices.<function>()
|
||||
|
||||
|
||||
def getStatus(deviceTagPath):
|
||||
"""
|
||||
Read current status tags for a device UDT instance.
|
||||
deviceTagPath: str — path to the device UDT root tag
|
||||
Returns: dict with device status values
|
||||
"""
|
||||
raise NotImplementedError("getStatus not yet implemented")
|
||||
|
||||
|
||||
def sendCommand(deviceTagPath, command, value=True):
|
||||
"""
|
||||
Write a command to a device UDT instance.
|
||||
deviceTagPath: str — path to the device UDT root tag
|
||||
command: str — command member name (e.g. 'Start', 'Stop')
|
||||
value: bool/int/float — value to write
|
||||
"""
|
||||
raise NotImplementedError("sendCommand not yet implemented")
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"attributes": {
|
||||
"hintScope": 2
|
||||
},
|
||||
"files": [
|
||||
"code.py"
|
||||
],
|
||||
"overridable": true,
|
||||
"restricted": false,
|
||||
"scope": "A",
|
||||
"version": 1
|
||||
}
|
||||
22
ignition/project/ignition/script-python/testing/code.py
Normal file
22
ignition/project/ignition/script-python/testing/code.py
Normal file
@@ -0,0 +1,22 @@
|
||||
# env: Jython 2.7 (Ignition — gateway/client script library)
|
||||
# Access via: project.testing.<function>()
|
||||
|
||||
|
||||
def runScenario(scenarioPath):
|
||||
"""
|
||||
Load and execute a test scenario from the given path.
|
||||
scenarioPath: str — path to scenario JSON file or scenario ID
|
||||
Returns: dict with keys 'passed', 'results', 'errors'
|
||||
"""
|
||||
raise NotImplementedError("runScenario not yet implemented")
|
||||
|
||||
|
||||
def validateResults(expected, actual, tolerance=0.0):
|
||||
"""
|
||||
Compare actual tag values against expected outcomes.
|
||||
expected: dict — {tagPath: expectedValue}
|
||||
actual: dict — {tagPath: actualValue}
|
||||
tolerance: float — allowable numeric deviation
|
||||
Returns: dict with keys 'passed', 'failures'
|
||||
"""
|
||||
raise NotImplementedError("validateResults not yet implemented")
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"attributes": {
|
||||
"hintScope": 2
|
||||
},
|
||||
"files": [
|
||||
"code.py"
|
||||
],
|
||||
"overridable": true,
|
||||
"restricted": false,
|
||||
"scope": "A",
|
||||
"version": 1
|
||||
}
|
||||
29
ignition/project/ignition/script-python/util/code.py
Normal file
29
ignition/project/ignition/script-python/util/code.py
Normal file
@@ -0,0 +1,29 @@
|
||||
# env: Jython 2.7 (Ignition — gateway/client script library)
|
||||
# Access via: project.util.<function>()
|
||||
import json
|
||||
import system
|
||||
|
||||
|
||||
def formatTag(tagPath, value):
|
||||
"""
|
||||
Format a tag value for display or logging.
|
||||
tagPath: str — tag path (used for context)
|
||||
value: any — raw tag value
|
||||
Returns: str
|
||||
"""
|
||||
return "{}: {}".format(tagPath, value)
|
||||
|
||||
|
||||
def validateJson(jsonStr):
|
||||
"""
|
||||
Parse and validate a JSON string.
|
||||
jsonStr: str — JSON text to validate
|
||||
Returns: parsed object on success
|
||||
Raises: ValueError on invalid JSON
|
||||
"""
|
||||
try:
|
||||
return json.loads(jsonStr)
|
||||
except ValueError as e:
|
||||
logger = system.util.getLogger("util")
|
||||
logger.error("Invalid JSON: {}".format(str(e)))
|
||||
raise
|
||||
12
ignition/project/ignition/script-python/util/resource.json
Normal file
12
ignition/project/ignition/script-python/util/resource.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"attributes": {
|
||||
"hintScope": 2
|
||||
},
|
||||
"files": [
|
||||
"code.py"
|
||||
],
|
||||
"overridable": true,
|
||||
"restricted": false,
|
||||
"scope": "A",
|
||||
"version": 1
|
||||
}
|
||||
7
ignition/project/project.json
Normal file
7
ignition/project/project.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "",
|
||||
"enabled": true,
|
||||
"inheritable": false,
|
||||
"parent": "",
|
||||
"title": "Framework"
|
||||
}
|
||||
Reference in New Issue
Block a user