var gMessageType =
{
Command: "Command",
Ack: "Ack",
AckFwd: "AckFwd",
Success: "Success",
Error: "Error",
Broadcast: "Broadcast",
QueryResult: "QueryResult"
};
var gCommandType = {
SubscribeToLiveVideoGroup: { Type: 'SubscribeToLiveVideoGroup', CommandID: 9000 },
UnsubscribeFromLiveVideoGroup: { Type: 'UnsubscribeFromLiveVideoGroup', CommandID: 9001 },
SubscribeToALPRGroup: { Type: 'SubscribeToALPRGroup', CommandID: 9002 },
UnsubscribeFromALPRGroup: { Type: 'UnsubscribeFromALPRGroup', CommandID: 9003 },
BroadcastLicensePlateToALPRListeners: { Type: 'BroadcastLicensePlateToALPRListeners', CommandID: 9004 },
SubscribeToDashboardGroup: { Type: 'SubscribeToDashboardGroup', CommandID: 9005 },
UnsubscribeFromDashboardGroup: { Type: 'UnsubscribeFromDashboardGroup', CommandID: 9006 },
GetUnitsLocations: { Type: 'GetUnitsLocations', CommandID: 9007 },
SubscribeToUnitGroup: {Type:'SubscribeToUnitGroup', CommandID: 9008},
UnsubscribeFromUnitGroup: { Type: 'UnsubscribeFromUnitGroup', CommandID: 9009 },
SubscribeToAVLMapGroup: { Type: 'SubscribeToAVLMapGroup', CommandID: 9010 },
UnsubscribeFromAVLMapGroup: { Type: 'UnsubscribeFromAVLMapGroup', CommandID: 9011 },
GetLiveViewedUnitIds: { Type: 'GetLiveViewedUnitIds', CommandID: 9012 },
SubscribeToRTCCGroup: { Type: 'SubscribeToRTCCGroup', CommandID: 9013 },
UnsubscribeFromRTCCGroup: { Type: 'UnsubscribeFromRTCCGroup', CommandID: 9014 },
StartLiveVideo: { Type: 'StartLiveVideo', CommandID: 10000 },
StartLiveImage: { Type: 'StartLiveImage', CommandID: 10001 },
StopStreaming: { Type: 'StopStreaming', CommandID: 10002 },
Record: { Type: 'Record', CommandID: 10003 },
StopRecording: { Type: 'StopRecording', CommandID: 10004 },
ZoomIn: { Type: 'ZoomIn', CommandID: 10005 },
ZoomOut: { Type: 'ZoomOut', CommandID: 10006 },
PanLeft: { Type: 'PanLeft', CommandID: 10007 },
PanRight: { Type: 'PanRight', CommandID: 10008 },
PanUp: { Type: 'PanUp', CommandID: 10009 },
PanDown: { Type: 'PanDown', CommandID: 10010 },
Focus: { Type: 'Focus', CommandID: 10011 },
PanMiddle: { Type: 'PanMiddle', CommandID: 10012 },
SwitchPIP: { Type: 'SwitchPIP', CommandID: 10013 },
FocusIn: { Type: 'Focus', CommandID: 10014 },
FocusOut: { Type: 'Focus', CommandID: 10015 },
OpenFrontDoor: { Type: 'OpenFrontDoor', CommandID: 10016 },
Bookmark: { Type: 'Bookmark', CommandID: 10017 },
InCarStatus: { Type: 'InCarStatus', CommandID: 10501 },
PrintScreen: { Type: 'PrintScreen', CommandID: 10502 },
SyncUnitConfig: { Type: 'SyncConfig', CommandID: 10503 },
AssignAvailable: { Type: 'AssignAvailable', CommandID: 8000 },
AssignUser: { Type: 'AssignUser', CommandID: 8001}
};
var gMessageCodes = {
MessageReceived: 200,
MessageDispatched: 201,
RecipientNotAvailable: 403,
LiveVideoNotAvailable: 405,
MessageReceivedAtDestination: 202
};
var gExceptionTypes = {
MissingConnectionParameters: 101,
AuthTokenParsingFailed: 102,
MissingOrInvalidAccessToken: 105,
AccessTokenExpired: 106,
MessageParsingFailed: 108,
RecipientRespondedWithError: 13
};
var gWSServerName = "WS-SERVER"; //Name of WS Server coming in messages.
var InCarStatus =
{
StreamingOff: 'StreamingOff',
LiveVideoOn: 'LiveVideoOn',
LiveImagesOn: 'LiveImagesOn'
};
var InCarSystemEvents = {
SessionLogon: 'SessionLogon',
SessionLogoff: 'SessionLogoff',
OnSessionChange: 'OnSessionChange',
OnServiceShutdown: 'OnServiceShutdown',
OnServiceStop: 'OnServiceStop',
SesionEnding_Logoff: 'SesionEnding_Logoff',
SessionEnding_SystemShutdown: 'SessionEnding_SystemShutdown',
ApplicationClosing: 'ApplicationClosing'
};
var WS_Status_Type = {
Info: 'Info',
Success: 'Success',
Error: 'Error'
};
var WS_BROADCAST_TYPE = {
UnitListenersList: 'UnitListenersList',
LicensePlateRegistered: 'LicensePlateRegistered',
Dashboard: 'Dashboard',
AVLMap: 'AVLMap',
InCarSystemEvent: 'InCarSystemEvent',
UnitHeartbeatInfo: 'UnitHeartbeatInfo'
};
var WS_Live_Command_Group_Type =
{
LIVE_VIDEO_GROUP: 'LIVE_VIDEO_GROUP',
DASHBOARD_GROUP: 'DASHBOARD_GROUP',
AVL_MAP_GROUP: 'AVL_MAP_GROUP',
ALPR_GROUP: 'ALPR_GROUP',
UNIT_GROUP: 'UNIT_GROUP'
};
var WS_DSH_SubscriptionType = {
LiveViewedUnits: 'LiveViewedUnits'
};
var WS_AVLMap_SubscriptionType = {
UnitsLocationRealTime: 'UnitsLocationRealTime',
OfflineUnitsInfoRealtime: 'OfflineUnitsInfoRealtime'
};
var WS_UNIT_SubscriptionType = {
HeartbeatInfo: 'HeartbeatInfo'
};
var RTCCSubscriptionType =
{
Live : 'Live',
Static: 'Static',
MSSQL: 'MSSQL'
}
var _ws_conn_ping_msg = "Connecting to Server. Please wait";
var _ws_download_text = "Download";
var _ws_no_support_link_text_suffix = "(minimum version 10)";
var _ws_no_support_msg = "Your current Browser does not support Web Sockets functionality which is needed for some Live Commands.
This page/section will work properly only in {0}, {1}, {2}, or {3}
It is recommended to install latest version of any of these Browsers: {4}, {5}, {6}, {7}";
var _ws_msg_warning = "Warning!";
var _ws_msg_websocket_not_running = "Web Socket Server is either not running or not responding to Live Commands. Please contact IRSA Support";
var _ws_no_support_msg_for_http = "With your current Web Socket Server configuration, only Secure protocol https is supported for this page to function properly.";
var _ws_no_support_msg_for_https = "With your current Web Socket Server configuration, only http protocol is supported for this page to function properly.";