using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro.DeviceSupport;
using Crestron.SimplSharpPro.EthernetCommunication;
using PepperDash.Core;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.AppServer.Messengers
{
public class Ddvc01AtcMessenger : MessengerBase
{
BasicTriList EISC;
const uint BKeypad1 = 201;
const uint BKeypad2 = 202;
const uint BKeypad3 = 203;
const uint BKeypad4 = 204;
const uint BKeypad5 = 205;
const uint BKeypad6 = 206;
const uint BKeypad7 = 207;
const uint BKeypad8 = 208;
const uint BKeypad9 = 209;
const uint BKeypad0 = 210;
const uint BKeypadStar = 211;
const uint BKeypadPound = 212;
const uint BDialHangup = 221;
const uint BIncomingAnswer = 251;
const uint BIncomingReject = 252;
const uint BSpeedDial1 = 241;
const uint BSpeedDial2 = 242;
const uint BSpeedDial3 = 243;
const uint BSpeedDial4 = 244;
const uint BIsOnHook = 222;
const uint BIsOffHook = 224;
const uint BDialHangupIsVisible = 251;
const uint BCallIsIncoming = 254;
const uint BSpeedDialIsVisible1 = 261;
const uint BSpeedDialIsVisible2 = 262;
const uint BSpeedDialIsVisible3 = 263;
const uint BSpeedDialIsVisible4 = 264;
const uint SCurrentDialString = 201;
const uint SSpeedDialName1 = 241;
const uint SSpeedDialName2 = 242;
const uint SSpeedDialName3 = 243;
const uint SSpeedDialName4 = 244;
///
///
///
///
///
public Ddvc01AtcMessenger(BasicTriList eisc, string messagePath)
: base(messagePath)
{
EISC = eisc;
}
///
///
///
void SendFullStatus()
{
this.PostStatusMessage(new
{
atc = new
{
callIsIncoming = EISC.GetBool(BCallIsIncoming),
isOnHook = EISC.GetBool(BIsOnHook),
isOffHook = EISC.GetBool(BIsOffHook),
dialHangupIsVisible = EISC.GetBool(BDialHangupIsVisible),
currentDialString = EISC.GetString(SCurrentDialString),
}
});
}
///
///
///
///
protected override void CustomRegisterWithAppServer(CotijaSystemController appServerController)
{
Action