mirror of
https://github.com/naruxde/revpimodio2.git
synced 2026-09-30 23:04:29 +02:00
test: Init ModIO classes
This commit is contained in:
1 parent
442071c212
commit
125f8bb4fe
9 files changed
+4662
No files matched your search
@@ -0,0 +1 @@
|
||||
{"App":{"name": "PiCtory", "version": "1.2.3","saveTS": "20170826120906","language": "en","layout": {"north":{"size":70,"initClosed":false,"initHidden":false},"south":{"size":480,"initClosed":false,"initHidden":false,"children":{"layout1":{"east":{"size":500,"initClosed":false,"initHidden":false}}}},"east":{"size":70,"initClosed":true,"initHidden":false,"children":{"layout1":{"north":{"size":100,"initClosed":false,"initHidden":false},"south":{"size":98,"initClosed":false,"initHidden":false}}}},"west":{"size":200,"initClosed":false,"initHidden":false,"children":{"layout1":{}}}}},"Summary":{"inpTotal": 338,"outTotal": 113},"Devices":[{"catalogNr": "RevPiCore","GUID": "4ebb85e8-92ea-415d-b191-cc58c2857c0a","id": "device_RevPiCore_20170404_1_2_001","type": "BASE","productType": "95","position": "0","name": "picore01","bmk": "RevPi Core V1.2","inpVariant": 0,"outVariant": 0,"comment": "This is a RevPiCore Device","offset": 0,"inp": {"0": ["RevPiStatus","0","8","0",true,"0000", "",""],"1": ["RevPiIOCycle","0","8","1",true,"0001", "",""],"2": ["RS485ErrorCnt","0","16","2",false,"0002", "",""],"3": ["Core_Temperatur","0","8","4",false,"0003", "",""],"4": ["Core_Frequency","0","8","5",false,"0004", "",""]},"out": {"0": ["RevPiLED","0","8","6",true,"0005", "",""],"1": ["RS485ErrorLimit1","10","16","7",false,"0006", "",""],"2": ["RS485ErrorLimit2","1000","16","9",false,"0007", "",""]},"mem": {},"extend": {}},{"catalogNr": "RevPiDI","GUID": "2e2c089e-6bef-14c0-852b-41b7cf48d846","id": "device_RevPiDI_20160818_1_0_001","type": "LEFT_RIGHT","productType": "97","position": "32","name": "di01","bmk": "RevPi DI","inpVariant": 0,"outVariant": 0,"comment": "","offset": 11,"inp": {"0": ["notaus_ok","0","1","0",true,"0000", "","0"],"1": ["motorschutz_ok","0","1","0",true,"0001", "","1"],"2": ["fu_ok","0","1","0",true,"0002", "","2"],"3": ["fu_motoran","0","1","0",true,"0003", "","3"],"4": ["I_5","0","1","0",true,"0004", "","4"],"5": ["I_6","0","1","0",true,"0005", "","5"],"6": ["I_7","0","1","0",true,"0006", "","6"],"7": ["I_8","0","1","0",true,"0007", "","7"],"8": ["t_automatik","0","1","0",true,"0008", "","8"],"9": ["t_start","0","1","0",true,"0009", "","9"],"10": ["t_stop","0","1","0",true,"0010", "","10"],"11": ["t_quit","0","1","0",true,"0011", "","11"],"12": ["t_notaus","0","1","0",true,"0012", "","12"],"13": ["I_14","0","1","0",true,"0013", "","13"],"14": ["I_15","0","1","0",true,"0014", "","14"],"15": ["I_16","0","1","0",true,"0015", "","15"],"16": ["Status","0","16","4",false,"0016", "",""],"17": ["Counter_1","0","32","6",false,"0017", "",""],"18": ["Counter_2","0","32","10",false,"0018", "",""],"19": ["Counter_3","0","32","14",false,"0019", "",""],"20": ["Counter_4","0","32","18",false,"0020", "",""],"21": ["Counter_5","0","32","22",false,"0021", "",""],"22": ["Counter_6","0","32","26",false,"0022", "",""],"23": ["Counter_7","0","32","30",false,"0023", "",""],"24": ["Counter_8","0","32","34",false,"0024", "",""],"25": ["Counter_9","0","32","38",false,"0025", "",""],"26": ["Counter_10","0","32","42",false,"0026", "",""],"27": ["Counter_11","0","32","46",false,"0027", "",""],"28": ["Counter_12","0","32","50",false,"0028", "",""],"29": ["Counter_13","0","32","54",false,"0029", "",""],"30": ["Counter_14","0","32","58",false,"0030", "",""],"31": ["Counter_15","0","32","62",false,"0031", "",""],"32": ["Counter_16","0","32","66",false,"0032", "",""],"33": ["Output_Status","0","16","2",false,"0050", "",""]},"out": {"0": ["Output","0","16","70",false,"0051", "",""],"1": ["PWM_1","0","8","72",false,"0052", "",""],"2": ["PWM_2","0","8","73",false,"0053", "",""],"3": ["PWM_3","0","8","74",false,"0054", "",""],"4": ["PWM_4","0","8","75",false,"0055", "",""],"5": ["PWM_5","0","8","76",false,"0056", "",""],"6": ["PWM_6","0","8","77",false,"0057", "",""],"7": ["PWM_7","0","8","78",false,"0058", "",""],"8": ["PWM_8","0","8","79",false,"0059", "",""],"9": ["PWM_9","0","8","80",false,"0060", "",""],"10": ["PWM_10","0","8","81",false,"0061", "",""],"11": ["PWM_11","0","8","82",false,"0062", "",""],"12": ["PWM_12","0","8","83",false,"0063", "",""],"13": ["PWM_13","0","8","84",false,"0064", "",""],"14": ["PWM_14","0","8","85",false,"0065", "",""],"15": ["PWM_15","0","8","86",false,"0066", "",""],"16": ["PWM_16","0","8","87",false,"0067", "",""]},"mem": {"0": ["InputMode_1","0","8","88",false,"0033", "",""],"1": ["InputMode_2","0","8","89",false,"0034", "",""],"2": ["InputMode_3","0","8","90",false,"0035", "",""],"3": ["InputMode_4","0","8","91",false,"0036", "",""],"4": ["InputMode_5","0","8","92",false,"0037", "",""],"5": ["InputMode_6","0","8","93",false,"0038", "",""],"6": ["InputMode_7","0","8","94",false,"0039", "",""],"7": ["InputMode_8","0","8","95",false,"0040", "",""],"8": ["InputMode_9","0","8","96",false,"0041", "",""],"9": ["InputMode_10","0","8","97",false,"0042", "",""],"10": ["InputMode_11","0","8","98",false,"0043", "",""],"11": ["InputMode_12","0","8","99",false,"0044", "",""],"12": ["InputMode_13","0","8","100",false,"00Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
{
"App": {
"name": "PiCtory",
"version": "1.4.7",
"saveTS": "20210727132341",
"language": "en",
"layout": {
"north": {
"size": 70,
"initClosed": false,
"initHidden": false
},
"south": {
"size": 200,
"initClosed": false,
"initHidden": false,
"children": {
"layout1": {
"east": {
"size": 500,
"initClosed": false,
"initHidden": false
}
}
}
},
"east": {
"size": 70,
"initClosed": true,
"initHidden": false,
"children": {}
},
"west": {
"size": 256,
"initClosed": false,
"initHidden": false,
"children": {
"layout1": {}
}
}
}
},
"Summary": {
"inpTotal": 876,
"outTotal": 711
},
"Devices": [
{
"GUID": "429edcc7-77c0-17ad-7228-4aad4b89ce0c",
"id": "device_RevPiDIO_20160818_1_0_001",
"type": "LEFT_RIGHT",
"productType": "96",
"position": "31",
"name": "RevPi DIO",
"bmk": "RevPi DIO",
"inpVariant": 0,
"outVariant": 0,
"comment": "",
"offset": 0,
"inp": {
"0": [
"I_Start",
"0",
"1",
"0",
false,
"0000",
"",
"0"
],
"1": [
"I_Mode1",
"0",
"1",
"0",
false,
"0001",
"",
"1"
],
"2": [
"I_Mode2",
"0",
"1",
"0",
false,
"0002",
"",
"2"
],
"3": [
"I_EmergStop",
"0",
"1",
"0",
false,
"0003",
"",
"3"
],
"4": [
"I_5",
"0",
"1",
"0",
false,
"0004",
"",
"4"
],
"5": [
"I_6",
"0",
"1",
"0",
false,
"0005",
"",
"5"
],
"6": [
"I_7",
"0",
"1",
"0",
false,
"0006",
"",
"6"
],
"7": [
"I_8",
"0",
"1",
"0",
false,
"0007",
"",
"7"
],
"8": [
"I_9",
"0",
"1",
"0",
false,
"0008",
"",
"8"
],
"9": [
"I_10",
"0",
"1",
"0",
false,
"0009",
"",
"9"
],
"10": [
"I_11",
"0",
"1",
"0",
false,
"0010",
"",
"10"
],
"11": [
"I_12",
"0",
"1",
"0",
false,
"0011",
"",
"11"
],
"12": [
"I_13",
"0",
"1",
"0",
false,
"0012",
"",
"12"
],
"13": [
"I_14",
"0",
"1",
"0",
false,
"0013",
"",
"13"
],
"14": [
"I_15",
"0",
"1",
"0",
false,
"0014",
"",
"14"
],
"15": [
"I_16",
"0",
"1",
"0",
false,
"0015",
"",
"15"
],
"16": [
"Output_Status",
"0",
"16",
"2",
false,
"0016",
"",
""
],
"17": [
"Status",
"0",
"16",
"4",
false,
"0017",
"",
""
],
"18": [
"Counter_1",
"0",
"32",
"6",
false,
"0018",
"",
""
],
"19": [
"Counter_2",
"0",
"32",
"10",
false,
"0019",
"",
""
],
"20": [
"Counter_3",
"0",
"32",
"14",
false,
"0020",
"",
""
],
"21": [
"Counter_4",
"0",
"32",
"18",
false,
"0021",
"",
""
],
"22": [
"Counter_5",
"0",
"32",
"22",
false,
"0022",
"",
""
],
"23": [
"Counter_6",
"0",
"32",
"26",
false,
"0023",
"",
""
],
"24": [
Line truncated
|
||||
File diff suppressed because it is too large.
Load diff
Whitespace-only changes.
@@ -0,0 +1 @@
|
||||
{"App":{"name": "PiCtory", "version": "1.2.3","saveTS": "20170826120906","language": "en","layout": {"north":{"size":70,"initClosed":false,"initHidden":false},"south":{"size":480,"initClosed":false,"initHidden":false,"children":{"layout1":{"east":{"size":500,"initClosed":false,"initHidden":false}}}},"east":{"size":70,"initClosed":true,"initHidden":false,"children":{"layout1":{"north":{"size":100,"initClosed":false,"initHidden":false},"south":{"size":98,"initClosed":false,"initHidden":false}}}},"west":{"size":200,"initClosed":false,"initHidden":false,"children":{"layout1":{}}}}},"Summary":{"inpTotal": 338,"outTotal": 113},"Devices":[{"catalogNr": "RevPiCore","GUID": "4ebb85e8-92ea-415d-b191-cc58c2857c0a","id": "device_RevPiCore_20170404_1_2_001","type": "BASE","productType": "95","position": "0","name": "picore01","bmk": "RevPi Core V1.2","inpVariant": 0,"outVariant": 0,"comment": "This is a RevPiCore Device","offset": 0,"inp": {"0": ["RevPiStatus","0","8","0",true,"0000", "",""],"1": ["RevPiIOCycle","0","8","1",true,"0001", "",""],"2": ["RS485ErrorCnt","0","16","2",false,"0002", "",""],"3": ["Core_Temperatur","0","8","4",false,"0003", "",""],"4": ["Core_Frequency","0","8","5",false,"0004", "",""]},"out": {"0": ["RevPiLED","0","8","6",true,"0005", "",""],"1": ["RS485ErrorLimit1","10","16","7",false,"0006", "",""],"2": ["RS485ErrorLimit2","1000","16","9",false,"0007", "",""]},"mem": {},"extend": {}},{"catalogNr": "RevPiDI","GUID": "2e2c089e-6bef-14c0-852b-41b7cf48d846","id": "device_RevPiDI_20160818_1_0_001","type": "LEFT_RIGHT","productType": "97","position": "32","name": "di01","bmk": "RevPi DI","inpVariant": 0,"outVariant": 0,"comment": "","offset": 11,"inp": {"0": ["notaus_ok",null,"1","0",true,"0000", "","0"],"1": ["motorschutz_ok","null","1","0",true,"0001", "","1"],"2": ["fu_ok","0","1","0",true,"0002", "","2"],"3": ["fu_motoran","0","1","0",true,"0003", "","3"],"4": ["I_5","0","1","0",true,"0004", "","4"],"5": ["I_6","0","1","0",true,"0005", "","5"],"6": ["I_7","0","1","0",true,"0006", "","6"],"7": ["I_8","0","1","0",true,"0007", "","7"],"8": ["t_automatik","0","1","0",true,"0008", "","8"],"9": ["t_start","0","1","0",true,"0009", "","9"],"10": ["t_stop","0","1","0",true,"0010", "","10"],"11": ["t_quit","0","1","0",true,"0011", "","11"],"12": ["t_notaus","0","1","0",true,"0012", "","12"],"13": ["I_14","0","1","0",true,"0013", "","13"],"14": ["I_15","0","1","0",true,"0014", "","14"],"15": ["I_16","0","1","0",true,"0015", "","15"],"16": ["Status","0","16","4",false,"0016", "",""],"17": ["Counter_1","0","32","6",false,"0017", "",""],"18": ["Counter_2","0","32","10",false,"0018", "",""],"19": ["Counter_3","0","32","14",false,"0019", "",""],"20": ["Counter_4","0","32","18",false,"0020", "",""],"21": ["Counter_5","0","32","22",false,"0021", "",""],"22": ["Counter_6","0","32","26",false,"0022", "",""],"23": ["Counter_7","0","32","30",false,"0023", "",""],"24": ["Counter_8","0","32","34",false,"0024", "",""],"25": ["Counter_9","0","32","38",false,"0025", "",""],"26": ["Counter_10","0","32","42",false,"0026", "",""],"27": ["Counter_11","0","32","46",false,"0027", "",""],"28": ["Counter_12","0","32","50",false,"0028", "",""],"29": ["Counter_13","0","32","54",false,"0029", "",""],"30": ["Counter_14","0","32","58",false,"0030", "",""],"31": ["Counter_15","0","32","62",false,"0031", "",""],"32": ["Counter_16","0","32","66",false,"0032", "",""],"33": ["Output_Status","0","16","2",false,"0050", "",""]},"out": {"0": ["Output","0","16","70",false,"0051", "",""],"1": ["PWM_1","0","8","72",false,"0052", "",""],"2": ["PWM_2","0","8","73",false,"0053", "",""],"3": ["PWM_3","0","8","74",false,"0054", "",""],"4": ["PWM_4","0","8","75",false,"0055", "",""],"5": ["PWM_5","0","8","76",false,"0056", "",""],"6": ["PWM_6","0","8","77",false,"0057", "",""],"7": ["PWM_7","0","8","78",false,"0058", "",""],"8": ["PWM_8","0","8","79",false,"0059", "",""],"9": ["PWM_9","0","8","80",false,"0060", "",""],"10": ["PWM_10","0","8","81",false,"0061", "",""],"11": ["PWM_11","0","8","82",false,"0062", "",""],"12": ["PWM_12","0","8","83",false,"0063", "",""],"13": ["PWM_13","0","8","84",false,"0064", "",""],"14": ["PWM_14","0","8","85",false,"0065", "",""],"15": ["PWM_15","0","8","86",false,"0066", "",""],"16": ["PWM_16","0","8","87",false,"0067", "",""]},"mem": {"0": ["InputMode_1","0","8","88",false,"0033", "",""],"1": ["InputMode_2","0","8","89",false,"0034", "",""],"2": ["InputMode_3","0","8","90",false,"0035", "",""],"3": ["InputMode_4","0","8","91",false,"0036", "",""],"4": ["InputMode_5","0","8","92",false,"0037", "",""],"5": ["InputMode_6","0","8","93",false,"0038", "",""],"6": ["InputMode_7","0","8","94",false,"0039", "",""],"7": ["InputMode_8","0","8","95",false,"0040", "",""],"8": ["InputMode_9","0","8","96",false,"0041", "",""],"9": ["InputMode_10","0","8","97",false,"0042", "",""],"10": ["InputMode_11","0","8","98",false,"0043", "",""],"11": ["InputMode_12","0","8","99",false,"0044", "",""],"12": ["InputMode_13","0","8","100",falseLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
{"App":{"name": "RevolutionPi Configurator", "version": "1.0","language": "en","layout": {"north":{"size":50,"initClosed":false,"initHidden":false},"south":{"size":393,"initClosed":false,"initHidden":false,"children":{"layout1":{"east":{"size":844,"initClosed":false,"initHidden":false}}}},"east":{"size":200,"initClosed":true,"initHidden":false,"children":{"layout1":{"north":{"size":100,"initClosed":false,"initHidden":false},"south":{"size":98,"initClosed":false,"initHidden":false}}}},"west":{"size":381,"initClosed":false,"initHidden":false,"children":{"layout1":{"south":{"size":53,"initClosed":false,"initHidden":false}}}}}},"Summary":{"inpTotal": 679,"outTotal": 627},"Devices":[{"catalogNr": "RevPiCore","id": "device_RevPiCore_20160818_1_0_001","type": "BASE","productType": "95","position": "0","name": "RevPi Core","bmk": "RevPi Core","inpVariant": 0,"outVariant": 0,"comment": "This is a RevPiCore Device","offset": 0,"inp": {"0": ["RevPiStatus","0","8","0",true,"0000", "",""]},"out": {"0": ["RevPiLED","0","8","1",true,"0001", "",""]},"mem": {}},{"catalogNr": "RevPiDIO","id": "device_RevPiDIO_20160818_1_0_001","type": "LEFT_RIGHT","productType": "96","position": "32","name": "RevPi DIO","bmk": "RevPi DIO","inpVariant": 0,"outVariant": 0,"comment": "","offset": 2,"inp": {"0": ["t_aus","0","1","0",true,"0000", "","0"],"1": ["t_an","0","1","0",true,"0001", "","1"],"2": ["t_links","0","1","0",true,"0002", "","2"],"3": ["t_rechts","0","1","0",true,"0003", "","3"],"4": ["t_hoch","0","1","0",true,"0004", "","4"],"5": ["t_runter","0","1","0",true,"0005", "","5"],"6": ["t_blau","0","1","0",true,"0006", "","6"],"7": ["t_rot","0","1","0",true,"0007", "","7"],"8": ["Input_Pin_9","0","1","0",true,"0008", "","8"],"9": ["Input_Pin_10","0","1","0",true,"0009", "","9"],"10": ["Input_Pin_11","0","1","0",true,"0010", "","10"],"11": ["Input_Pin_12","0","1","0",true,"0011", "","11"],"12": ["Input_Pin_13","0","1","0",true,"0012", "","12"],"13": ["Input_Pin_14","0","1","0",true,"0013", "","13"],"14": ["Input_Pin_15","0","1","0",true,"0014", "","14"],"15": ["Input_Pin_16","0","1","0",true,"0015", "","15"],"16": ["Output_Status","0","16","2",false,"0016", "",""],"17": ["Status","0","16","4",false,"0017", "",""],"18": ["Counter_1","0","32","6",false,"0018", "",""],"19": ["Counter_2","0","32","10",false,"0019", "",""],"20": ["Counter_3","0","32","14",false,"0020", "",""],"21": ["Counter_4","0","32","18",false,"0021", "",""],"22": ["Counter_5","0","32","22",false,"0022", "",""],"23": ["Counter_6","0","32","26",false,"0023", "",""],"24": ["Counter_7","0","32","30",false,"0024", "",""],"25": ["Counter_8","0","32","34",false,"0025", "",""],"26": ["Counter_9","0","32","38",false,"0026", "",""],"27": ["Counter_10","0","32","42",false,"0027", "",""],"28": ["Counter_11","0","32","46",false,"0028", "",""],"29": ["Counter_12","0","32","50",false,"0029", "",""],"30": ["Counter_13","0","32","54",false,"0030", "",""],"31": ["Counter_14","0","32","58",false,"0031", "",""],"32": ["Counter_15","0","32","62",false,"0032", "",""],"33": ["Counter_16","0","32","66",false,"0033", "",""]},"out": {"0": ["O_1","0","1","70",true,"0034", "","0"],"1": ["O_2","0","1","70",true,"0035", "","1"],"2": ["O_3","0","1","70",true,"0036", "","2"],"3": ["O_4","0","1","70",true,"0037", "","3"],"4": ["O_5","0","1","70",true,"0038", "","4"],"5": ["O_6","0","1","70",true,"0039", "","5"],"6": ["O_7","0","1","70",true,"0040", "","6"],"7": ["O_8","0","1","70",true,"0041", "","7"],"8": ["h_an","0","1","70",true,"0042", "","8"],"9": ["h_richtung","0","1","70",true,"0043", "","9"],"10": ["h_hoch","0","1","70",true,"0044", "","10"],"11": ["h_runter","0","1","70",true,"0045", "","11"],"12": ["h_blau","0","1","70",true,"0046", "","12"],"13": ["h_rot","0","1","70",true,"0047", "","13"],"14": ["Output_Pin_15","0","1","70",true,"0048", "","14"],"15": ["Output_Pin_16","0","1","70",true,"0049", "","15"],"16": ["PWM_1","0","8","72",false,"0050", "",""],"17": ["PWM_2","0","8","73",false,"0051", "",""],"18": ["PWM_3","0","8","74",false,"0052", "",""],"19": ["PWM_4","0","8","75",false,"0053", "",""],"20": ["PWM_5","0","8","76",false,"0054", "",""],"21": ["PWM_6","0","8","77",false,"0055", "",""],"22": ["PWM_7","0","8","78",false,"0056", "",""],"23": ["PWM_8","0","8","79",false,"0057", "",""],"24": ["PWM_9","0","8","80",false,"0058", "",""],"25": ["PWM_10","0","8","81",false,"0059", "",""],"26": ["PWM_11","0","8","82",false,"0060", "",""],"27": ["PWM_12","0","8","83",false,"0061", "",""],"28": ["PWM_13","0","8","84",false,"0062", "",""],"29": ["PWM_14","0","8","85",false,"0063", "",""],"30": ["PWM_15","0","8","86",false,"0064", "",""],"31": ["PWM_16","0","8","87",false,"0065", "",""]},"mem": {"0": ["InputMode_1","0","8","88",false,"0066", "",""],"1": ["InputMode_2","0","8","89",false,"0067", "",""],"2": ["InputMode_3","0","8","90",false,"0068", "",""],"3": ["InputMode_4","0","8","91",false,"0069", "",""],"4": ["InputMode_5","0","8","92",false,"0070", "",""],"5": ["InputMode_6","0","8","93",falLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
{"App":{"name": "PiCtory", "version": "1.2.5","saveTS": "20171108151243","language": "en","layout": {"north":{"size":70,"initClosed":false,"initHidden":false},"south":{"size":325,"initClosed":false,"initHidden":false,"children":{"layout1":{"east":{"size":500,"initClosed":false,"initHidden":false}}}},"east":{"size":0,"initClosed":true,"initHidden":false,"children":{}},"west":{"size":313,"initClosed":false,"initHidden":false,"children":{"layout1":{}}}}},"Summary":{"inpTotal": 618,"outTotal": 567},"Devices":[{"catalogNr": "RevPiCore","GUID": "ae718ac0-90ba-69fb-1a35-06850c1a920e","id": "device_RevPiCore_20170210_1_1_001","type": "BASE","productType": "95","position": "0","name": "revpicore","bmk": "RevPi Core V1.1","inpVariant": 0,"outVariant": 0,"comment": "This is a RevPiCore Device","offset": 0,"inp": {"0": ["RevPiStatus","0","8","0",true,"0000", "",""],"1": ["RevPiIOCycle","0","8","1",true,"0001", "",""],"2": ["RS485ErrorCnt","0","16","2",false,"0002", "",""]},"out": {"0": ["RevPiLED","0","8","4",true,"0003", "",""],"1": ["RS485ErrorLimit1","10","16","5",false,"0004", "",""],"2": ["RS485ErrorLimit2","1000","16","7",false,"0005", "",""]},"mem": {},"extend": {}},{"catalogNr": "RevPiDIO","GUID": "d5f2dbc8-05d9-0a85-4c19-b9cd5d3517a9","id": "device_RevPiDIO_20160818_1_0_001","type": "LEFT_RIGHT","productType": "96","position": "32","name": "dio01","bmk": "RevPi DIO","inpVariant": 0,"outVariant": 0,"comment": "","offset": 9,"inp": {"0": ["t_aus","0","1","0",true,"0000", "","0"],"1": ["t_an","0","1","0",true,"0001", "","1"],"2": ["t_links","0","1","0",true,"0002", "","2"],"3": ["t_rechts","0","1","0",true,"0003", "","3"],"4": ["t_hoch","0","1","0",true,"0004", "","4"],"5": ["t_runter","0","1","0",true,"0005", "","5"],"6": ["t_blau","0","1","0",true,"0006", "","6"],"7": ["t_rot","0","1","0",true,"0007", "","7"],"8": ["I_9","0","1","0",true,"0008", "","8"],"9": ["I_10","0","1","0",true,"0009", "","9"],"10": ["I_11","0","1","0",true,"0010", "","10"],"11": ["I_12","0","1","0",true,"0011", "","11"],"12": ["I_13","0","1","0",true,"0012", "","12"],"13": ["I_14","0","1","0",true,"0013", "","13"],"14": ["I_15","0","1","0",true,"0014", "","14"],"15": ["I_16","0","1","0",true,"0015", "","15"],"16": ["Output_Status","0","16","2",false,"0016", "",""],"17": ["Status","0","16","4",false,"0017", "",""],"18": ["Counter_1","0","32","6",false,"0018", "",""],"19": ["Counter_2","0","32","10",false,"0019", "",""],"20": ["Counter_3","0","32","14",false,"0020", "",""],"21": ["Counter_4","0","32","18",false,"0021", "",""],"22": ["Counter_5","0","32","22",false,"0022", "",""],"23": ["Counter_6","0","32","26",false,"0023", "",""],"24": ["Counter_7","0","32","30",false,"0024", "",""],"25": ["Counter_8","0","32","34",false,"0025", "",""],"26": ["Counter_9","0","32","38",false,"0026", "",""],"27": ["Counter_10","0","32","42",false,"0027", "",""],"28": ["Counter_11","0","32","46",false,"0028", "",""],"29": ["Counter_12","0","32","50",false,"0029", "",""],"30": ["Counter_13","0","32","54",false,"0030", "",""],"31": ["Counter_14","0","32","58",false,"0031", "",""],"32": ["Counter_15","0","32","62",false,"0032", "",""],"33": ["Counter_16","0","32","66",false,"0033", "",""]},"out": {"0": ["h_an","0","1","70",true,"0034", "","0"],"1": ["h_richtung","0","1","70",true,"0035", "","1"],"2": ["h_hoch","0","1","70",true,"0036", "","2"],"3": ["h_runter","0","1","70",true,"0037", "","3"],"4": ["h_blau","0","1","70",true,"0038", "","4"],"5": ["h_rot","0","1","70",true,"0039", "","5"],"6": ["O_7","0","1","70",true,"0040", "","6"],"7": ["O_8","0","1","70",true,"0041", "","7"],"8": ["O_9","0","1","70",true,"0042", "","8"],"9": ["O_10","0","1","70",true,"0043", "","9"],"10": ["O_11","0","1","70",true,"0044", "","10"],"11": ["O_12","0","1","70",true,"0045", "","11"],"12": ["O_13","0","1","70",true,"0046", "","12"],"13": ["O_14","0","1","70",true,"0047", "","13"],"14": ["O_15","0","1","70",true,"0048", "","14"],"15": ["O_16","0","1","70",true,"0049", "","15"],"16": ["PWM_1","0","8","72",false,"0050", "",""],"17": ["PWM_2","0","8","73",false,"0051", "",""],"18": ["PWM_3","0","8","74",false,"0052", "",""],"19": ["PWM_4","0","8","75",false,"0053", "",""],"20": ["PWM_5","0","8","76",false,"0054", "",""],"21": ["PWM_6","0","8","77",false,"0055", "",""],"22": ["PWM_7","0","8","78",false,"0056", "",""],"23": ["PWM_8","0","8","79",false,"0057", "",""],"24": ["PWM_9","0","8","80",false,"0058", "",""],"25": ["PWM_10","0","8","81",false,"0059", "",""],"26": ["PWM_11","0","8","82",false,"0060", "",""],"27": ["PWM_12","0","8","83",false,"0061", "",""],"28": ["PWM_13","0","8","84",false,"0062", "",""],"29": ["PWM_14","0","8","85",false,"0063", "",""],"30": ["PWM_15","0","8","86",false,"0064", "",""],"31": ["PWM_16","0","8","87",false,"0065", "",""]},"mem": {"0": ["InputMode_1","0","8","88",false,"0066", "",""],"1": ["InputMode_2","0","8","89",false,"0067", "",""],"2": ["InputMode_3","0","8","90",false,"0068", "",""],"3": ["InputMode_4","0","8","91",false,"0069", "",""],"4": Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
{"App":{"name": "RevolutionPi Configurator", "version": "1.0","language": "en","layout": {"north":{"size":50,"initClosed":false,"initHidden":false},"south":{"size":393,"initClosed":false,"initHidden":false,"children":{"layout1":{"east":{"size":844,"initClosed":false,"initHidden":false}}}},"east":{"size":200,"initClosed":true,"initHidden":false,"children":{"layout1":{"north":{"size":100,"initClosed":false,"initHidden":false},"south":{"size":98,"initClosed":false,"initHidden":false}}}},"west":{"size":381,"initClosed":false,"initHidden":false,"children":{"layout1":{"south":{"size":53,"initClosed":false,"initHidden":false}}}}}},"Summary":{"inpTotal": 679,"outTotal": 627},"Devices":[{"catalogNr": "RevPiCore","id": "device_RevPiCore_20160818_1_0_001","type": "BASE","productType": "95","position": "0","name": "RevPi Core","bmk": "RevPi Core","inpVariant": 0,"outVariant": 0,"comment": "This is a RevPiCore Device","offset": 0,"inp": {"0": ["RevPiStatus","0","8","0",true,"0000", "",""]},"out": {"0": ["RevPiLED","0","8","1",true,"0001", "",""]},"mem": {}},{"catalogNr": "RevPiDIO","id": "device_RevPiDIO_20160818_1_0_001","type": "LEFT_RIGHT","productType": "96","position": "32","name": "RevPi DIO","bmk": "RevPi DIO","inpVariant": 0,"outVariant": 0,"comment": "","offset": 2,"inp": {"0": ["t_aus","0","1","0",true,"0000", "","0"],"1": ["t_an","0","1","0",true,"0001", "","1"],"2": ["t_links","0","1","0",true,"0002", "","2"],"3": ["t_rechts","0","1","0",true,"0003", "","3"],"4": ["t_hoch","0","1","0",true,"0004", "","4"],"5": ["t_runter","0","1","0",true,"0005", "","5"],"6": ["t_blau","0","1","0",true,"0006", "","6"],"7": ["t_rot","0","1","0",true,"0007", "","7"],"8": ["Input_Pin_9","0","1","0",true,"0008", "","8"],"9": ["Input_Pin_10","0","1","0",true,"0009", "","9"],"10": ["Input_Pin_11","0","1","0",true,"0010", "","10"],"11": ["Input_Pin_12","0","1","0",true,"0011", "","11"],"12": ["Input_Pin_13","0","1","0",true,"0012", "","12"],"13": ["Input_Pin_14","0","1","0",true,"0013", "","13"],"14": ["Input_Pin_15","0","1","0",true,"0014", "","14"],"15": ["Input_Pin_16","0","1","0",true,"0015", "","15"],"16": ["Output_Status","0","16","2",false,"0016", "",""],"17": ["Status","0","16","4",false,"0017", "",""],"18": ["Counter_1","0","32","6",false,"0018", "",""],"19": ["Counter_2","0","32","10",false,"0019", "",""],"20": ["Counter_3","0","32","14",false,"0020", "",""],"21": ["Counter_4","0","32","18",false,"0021", "",""],"22": ["Counter_5","0","32","22",false,"0022", "",""],"23": ["Counter_6","0","32","26",false,"0023", "",""],"24": ["Counter_7","0","32","30",false,"0024", "",""],"25": ["Counter_8","0","32","34",false,"0025", "",""],"26": ["Counter_9","0","32","38",false,"0026", "",""],"27": ["Counter_10","0","32","42",false,"0027", "",""],"28": ["Counter_11","0","32","46",false,"0028", "",""],"29": ["Counter_12","0","32","50",false,"0029", "",""],"30": ["Counter_13","0","32","54",false,"0030", "",""],"31": ["Counter_14","0","32","58",false,"0031", "",""],"32": ["Counter_15","0","32","62",false,"0032", "",""],"33": ["Counter_16","0","32","66",false,"0033", "",""]},"out": {"0": ["O_1","0","1","70",true,"0034", "","0"],"1": ["O_2","0","1","70",true,"0035", "","1"],"2": ["O_3","0","1","70",true,"0036", "","2"],"3": ["O_4","0","1","70",true,"0037", "","3"],"4": ["O_5","0","1","70",true,"0038", "","4"],"5": ["O_6","0","1","70",true,"0039", "","5"],"6": ["O_7","0","1","70",true,"0040", "","6"],"7": ["O_8","0","1","70",true,"0041", "","7"],"8": ["h_an","0","1","70",true,"0042", "","8"],"9": ["h_richtung","0","1","70",true,"0043", "","9"],"10": ["h_hoch","0","1","70",true,"0044", "","10"],"11": ["h_runter","0","1","70",true,"0045", "","11"],"12": ["h_blau","0","1","70",true,"0046", "","12"],"13": ["h_rot","0","1","70",true,"0047", "","13"],"14": ["Output_Pin_15","0","1","70",true,"0048", "","14"],"15": ["Output_Pin_16","0","1","70",true,"0049", "","15"],"16": ["PWM_1","0","8","72",false,"0050", "",""],"17": ["PWM_2","0","8","73",false,"0051", "",""],"18": ["PWM_3","0","8","74",false,"0052", "",""],"19": ["PWM_4","0","8","75",false,"0053", "",""],"20": ["PWM_5","0","8","76",false,"0054", "",""],"21": ["PWM_6","0","8","77",false,"0055", "",""],"22": ["PWM_7","0","8","78",false,"0056", "",""],"23": ["PWM_8","0","8","79",false,"0057", "",""],"24": ["PWM_9","0","8","80",false,"0058", "",""],"25": ["PWM_10","0","8","81",false,"0059", "",""],"26": ["PWM_11","0","8","82",false,"0060", "",""],"27": ["PWM_12","0","8","83",false,"0061", "",""],"28": ["PWM_13","0","8","84",false,"0062", "",""],"29": ["PWM_14","0","8","85",false,"0063", "",""],"30": ["PWM_15","0","8","86",false,"0064", "",""],"31": ["PWM_16","0","8","87",false,"0065", "",""]},"mem": {"0": ["InputMode_1","0","8","88",false,"0066", "",""],"1": ["InputMode_2","0","8","89",false,"0067", "",""],"2": ["InputMode_3","0","8","90",false,"0068", "",""],"3": ["InputMode_4","0","8","91",false,"0069", "",""],"4": ["InputMode_5","0","8","92",false,"0070", "",""],"5": ["InputMode_6","0","8","93",falLine truncated
|
||||
@@ -0,0 +1,139 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""Tests instantiation all local classes."""
|
||||
__author__ = "Sven Sager"
|
||||
__copyright__ = "Copyright (C) 2024 Sven Sager"
|
||||
__license__ = "GPLv2"
|
||||
|
||||
from os import remove
|
||||
from os.path import join, dirname
|
||||
from shutil import copyfile
|
||||
|
||||
import revpimodio2
|
||||
from tests import TestRevPiModIO
|
||||
|
||||
|
||||
class TestInitModio(TestRevPiModIO):
|
||||
|
||||
data_dir = dirname(__file__)
|
||||
|
||||
def test_init_classes(self):
|
||||
"""Tests instantiation."""
|
||||
with self.assertRaises(RuntimeError):
|
||||
revpimodio2.RevPiModIO(
|
||||
procimg=self.fh_procimg.name,
|
||||
configrsc="/opt/KUNBUS/config_lock.rsc",
|
||||
)
|
||||
|
||||
# Prepare default args for direct ModIO classes
|
||||
defaultkwargs = {
|
||||
"procimg": self.fh_procimg.name,
|
||||
"configrsc": join(self.data_dir, "config.rsc"),
|
||||
}
|
||||
|
||||
# Datei an richtigen Ort kopieren und löschen
|
||||
copyfile(defaultkwargs["configrsc"], "/opt/KUNBUS/config.rsc")
|
||||
rpi = revpimodio2.RevPiModIO(procimg=self.fh_procimg.name)
|
||||
del rpi
|
||||
remove("/opt/KUNBUS/config.rsc")
|
||||
|
||||
# RevPiModIO
|
||||
rpi = self.modio()
|
||||
del rpi
|
||||
rpi = self.modio(autorefresh=True)
|
||||
rpi.cleanup()
|
||||
del rpi
|
||||
rpi = self.modio(monitoring=True)
|
||||
del rpi
|
||||
rpi = self.modio(syncoutputs=False)
|
||||
del rpi
|
||||
rpi = self.modio(simulator=True)
|
||||
del rpi
|
||||
|
||||
# Init with old config.rsc and same device names
|
||||
with self.assertWarnsRegex(Warning, r"equal device name '.*' in pictory configuration."):
|
||||
rpi = self.modio(configrsc="config_old.rsc")
|
||||
self.assertEqual(rpi.device.virt01.position, 64)
|
||||
self.assertEqual(rpi.device["virt01"].position, 64)
|
||||
self.assertEqual(len(rpi.device), 6)
|
||||
del rpi
|
||||
|
||||
# Init with unknown DeviceType
|
||||
with self.assertWarnsRegex(Warning, r"device type 'XXX' on position 64 unknown"):
|
||||
rpi = self.modio(configrsc="config_unknown.rsc")
|
||||
self.assertEqual(len(rpi.device), 5)
|
||||
del rpi
|
||||
|
||||
# Init with empty config
|
||||
with self.assertRaises(RuntimeError):
|
||||
self.modio(configrsc="config_empty.rsc")
|
||||
|
||||
# Init with RevPi 1.1
|
||||
rpi = self.modio(configrsc="config_rpi11.rsc")
|
||||
self.assertEqual(len(rpi.device), 4)
|
||||
del rpi
|
||||
|
||||
# Init with 'null' JSON
|
||||
rpi = self.modio(configrsc="config_null.rsc")
|
||||
# notaus_ok null
|
||||
# motorschutz_ok "null"
|
||||
self.assertFalse(rpi.io.notaus_ok._defaultvalue)
|
||||
self.assertFalse(rpi.io.motorschutz_ok._defaultvalue)
|
||||
# self.assertEqual(len(rpi.device), 4)
|
||||
del rpi
|
||||
|
||||
# RevPiModIOSelected
|
||||
rpi = revpimodio2.RevPiModIOSelected([32, 33], **defaultkwargs)
|
||||
self.assertEqual(2, len(rpi.device))
|
||||
del rpi
|
||||
with self.assertRaises(revpimodio2.errors.DeviceNotFoundError):
|
||||
# Liste mit einem ungültigen Device als <class 'list'>
|
||||
rpi = revpimodio2.RevPiModIOSelected([32, 10], **defaultkwargs)
|
||||
with self.assertRaises(revpimodio2.errors.DeviceNotFoundError):
|
||||
# Ungültiges Device als <class 'int'>
|
||||
rpi = revpimodio2.RevPiModIOSelected(100, **defaultkwargs)
|
||||
with self.assertRaises(ValueError):
|
||||
# Ungültiger Devicetype
|
||||
rpi = revpimodio2.RevPiModIOSelected([True], **defaultkwargs)
|
||||
|
||||
ds = revpimodio2.modio.DevSelect(
|
||||
"", "productType", (str(revpimodio2.pictory.ProductType.DI),)
|
||||
)
|
||||
rpi = revpimodio2.RevPiModIOSelected(ds, **defaultkwargs)
|
||||
self.assertEqual(len(rpi.device), 2)
|
||||
del rpi
|
||||
|
||||
ds = revpimodio2.modio.DevSelect("", "bmk", ("RevPi DO",))
|
||||
rpi = revpimodio2.RevPiModIOSelected(ds, **defaultkwargs)
|
||||
self.assertEqual(len(rpi.device), 2)
|
||||
del rpi
|
||||
|
||||
# RevPiModIODriver
|
||||
with self.assertRaises(revpimodio2.errors.DeviceNotFoundError):
|
||||
# Liste mit einem ungültigen Device als <class 'list'>
|
||||
rpi = revpimodio2.RevPiModIODriver([64, 100], **defaultkwargs)
|
||||
with self.assertRaises(revpimodio2.errors.DeviceNotFoundError):
|
||||
# Ungültiges Device als <class 'int'>
|
||||
rpi = revpimodio2.RevPiModIODriver([100], **defaultkwargs)
|
||||
with self.assertRaises(ValueError):
|
||||
# Ungültiger Devicetype
|
||||
rpi = revpimodio2.RevPiModIODriver([True], **defaultkwargs)
|
||||
|
||||
rpi = revpimodio2.RevPiModIODriver(64, **defaultkwargs)
|
||||
self.assertEqual(1, len(rpi.device))
|
||||
del rpi
|
||||
rpi = revpimodio2.RevPiModIODriver("virt01", **defaultkwargs)
|
||||
self.assertEqual(1, len(rpi.device))
|
||||
del rpi
|
||||
|
||||
# Core ios als bits
|
||||
rpi = self.modio(configrsc="config_core_bits.json")
|
||||
del rpi
|
||||
|
||||
# Bad offset
|
||||
with self.assertWarnsRegex(
|
||||
Warning,
|
||||
r"(Device offset ERROR in piCtory configuration!|"
|
||||
r"is not in the device offset and will be ignored)",
|
||||
):
|
||||
rpi = self.modio(configrsc="config_bad_offset.rsc")
|
||||
del rpi
|
||||
Reference in new issue
Block a user