MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / _project

Function _project

tests/integration/test_change_driven_transforms.py:67–117  ·  view source on GitHub ↗
(change_driven: bool)

Source from the content-addressed store, hash-verified

65
66
67def _project(change_driven: bool) -> dict:
68 # Parser code/language live per-source: the loader ignores them at the top
69 # level (only the legacy "frameParser" key or a "sources" array is read).
70 return {
71 "title": "Change-driven test",
72 "changeDrivenTransforms": change_driven,
73 "frameEnd": "\n",
74 "frameDetection": 0,
75 "decoder": 0,
76 "sources": [
77 {
78 "sourceId": 0,
79 "title": "Device A",
80 "busType": 0,
81 "frameStart": "$",
82 "frameEnd": "\n",
83 "frameDetection": 0,
84 "checksumAlgorithm": "",
85 "decoderMethod": 0,
86 "frameParserCode": _PARSER,
87 "frameParserLanguage": 0,
88 "connectionSettings": {},
89 }
90 ],
91 "tables": [{"name": "T", "registers": _registers()}],
92 "groups": [
93 {
94 "title": "G",
95 "widget": "",
96 "datasets": [
97 {
98 "title": "A",
99 "value": "%1",
100 "index": 1,
101 "virtual": True,
102 "transformCode": _TX_A,
103 "transformLanguage": 0,
104 },
105 {
106 "title": "Chain",
107 "value": "%1",
108 "index": 2,
109 "virtual": True,
110 "transformCode": _TX_CHAIN,
111 "transformLanguage": 0,
112 },
113 ],
114 }
115 ],
116 "actions": [],
117 }
118
119
120def _attach(api_client, device_simulator):

Callers 4

_runMethod · 0.85
test_live_toggleMethod · 0.85

Calls 1

_registersFunction · 0.85

Tested by

no test coverage detected