Skip to content
Snippets Groups Projects
Commit 9ef9175e authored by Stefano Di Frischia's avatar Stefano Di Frischia
Browse files

Merge branch 'master' into L2SS-406-grafana-archiver

parents c61066b9 1be0203e
No related branches found
No related tags found
1 merge request!190Resolve L2SS-406 "Grafana archiver"
Showing
with 3178 additions and 2643 deletions
* text eol=lf
*.py text
*.json text
*.sh text
*.png binary
*.h5 binary
*.jpg binary
*.bin binary
...@@ -28,6 +28,26 @@ ...@@ -28,6 +28,26 @@
} }
} }
}, },
"APSCT": {
"LTS": {
"APSCT": {
"LTS/APSCT/1": {
"properties": {
}
}
}
}
},
"APSPU": {
"LTS": {
"APSPU": {
"LTS/APSPU/1": {
"properties": {
}
}
}
}
},
"RECV": { "RECV": {
"LTS": { "LTS": {
"RECV": { "RECV": {
...@@ -363,15 +383,6 @@ ...@@ -363,15 +383,6 @@
} }
}, },
"properties": { "properties": {
"OPC_Server_Name": [
"ltspi.astron.nl"
],
"OPC_Server_Port": [
"4842"
],
"OPC_Time_Out": [
"5.0"
],
"polled_attr": [ "polled_attr": [
"state", "state",
"1000", "1000",
...@@ -689,33 +700,6 @@ ...@@ -689,33 +700,6 @@
} }
}, },
"properties": { "properties": {
"OPC_Server_Name": [
"dop36.astron.nl"
],
"OPC_Server_Port": [
"4840"
],
"OPC_Time_Out": [
"5.0"
],
"FPGA_sdp_info_station_id_RW_default": [
"901",
"901",
"901",
"901",
"901",
"901",
"901",
"901",
"901",
"901",
"901",
"901",
"901",
"901",
"901",
"901"
],
"polled_attr": [ "polled_attr": [
"fpga_temp_r", "fpga_temp_r",
"1000", "1000",
...@@ -762,51 +746,6 @@ ...@@ -762,51 +746,6 @@
"Statistics_Client_TCP_Port": [ "Statistics_Client_TCP_Port": [
"5101" "5101"
], ],
"OPC_Server_Name": [
"dop36.astron.nl"
],
"OPC_Server_Port": [
"4840"
],
"OPC_Time_Out": [
"5.0"
],
"FPGA_sst_offload_hdr_eth_destination_mac_RW_default": [
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd"
],
"FPGA_sst_offload_hdr_ip_destination_address_RW_default": [
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250"
],
"FPGA_sst_offload_hdr_udp_destination_port_RW_default": [ "FPGA_sst_offload_hdr_udp_destination_port_RW_default": [
"5001", "5001",
"5001", "5001",
...@@ -841,51 +780,6 @@ ...@@ -841,51 +780,6 @@
"Statistics_Client_TCP_Port": [ "Statistics_Client_TCP_Port": [
"5102" "5102"
], ],
"OPC_Server_Name": [
"dop36.astron.nl"
],
"OPC_Server_Port": [
"4840"
],
"OPC_Time_Out": [
"5.0"
],
"FPGA_xst_offload_hdr_eth_destination_mac_RW_default": [
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd"
],
"FPGA_xst_offload_hdr_ip_destination_address_RW_default": [
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250"
],
"FPGA_xst_offload_hdr_udp_destination_port_RW_default": [ "FPGA_xst_offload_hdr_udp_destination_port_RW_default": [
"5002", "5002",
"5002", "5002",
...@@ -914,15 +808,6 @@ ...@@ -914,15 +808,6 @@
"UNB2": { "UNB2": {
"LTS/UNB2/1": { "LTS/UNB2/1": {
"properties": { "properties": {
"OPC_Server_Name": [
"despi.astron.nl"
],
"OPC_Server_Port": [
"4842"
],
"OPC_Time_Out": [
"5.0"
]
} }
} }
} }
......
{ {
"servers": { "servers": {
"APSCT": {
"LTS": {
"APSCT": {
"LTS/APSCT/1": {
"properties": {
"OPC_Server_Name": [
"apsct-sim"
],
"OPC_Server_Port": [
"4843"
],
"OPC_Time_Out": [
"5.0"
]
}
}
}
}
},
"APSPU": {
"LTS": {
"APSPU": {
"LTS/APSPU/1": {
"properties": {
"OPC_Server_Name": [
"apspu-sim"
],
"OPC_Server_Port": [
"4843"
],
"OPC_Time_Out": [
"5.0"
]
}
}
}
}
},
"RECV": { "RECV": {
"LTS": { "LTS": {
"RECV": { "RECV": {
...@@ -9,7 +47,7 @@ ...@@ -9,7 +47,7 @@
"recv-sim" "recv-sim"
], ],
"OPC_Server_Port": [ "OPC_Server_Port": [
"4843" "4840"
], ],
"OPC_Time_Out": [ "OPC_Time_Out": [
"5.0" "5.0"
...@@ -253,7 +291,7 @@ ...@@ -253,7 +291,7 @@
"unb2-sim" "unb2-sim"
], ],
"OPC_Server_Port": [ "OPC_Server_Port": [
"4844" "4841"
], ],
"OPC_Time_Out": [ "OPC_Time_Out": [
"5.0" "5.0"
......
{
"servers": {
"RECV": {
"LTS": {
"RECV": {
"LTS/RECV/1": {
"properties": {
"OPC_Server_Name": [
"recv-sim"
],
"OPC_Server_Port": [
"4843"
],
"OPC_Time_Out": [
"5.0"
]
}
}
}
}
}
}
}
{
"servers": {
"SDP": {
"LTS": {
"SDP": {
"LTS/SDP/1": {
"properties": {
"OPC_Server_Name": [
"sdptr-sim"
],
"OPC_Server_Port": [
"4840"
],
"OPC_Time_Out": [
"5.0"
]
}
}
}
}
},
"SST": {
"LTS": {
"SST": {
"LTS/SST/1": {
"properties": {
"OPC_Server_Name": [
"sdptr-sim"
],
"OPC_Server_Port": [
"4840"
],
"OPC_Time_Out": [
"5.0"
]
}
}
}
}
},
"XST": {
"LTS": {
"XST": {
"LTS/XST/1": {
"properties": {
"OPC_Server_Name": [
"sdptr-sim"
],
"OPC_Server_Port": [
"4840"
],
"OPC_Time_Out": [
"5.0"
]
}
}
}
}
}
}
}
{
"servers": {
"APSCT": {
"LTS": {
"APSCT": {
"LTS/APSCT/1": {
"properties": {
"OPC_Server_Name": [
"DESPi3.nfra.nl"
],
"OPC_Server_Port": [
"4843"
],
"OPC_Time_Out": [
"5.0"
]
}
}
}
}
},
"APSPU": {
"LTS": {
"APSPU": {
"LTS/APSPU/1": {
"properties": {
"OPC_Server_Name": [
"DESPi3.nfra.nl"
],
"OPC_Server_Port": [
"4842"
],
"OPC_Time_Out": [
"5.0"
]
}
}
}
}
},
"RECV": {
"LTS": {
"RECV": {
"LTS/RECV/1": {
"properties": {
"OPC_Server_Name": [
"DESPi3.nfra.nl"
],
"OPC_Server_Port": [
"4840"
],
"OPC_Time_Out": [
"5.0"
]
}
}
}
}
},
"SDP": {
"LTS": {
"SDP": {
"LTS/SDP/1": {
"properties": {
"OPC_Server_Name": [
"dop36.astron.nl"
],
"OPC_Server_Port": [
"4840"
],
"OPC_Time_Out": [
"5.0"
],
"FPGA_sdp_info_station_id_RW_default": [
"902",
"902",
"902",
"902",
"902",
"902",
"902",
"902",
"902",
"902",
"902",
"902",
"902",
"902",
"902",
"902"
]
}
}
}
}
},
"SST": {
"LTS": {
"SST": {
"LTS/SST/1": {
"properties": {
"OPC_Server_Name": [
"dop36.astron.nl"
],
"OPC_Server_Port": [
"4840"
],
"OPC_Time_Out": [
"5.0"
],
"FPGA_sst_offload_hdr_eth_destination_mac_RW_default": [
"0c:c4:7a:c0:30:f1",
"0c:c4:7a:c0:30:f1",
"0c:c4:7a:c0:30:f1",
"0c:c4:7a:c0:30:f1",
"0c:c4:7a:c0:30:f1",
"0c:c4:7a:c0:30:f1",
"0c:c4:7a:c0:30:f1",
"0c:c4:7a:c0:30:f1",
"0c:c4:7a:c0:30:f1",
"0c:c4:7a:c0:30:f1",
"0c:c4:7a:c0:30:f1",
"0c:c4:7a:c0:30:f1",
"0c:c4:7a:c0:30:f1",
"0c:c4:7a:c0:30:f1",
"0c:c4:7a:c0:30:f1",
"0c:c4:7a:c0:30:f1"
],
"FPGA_sst_offload_hdr_ip_destination_address_RW_default": [
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1"
]
}
}
}
}
},
"XST": {
"LTS": {
"XST": {
"LTS/XST/1": {
"properties": {
"OPC_Server_Name": [
"dop36.astron.nl"
],
"OPC_Server_Port": [
"4840"
],
"OPC_Time_Out": [
"5.0"
],
"FPGA_xst_offload_hdr_eth_destination_mac_RW_default": [
"0c:c4:7a:c0:30:f1",
"0c:c4:7a:c0:30:f1",
"0c:c4:7a:c0:30:f1",
"0c:c4:7a:c0:30:f1",
"0c:c4:7a:c0:30:f1",
"0c:c4:7a:c0:30:f1",
"0c:c4:7a:c0:30:f1",
"0c:c4:7a:c0:30:f1",
"0c:c4:7a:c0:30:f1",
"0c:c4:7a:c0:30:f1",
"0c:c4:7a:c0:30:f1",
"0c:c4:7a:c0:30:f1",
"0c:c4:7a:c0:30:f1",
"0c:c4:7a:c0:30:f1",
"0c:c4:7a:c0:30:f1",
"0c:c4:7a:c0:30:f1"
],
"FPGA_xst_offload_hdr_ip_destination_address_RW_default": [
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1"
]
}
}
}
}
},
"UNB2": {
"LTS": {
"UNB2": {
"LTS/UNB2/1": {
"properties": {
"OPC_Server_Name": [
"DESPi3.nfra.nl"
],
"OPC_Server_Port": [
"4841"
],
"OPC_Time_Out": [
"5.0"
]
}
}
}
}
}
}
}
{
"servers": {
"APSCT": {
"LTS": {
"APSCT": {
"LTS/APSCT/1": {
"properties": {
"OPC_Server_Name": [
"ltspi.astron.nl"
],
"OPC_Server_Port": [
"4842"
],
"OPC_Time_Out": [
"5.0"
],
"OPC_Node_Path_prefix": [
"PCC"
]
}
}
}
}
},
"APSPU": {
"LTS": {
"APSPU": {
"LTS/APSPU/1": {
"properties": {
"OPC_Server_Name": [
"ltspi.astron.nl"
],
"OPC_Server_Port": [
"4842"
],
"OPC_Time_Out": [
"5.0"
],
"OPC_Node_Path_prefix": [
"PCC"
]
}
}
}
}
},
"RECV": {
"LTS": {
"RECV": {
"LTS/RECV/1": {
"properties": {
"OPC_Server_Name": [
"ltspi.astron.nl"
],
"OPC_Server_Port": [
"4842"
],
"OPC_Node_Path_prefix": [
"PCC"
],
"OPC_Time_Out": [
"5.0"
]
}
}
}
}
},
"SDP": {
"LTS": {
"SDP": {
"LTS/SDP/1": {
"properties": {
"OPC_Server_Name": [
"dop36.astron.nl"
],
"OPC_Server_Port": [
"4840"
],
"OPC_Time_Out": [
"5.0"
],
"FPGA_sdp_info_station_id_RW_default": [
"901",
"901",
"901",
"901",
"901",
"901",
"901",
"901",
"901",
"901",
"901",
"901",
"901",
"901",
"901",
"901"
]
}
}
}
}
},
"SST": {
"LTS": {
"SST": {
"LTS/SST/1": {
"properties": {
"Statistics_Client_UDP_Port": [
"5001"
],
"Statistics_Client_TCP_Port": [
"5101"
],
"OPC_Server_Name": [
"dop36.astron.nl"
],
"OPC_Server_Port": [
"4840"
],
"OPC_Time_Out": [
"5.0"
],
"FPGA_sst_offload_hdr_eth_destination_mac_RW_default": [
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd"
],
"FPGA_sst_offload_hdr_ip_destination_address_RW_default": [
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250"
],
"FPGA_sst_offload_hdr_udp_destination_port_RW_default": [
"5001",
"5001",
"5001",
"5001",
"5001",
"5001",
"5001",
"5001",
"5001",
"5001",
"5001",
"5001",
"5001",
"5001",
"5001",
"5001"
]
}
}
}
}
},
"XST": {
"LTS": {
"XST": {
"LTS/XST/1": {
"properties": {
"Statistics_Client_UDP_Port": [
"5002"
],
"Statistics_Client_TCP_Port": [
"5102"
],
"OPC_Server_Name": [
"dop36.astron.nl"
],
"OPC_Server_Port": [
"4840"
],
"OPC_Time_Out": [
"5.0"
],
"FPGA_xst_offload_hdr_eth_destination_mac_RW_default": [
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd",
"6c:2b:59:97:be:dd"
],
"FPGA_xst_offload_hdr_ip_destination_address_RW_default": [
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250"
],
"FPGA_xst_offload_hdr_udp_destination_port_RW_default": [
"5002",
"5002",
"5002",
"5002",
"5002",
"5002",
"5002",
"5002",
"5002",
"5002",
"5002",
"5002",
"5002",
"5002",
"5002",
"5002"
]
}
}
}
}
},
"UNB2": {
"LTS": {
"UNB2": {
"LTS/UNB2/1": {
"properties": {
"OPC_Server_Name": [
"despi.astron.nl"
],
"OPC_Server_Port": [
"4842"
],
"OPC_Node_Path_prefix": [
"PCC"
],
"OPC_Time_Out": [
"5.0"
]
}
}
}
}
}
}
}
{
"servers": {
"APSCT": {
"LTS": {
"APSCT": {
"LTS/APSCT/1": {
"properties": {
"OPC_Server_Name": [
"apsct-sim"
],
"OPC_Server_Port": [
"4843"
],
"OPC_Time_Out": [
"5.0"
]
}
}
}
}
},
"APSPU": {
"LTS": {
"APSPU": {
"LTS/APSPU/1": {
"properties": {
"OPC_Server_Name": [
"apspu-sim"
],
"OPC_Server_Port": [
"4843"
],
"OPC_Time_Out": [
"5.0"
]
}
}
}
}
},
"RECV": {
"LTS": {
"RECV": {
"LTS/RECV/1": {
"properties": {
"OPC_Server_Name": [
"recv-sim"
],
"OPC_Server_Port": [
"4840"
],
"OPC_Time_Out": [
"5.0"
]
}
}
}
}
},
"SDP": {
"LTS": {
"SDP": {
"LTS/SDP/1": {
"properties": {
"OPC_Server_Name": [
"sdptr-sim"
],
"OPC_Server_Port": [
"4840"
],
"OPC_Time_Out": [
"5.0"
]
}
}
}
}
},
"SST": {
"LTS": {
"SST": {
"LTS/SST/1": {
"properties": {
"OPC_Server_Name": [
"sdptr-sim"
],
"OPC_Server_Port": [
"4840"
],
"OPC_Time_Out": [
"5.0"
],
"FPGA_sst_offload_hdr_eth_destination_mac_RW_default": [
"01:23:45:67:89:AB",
"01:23:45:67:89:AB",
"01:23:45:67:89:AB",
"01:23:45:67:89:AB",
"01:23:45:67:89:AB",
"01:23:45:67:89:AB",
"01:23:45:67:89:AB",
"01:23:45:67:89:AB",
"01:23:45:67:89:AB",
"01:23:45:67:89:AB",
"01:23:45:67:89:AB",
"01:23:45:67:89:AB",
"01:23:45:67:89:AB",
"01:23:45:67:89:AB",
"01:23:45:67:89:AB",
"01:23:45:67:89:AB"
],
"FPGA_sst_offload_hdr_ip_destination_address_RW_default": [
"127.0.0.1",
"127.0.0.1",
"127.0.0.1",
"127.0.0.1",
"127.0.0.1",
"127.0.0.1",
"127.0.0.1",
"127.0.0.1",
"127.0.0.1",
"127.0.0.1",
"127.0.0.1",
"127.0.0.1",
"127.0.0.1",
"127.0.0.1",
"127.0.0.1",
"127.0.0.1"
]
}
}
}
}
},
"XST": {
"LTS": {
"XST": {
"LTS/XST/1": {
"properties": {
"OPC_Server_Name": [
"sdptr-sim"
],
"OPC_Server_Port": [
"4840"
],
"OPC_Time_Out": [
"5.0"
],
"FPGA_xst_offload_hdr_eth_destination_mac_RW_default": [
"01:23:45:67:89:AB",
"01:23:45:67:89:AB",
"01:23:45:67:89:AB",
"01:23:45:67:89:AB",
"01:23:45:67:89:AB",
"01:23:45:67:89:AB",
"01:23:45:67:89:AB",
"01:23:45:67:89:AB",
"01:23:45:67:89:AB",
"01:23:45:67:89:AB",
"01:23:45:67:89:AB",
"01:23:45:67:89:AB",
"01:23:45:67:89:AB",
"01:23:45:67:89:AB",
"01:23:45:67:89:AB",
"01:23:45:67:89:AB"
],
"FPGA_xst_offload_hdr_ip_destination_address_RW_default": [
"127.0.0.1",
"127.0.0.1",
"127.0.0.1",
"127.0.0.1",
"127.0.0.1",
"127.0.0.1",
"127.0.0.1",
"127.0.0.1",
"127.0.0.1",
"127.0.0.1",
"127.0.0.1",
"127.0.0.1",
"127.0.0.1",
"127.0.0.1",
"127.0.0.1",
"127.0.0.1"
]
}
}
}
}
},
"UNB2": {
"LTS": {
"UNB2": {
"LTS/UNB2/1": {
"properties": {
"OPC_Server_Name": [
"unb2-sim"
],
"OPC_Server_Port": [
"4841"
],
"OPC_Time_Out": [
"5.0"
]
}
}
}
}
}
}
}
{
"servers": {
"UNB2": {
"LTS": {
"UNB2": {
"LTS/UNB2/1": {
"properties": {
"OPC_Server_Name": [
"unb2-sim"
],
"OPC_Server_Port": [
"4844"
],
"OPC_Time_Out": [
"5.0"
]
}
}
}
}
}
}
}
...@@ -25,24 +25,14 @@ class AbstractCommClient(ABC): ...@@ -25,24 +25,14 @@ class AbstractCommClient(ABC):
@abstractmethod @abstractmethod
def setup_attribute(self, annotation, attribute): def setup_attribute(self, annotation, attribute):
""" """
This function is responsible for providing the attribute_wrapper with a read/write function This function returns a (read_function, write_function) tuple for the provided attribute with the provided annotation.
How this is done is implementation specific.
The setup-attribute has access to the comms_annotation provided to the attribute wrapper to pass along to the comms client The setup-attribute has access to the comms_annotation provided to the attribute wrapper to pass along to the comms client
as well as a reference to the attribute itself. as well as a reference to the attribute itself.
It should do this by first calling: _setup_annotation and setup_value_conversion to get all data necceacry to configure the read/write functions. The read_function must return a single value, representing the current value of the attribute.
It should then return the read and write functions to the attribute.
MANDATORY:
annotation_outputs = _setup_annotation(annotation)
attribute_outputs = _setup_annotation(attribute)
(note: outputs are up to the user)
REQUIRED: provide read and write functions to return, there are no restrictions on how these should be provided, The write_function must take a single value, write it, and return None.
except that the read function takes a single input value and the write function returns a single value
MANDATORY:
return read_function, write_function
Examples: Examples:
- File system: get_mapping returns functions that read/write a fixed - File system: get_mapping returns functions that read/write a fixed
...@@ -52,13 +42,6 @@ class AbstractCommClient(ABC): ...@@ -52,13 +42,6 @@ class AbstractCommClient(ABC):
convert values between Python and OPC-UA. convert values between Python and OPC-UA.
""" """
def _setup_annotation(self, annotation):
"""
This function is responsible for handling the annotation data provided by the attribute to configure the read/write function the client must provide.
This function should be called by setup_attribute
"""
pass
class CommClient(AbstractCommClient, Thread): class CommClient(AbstractCommClient, Thread):
""" """
Abstracts communication with a client, for instance, over the network, by handling connect(), disconnect(), and ping() Abstracts communication with a client, for instance, over the network, by handling connect(), disconnect(), and ping()
...@@ -148,7 +131,6 @@ class CommClient(AbstractCommClient, Thread): ...@@ -148,7 +131,6 @@ class CommClient(AbstractCommClient, Thread):
self.disconnect() self.disconnect()
class AsyncCommClient(object): class AsyncCommClient(object):
""" """
Abstracts communication with a client, for instance, over the network, by handling connect(), disconnect(), and ping() Abstracts communication with a client, for instance, over the network, by handling connect(), disconnect(), and ping()
......
...@@ -26,6 +26,10 @@ class DockerClient(AsyncCommClient): ...@@ -26,6 +26,10 @@ class DockerClient(AsyncCommClient):
self.client = None self.client = None
async def setup_attribute(self, annotation, attribute): async def setup_attribute(self, annotation, attribute):
"""
MANDATORY function: is used by the attribute wrapper to get read/write functions. must return the read and write functions
"""
container_name = annotation["container"] container_name = annotation["container"]
def read_function(): def read_function():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment