set up program to load Cisco Codec from config, not just manually

This commit is contained in:
Neil Dorin
2017-09-22 15:40:08 -06:00
parent 1d46f8520d
commit a71e991383
7 changed files with 52 additions and 33 deletions

View File

@@ -149,7 +149,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
int PresentationSource;
string PhoneBookMode;
string PhonebookMode = "Local"; // Default to Local
int PhonebookResultsLimit = 255; // Could be set later by config.
// Constructor for IBasicCommunication
public CiscoCodec(string key, string name, IBasicCommunication comm, CiscoCodecPropertiesConfig props )
@@ -173,7 +175,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
DeviceManager.AddDevice(CommunicationMonitor);
PhoneBookMode = props.PhonebookMode;
PhonebookMode = props.PhonebookMode;
SyncState = new CodecSyncState(key + "--sync");
@@ -218,7 +220,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
//SendText("xCommand Bookings List Days: 1 DayOffset: 0");
// Get Phonebook (determine local/corporate from config, and set results limit)
//SendText("xCommand Phonebook Search PhonebookType: {0} ContactType: Folder Limit: {0}", PhonebookType, PhonebookResultsLimit);
SendText(string.Format("xCommand Phonebook Search PhonebookType: {0} ContactType: Folder Limit: {1}", PhonebookMode, PhonebookResultsLimit));
}
/// <summary>
@@ -237,6 +239,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
socket.ConnectionChange += new EventHandler<GenericSocketStatusChageEventArgs>(socket_ConnectionChange);
}
CommunicationMonitor.Start();
InputPorts.Add(new RoutingInputPort(RoutingPortNames.HdmiIn1, eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, new Action(SelectPresentationSource1), this));
InputPorts.Add(new RoutingInputPort(RoutingPortNames.HdmiIn2, eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, new Action(SelectPresentationSource2), this));
@@ -503,7 +507,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
}
}
/// <summary>
/// Evaluates an event received from the codec
/// </summary>
@@ -534,8 +537,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
(selector as Action)();
}
//protected Func<bool> InCallFeedbackFunc { get { return () => false; } }
protected override Func<bool> IncomingCallFeedbackFunc { get { return () => false; } }
/// <summary>

View File

@@ -5,7 +5,10 @@ using System.Text;
using Crestron.SimplSharp;
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
{
{
/// <summary>
/// This class exists to capture serialized data sent back by a Cisco codec in JSON output mode
/// </summary>
public class CiscoCodecConfiguration
{
public class DefaultVolume

View File

@@ -5,7 +5,10 @@ using System.Text;
using Crestron.SimplSharp;
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
{
{
/// <summary>
/// This class exists to capture serialized data sent back by a Cisco codec in JSON output mode
/// </summary>
public class CiscoCodecEvents
{
public class CauseValue

View File

@@ -7,6 +7,9 @@ using Crestron.SimplSharp.CrestronXml.Serialization;
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
{
/// <summary>
/// This class exists to capture serialized data sent back by a Cisco codec in JSON output mode
/// </summary>
public class CiscoCodecStatus
{
// Helper Classes for Proerties
@@ -1634,7 +1637,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public string Value { get; set; }
}
public class FacilityServiceId
{
public string Value { get; set; }