mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 05:05:00 +00:00
Silenced AppServer heartbeat console messages. Added isInCall property to Atc status message in AtcDdvc01Messenger SendFullStatus()
This commit is contained in:
@@ -47,6 +47,8 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
long ServerReconnectInterval = 5000;
|
long ServerReconnectInterval = 5000;
|
||||||
|
|
||||||
|
DateTime LastAckMessage;
|
||||||
|
|
||||||
string SystemUuid;
|
string SystemUuid;
|
||||||
|
|
||||||
List<CotijaBridgeBase> RoomBridges = new List<CotijaBridgeBase>();
|
List<CotijaBridgeBase> RoomBridges = new List<CotijaBridgeBase>();
|
||||||
@@ -307,14 +309,17 @@ namespace PepperDash.Essentials
|
|||||||
code = "Not available";
|
code = "Not available";
|
||||||
}
|
}
|
||||||
var conn = WSClient == null ? "No client" : (WSClient.Connected ? "Yes" : "No");
|
var conn = WSClient == null ? "No client" : (WSClient.Connected ? "Yes" : "No");
|
||||||
|
var secSinceLastAck = DateTime.Now - LastAckMessage;
|
||||||
|
|
||||||
|
|
||||||
CrestronConsole.ConsoleCommandResponse(@"Mobile Control Information:
|
CrestronConsole.ConsoleCommandResponse(@"Mobile Control Information:
|
||||||
Server address: {0}
|
Server address: {0}
|
||||||
System Name: {1}
|
System Name: {1}
|
||||||
System UUID: {2}
|
System UUID: {2}
|
||||||
System User code: {3}
|
System User code: {3}
|
||||||
Connected?: {4}", url, name, SystemUuid,
|
Connected?: {4}
|
||||||
code, conn);
|
Seconds Since Last Ack: {5}", url, name, SystemUuid,
|
||||||
|
code, conn, secSinceLastAck.Seconds);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -430,7 +435,12 @@ namespace PepperDash.Essentials
|
|||||||
if (WSClient != null && WSClient.Connected)
|
if (WSClient != null && WSClient.Connected)
|
||||||
{
|
{
|
||||||
string message = JsonConvert.SerializeObject(o, Formatting.None, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore });
|
string message = JsonConvert.SerializeObject(o, Formatting.None, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore });
|
||||||
|
|
||||||
|
if (!message.Contains("/system/heartbeat"))
|
||||||
Debug.Console(1, this, "Message TX: {0}", message);
|
Debug.Console(1, this, "Message TX: {0}", message);
|
||||||
|
//else
|
||||||
|
// Debug.Console(1, this, "TX messages contains /system/heartbeat");
|
||||||
|
|
||||||
var messageBytes = System.Text.Encoding.UTF8.GetBytes(message);
|
var messageBytes = System.Text.Encoding.UTF8.GetBytes(message);
|
||||||
var result = WSClient.Send(messageBytes, (uint)messageBytes.Length, WebSocketClient.WEBSOCKET_PACKET_TYPES.LWS_WS_OPCODE_07__TEXT_FRAME);
|
var result = WSClient.Send(messageBytes, (uint)messageBytes.Length, WebSocketClient.WEBSOCKET_PACKET_TYPES.LWS_WS_OPCODE_07__TEXT_FRAME);
|
||||||
if (result != WebSocketClient.WEBSOCKET_RESULT_CODES.WEBSOCKET_CLIENT_SUCCESS)
|
if (result != WebSocketClient.WEBSOCKET_RESULT_CODES.WEBSOCKET_CLIENT_SUCCESS)
|
||||||
@@ -656,7 +666,14 @@ namespace PepperDash.Essentials
|
|||||||
if(string.IsNullOrEmpty(message))
|
if(string.IsNullOrEmpty(message))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!message.Contains("/system/heartbeat"))
|
||||||
Debug.Console(1, this, "Message RX: {0}", message);
|
Debug.Console(1, this, "Message RX: {0}", message);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LastAckMessage = DateTime.Now;
|
||||||
|
//Debug.Console(1, this, "RX message contains /system/heartbeat");
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var messageObj = JObject.Parse(message);
|
var messageObj = JObject.Parse(message);
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
callStatus = EISC.GetString(SHookState),
|
callStatus = EISC.GetString(SHookState),
|
||||||
currentCallString = EISC.GetString(SCurrentCallString),
|
currentCallString = EISC.GetString(SCurrentCallString),
|
||||||
currentDialString = EISC.GetString(SCurrentDialString),
|
currentDialString = EISC.GetString(SCurrentDialString),
|
||||||
|
isInCall = EISC.GetString(SHookState) == "Connected"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Submodule essentials-framework updated: 1d210d80f8...fb712a2a0a
Reference in New Issue
Block a user