ajout d'une option pour désarmer une alarme

Tento commit je obsažen v:
FARINA Louis 2021-09-08 08:42:52 +02:00
rodič db4aa33b6b
revize 68c9fa4ea5
13 změnil soubory, kde provedl 64 přidání a 27 odebrání

Binární soubor nebyl zobrazen.

Zobrazit soubor

@ -2,7 +2,7 @@
"profiles": {
"RSTP_DSLink": {
"commandName": "Project",
"commandLineArgs": "--name RTSP --broker http://192.168.1.54:8080/conn"
"commandLineArgs": "--name RTSP --broker http://192.168.1.109:8080/conn"
}
}
}

Zobrazit soubor

@ -173,6 +173,13 @@ namespace RTSP_DSLink
node.Value.Set(false);
});
Responder.AddNodeClass("onoffNode", delegate (Node node)
{
node.Configs.Set(ConfigType.Writable, new Value(Permission.Read.Permit));
node.Configs.Set(ConfigType.ValueType, DSLink.Nodes.ValueType.Boolean.TypeValue);
node.Value.Set(true);
});
/*Responder.AddNodeClass("rng", delegate(Node node)
{
node.Configs.Set(ConfigType.Writable, new Value(Permission.Read.Permit));
@ -281,6 +288,7 @@ namespace RTSP_DSLink
var alarm = alarmRootNode.CreateChild(alarmName, "alarm").BuildNode();
alarm.CreateChild("remove", "removeNode").BuildNode();
alarm.CreateChild("armed", "onoffNode").BuildNode();
var ts = new CancellationTokenSource();
CancellationToken ct = ts.Token;
//on lance une tâche en parallèle, qui observe la pin et met à jour la valeur du noeud
@ -370,8 +378,12 @@ namespace RTSP_DSLink
controller.WaitForEvent(pin, PinEventTypes.Falling, ct);
if (!ct.IsCancellationRequested)
{
// Console.WriteLine("Beep boop");
alarm.Value.Set(true);
// Console.WriteLine("Beep boop");
alarm.Children.TryGetValue("armed", out Node ArmedNode);
if(ArmedNode.Value.Boolean == true)
{
alarm.Value.Set(true);
}
}
}
//Console.WriteLine("Task cancelled");

Zobrazit soubor

@ -1,11 +0,0 @@
2021-08-10 16:29:29.035 +02:00 [Warning] Failed to load nodes.json
2021-08-10 16:29:29.099 +02:00 [Warning] File does not exist: C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\bin\Release\netcoreapp3.1\nodes.json
2021-08-10 16:29:29.419 +02:00 [Warning] at StandardStorage.Folder.GetFileAsync(String name, CancellationToken cancellationToken)
at DSLink.VFS.SystemVFS._getFile(String fileName)
at DSLink.VFS.SystemVFS.ReadAsync(String fileName)
at DSLink.Respond.DiskSerializer.DeserializeFromDisk()
2021-08-10 16:29:29.559 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-kmS3ZynUOMIfzu1iULqqkTVS9SjCbL8iVeCkne0XCe0
2021-08-10 16:29:29.851 +02:00 [Information] Handshake successful
2021-08-10 16:29:30.102 +02:00 [Information] Connecting
2021-08-10 16:29:30.112 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-kmS3ZynUOMIfzu1iULqqkTVS9SjCbL8iVeCkne0XCe0&auth=vKUt6sCqqK4mOVAHm1qLyQ7_KbM0eeowXNgul_fieOg&format=msgpack
2021-08-10 16:29:30.217 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-kmS3ZynUOMIfzu1iULqqkTVS9SjCbL8iVeCkne0XCe0&auth=vKUt6sCqqK4mOVAHm1qLyQ7_KbM0eeowXNgul_fieOg&format=msgpack

Zobrazit soubor

@ -0,0 +1,15 @@
2021-09-06 15:33:03.853 +02:00 [Information] Handshaking with http://192.168.1.109:8080/conn?dsId=RTSP-kmS3ZynUOMIfzu1iULqqkTVS9SjCbL8iVeCkne0XCe0
2021-09-06 15:33:04.643 +02:00 [Information] Handshake successful
2021-09-06 15:33:05.493 +02:00 [Information] Connecting
2021-09-06 15:33:05.522 +02:00 [Information] WebSocket connecting to ws://192.168.1.109:8080/ws?dsId=RTSP-kmS3ZynUOMIfzu1iULqqkTVS9SjCbL8iVeCkne0XCe0&auth=2UXejr2SrpfomdyIDqt-3823mmjkcwEYFf9PQ1DOdAs&format=msgpack
2021-09-06 15:33:05.648 +02:00 [Information] Connected to ws://192.168.1.109:8080/ws?dsId=RTSP-kmS3ZynUOMIfzu1iULqqkTVS9SjCbL8iVeCkne0XCe0&auth=2UXejr2SrpfomdyIDqt-3823mmjkcwEYFf9PQ1DOdAs&format=msgpack
2021-09-06 15:33:29.175 +02:00 [Information] Handshaking with http://192.168.1.109:8080/conn?dsId=RTSP-kmS3ZynUOMIfzu1iULqqkTVS9SjCbL8iVeCkne0XCe0
2021-09-06 15:33:29.653 +02:00 [Information] Handshake successful
2021-09-06 15:33:29.875 +02:00 [Information] Connecting
2021-09-06 15:33:29.908 +02:00 [Information] WebSocket connecting to ws://192.168.1.109:8080/ws?dsId=RTSP-kmS3ZynUOMIfzu1iULqqkTVS9SjCbL8iVeCkne0XCe0&auth=r1im0BOLksfcC62NHTWzpJOCcHil1_W4ujB1ceVmtc4&format=msgpack
2021-09-06 15:33:29.964 +02:00 [Information] Connected to ws://192.168.1.109:8080/ws?dsId=RTSP-kmS3ZynUOMIfzu1iULqqkTVS9SjCbL8iVeCkne0XCe0&auth=r1im0BOLksfcC62NHTWzpJOCcHil1_W4ujB1ceVmtc4&format=msgpack
2021-09-06 15:37:37.854 +02:00 [Information] Handshaking with http://192.168.1.109:8080/conn?dsId=RTSP-kmS3ZynUOMIfzu1iULqqkTVS9SjCbL8iVeCkne0XCe0
2021-09-06 15:37:38.268 +02:00 [Information] Handshake successful
2021-09-06 15:37:38.531 +02:00 [Information] Connecting
2021-09-06 15:37:38.608 +02:00 [Information] WebSocket connecting to ws://192.168.1.109:8080/ws?dsId=RTSP-kmS3ZynUOMIfzu1iULqqkTVS9SjCbL8iVeCkne0XCe0&auth=eZMCBjpHeum-FAGADBH1E4xZ0DIn3T00dmc8cSh10mc&format=msgpack
2021-09-06 15:37:38.703 +02:00 [Information] Connected to ws://192.168.1.109:8080/ws?dsId=RTSP-kmS3ZynUOMIfzu1iULqqkTVS9SjCbL8iVeCkne0XCe0&auth=eZMCBjpHeum-FAGADBH1E4xZ0DIn3T00dmc8cSh10mc&format=msgpack

Zobrazit soubor

@ -1,9 +1,4 @@
2021-08-11 09:22:15.404 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-LVHIFD8Yqt1CIfLypVNnn8lDhrTHfJ-mbFNvADcENyk
2021-08-11 09:22:15.836 +02:00 [Information] Handshake successful
2021-08-11 09:22:15.930 +02:00 [Information] Connecting
2021-08-11 09:22:15.958 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-LVHIFD8Yqt1CIfLypVNnn8lDhrTHfJ-mbFNvADcENyk&auth=-5UqwsCcQAqr0JBT5RhHrlj5R2bU5BpyyBpA1u0r4zQ&format=msgpack
2021-08-11 09:22:16.008 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-LVHIFD8Yqt1CIfLypVNnn8lDhrTHfJ-mbFNvADcENyk&auth=-5UqwsCcQAqr0JBT5RhHrlj5R2bU5BpyyBpA1u0r4zQ&format=msgpack
2021-08-11 19:37:17.941 +02:00 [Error] Exception processing message from web socket.
2021-09-07 09:09:29.720 +02:00 [Error] Exception processing message from web socket.
System.Net.WebSockets.WebSocketException (0x80004005): The remote party closed the WebSocket connection without completing the close handshake.
---> System.IO.IOException: Unable to read data from the transport connection: Une tentative de connexion a échoué car le parti connecté na pas répondu convenablement au-delà dune certaine durée ou une connexion établie a échoué car lhôte de connexion na pas répondu..
---> System.Net.Sockets.SocketException (10060): Une tentative de connexion a échoué car le parti connecté na pas répondu convenablement au-delà dune certaine durée ou une connexion établie a échoué car lhôte de connexion na pas répondu.
@ -16,10 +11,10 @@ System.Net.WebSockets.WebSocketException (0x80004005): The remote party closed t
at System.Net.WebSockets.ManagedWebSocket.ReceiveAsyncPrivate[TWebSocketReceiveResultGetter,TWebSocketReceiveResult](Memory`1 payloadBuffer, CancellationToken cancellationToken, TWebSocketReceiveResultGetter resultGetter)
at System.Net.WebSockets.ManagedWebSocket.ReceiveAsyncPrivate[TWebSocketReceiveResultGetter,TWebSocketReceiveResult](Memory`1 payloadBuffer, CancellationToken cancellationToken, TWebSocketReceiveResultGetter resultGetter)
at DSLink.Connection.WebSocketConnector.<_startReceiveTask>b__11_0()
2021-08-11 19:37:18.436 +02:00 [Information] Disconnected
2021-08-11 19:37:18.443 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-LVHIFD8Yqt1CIfLypVNnn8lDhrTHfJ-mbFNvADcENyk
2021-08-11 19:37:18.468 +02:00 [Information] Disconnecting
2021-08-11 19:37:18.597 +02:00 [Information] Handshake successful
2021-08-11 19:37:18.609 +02:00 [Information] Connecting
2021-08-11 19:37:18.633 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-LVHIFD8Yqt1CIfLypVNnn8lDhrTHfJ-mbFNvADcENyk&auth=b1d4m92tOSp-W-KJvqwTUY-299irD8Q0Nn-fv2rDh9U&format=msgpack
2021-08-11 19:37:18.682 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-LVHIFD8Yqt1CIfLypVNnn8lDhrTHfJ-mbFNvADcENyk&auth=b1d4m92tOSp-W-KJvqwTUY-299irD8Q0Nn-fv2rDh9U&format=msgpack
2021-09-07 09:09:30.532 +02:00 [Information] Disconnected
2021-09-07 09:09:30.556 +02:00 [Information] Handshaking with http://192.168.1.109:8080/conn?dsId=RTSP-kmS3ZynUOMIfzu1iULqqkTVS9SjCbL8iVeCkne0XCe0
2021-09-07 09:09:30.705 +02:00 [Information] Disconnecting
2021-09-07 09:09:30.842 +02:00 [Information] Handshake successful
2021-09-07 09:09:30.850 +02:00 [Information] Connecting
2021-09-07 09:09:30.873 +02:00 [Information] WebSocket connecting to ws://192.168.1.109:8080/ws?dsId=RTSP-kmS3ZynUOMIfzu1iULqqkTVS9SjCbL8iVeCkne0XCe0&auth=R-ji6Qh4QOyxoH0ug8nxUNBwP92A1EjcOTJ654cEaIs&format=msgpack
2021-09-07 09:09:30.938 +02:00 [Information] Connected to ws://192.168.1.109:8080/ws?dsId=RTSP-kmS3ZynUOMIfzu1iULqqkTVS9SjCbL8iVeCkne0XCe0&auth=R-ji6Qh4QOyxoH0ug8nxUNBwP92A1EjcOTJ654cEaIs&format=msgpack

Zobrazit soubor

@ -0,0 +1,25 @@
2021-09-08 08:34:35.050 +02:00 [Error] Exception processing message from web socket.
System.Net.WebSockets.WebSocketException (0x80004005): The remote party closed the WebSocket connection without completing the close handshake.
---> System.IO.IOException: Unable to read data from the transport connection: Une tentative de connexion a échoué car le parti connecté na pas répondu convenablement au-delà dune certaine durée ou une connexion établie a échoué car lhôte de connexion na pas répondu..
---> System.Net.Sockets.SocketException (10060): Une tentative de connexion a échoué car le parti connecté na pas répondu convenablement au-delà dune certaine durée ou une connexion établie a échoué car lhôte de connexion na pas répondu.
--- End of inner exception stack trace ---
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.GetResult(Int16 token)
at System.Net.Http.HttpConnection.ReadBufferedAsyncCore(Memory`1 destination)
at System.Net.Http.HttpConnection.RawConnectionStream.ReadAsync(Memory`1 buffer, CancellationToken cancellationToken)
at System.Net.WebSockets.ManagedWebSocket.EnsureBufferContainsAsync(Int32 minimumRequiredBytes, CancellationToken cancellationToken, Boolean throwOnPrematureClosure)
at System.Net.WebSockets.ManagedWebSocket.ReceiveAsyncPrivate[TWebSocketReceiveResultGetter,TWebSocketReceiveResult](Memory`1 payloadBuffer, CancellationToken cancellationToken, TWebSocketReceiveResultGetter resultGetter)
at System.Net.WebSockets.ManagedWebSocket.ReceiveAsyncPrivate[TWebSocketReceiveResultGetter,TWebSocketReceiveResult](Memory`1 payloadBuffer, CancellationToken cancellationToken, TWebSocketReceiveResultGetter resultGetter)
at DSLink.Connection.WebSocketConnector.<_startReceiveTask>b__11_0()
2021-09-08 08:34:40.255 +02:00 [Information] Disconnected
2021-09-08 08:34:40.407 +02:00 [Information] Handshaking with http://192.168.1.109:8080/conn?dsId=RTSP-kmS3ZynUOMIfzu1iULqqkTVS9SjCbL8iVeCkne0XCe0
2021-09-08 08:34:40.983 +02:00 [Information] Disconnecting
2021-09-08 08:34:41.159 +02:00 [Information] Handshake successful
2021-09-08 08:34:41.312 +02:00 [Information] Connecting
2021-09-08 08:34:41.466 +02:00 [Information] WebSocket connecting to ws://192.168.1.109:8080/ws?dsId=RTSP-kmS3ZynUOMIfzu1iULqqkTVS9SjCbL8iVeCkne0XCe0&auth=NVKLWsgKEtF_0VXYfD-SWND4sOF4LUdzVx9dRfGy7R4&format=msgpack
2021-09-08 08:34:41.854 +02:00 [Information] Connected to ws://192.168.1.109:8080/ws?dsId=RTSP-kmS3ZynUOMIfzu1iULqqkTVS9SjCbL8iVeCkne0XCe0&auth=NVKLWsgKEtF_0VXYfD-SWND4sOF4LUdzVx9dRfGy7R4&format=msgpack
2021-09-08 08:41:09.885 +02:00 [Information] Handshaking with http://192.168.1.109:8080/conn?dsId=RTSP-kmS3ZynUOMIfzu1iULqqkTVS9SjCbL8iVeCkne0XCe0
2021-09-08 08:41:11.675 +02:00 [Information] Handshake successful
2021-09-08 08:41:12.854 +02:00 [Information] Connecting
2021-09-08 08:41:12.903 +02:00 [Information] WebSocket connecting to ws://192.168.1.109:8080/ws?dsId=RTSP-kmS3ZynUOMIfzu1iULqqkTVS9SjCbL8iVeCkne0XCe0&auth=IqZhuB6UJYq4Z6g5e5mj-uqa5HR5pCFY5rbJBqT53P8&format=msgpack
2021-09-08 08:41:13.075 +02:00 [Information] Connected to ws://192.168.1.109:8080/ws?dsId=RTSP-kmS3ZynUOMIfzu1iULqqkTVS9SjCbL8iVeCkne0XCe0&auth=IqZhuB6UJYq4Z6g5e5mj-uqa5HR5pCFY5rbJBqT53P8&format=msgpack

1
RSTP_DSLink/log-20210906.txt Normální soubor
Zobrazit soubor

@ -0,0 +1 @@
2021-09-06 15:17:31.562 +02:00 [Information] Handshaking with http://localhost:8080/conn?dsId=RTSP-LVHIFD8Yqt1CIfLypVNnn8lDhrTHfJ-mbFNvADcENyk