diff --git a/Essentials Core/PepperDashEssentialsBase/Devices/CodecInterfaces.cs b/Essentials Core/PepperDashEssentialsBase/Devices/CodecInterfaces.cs
index 5135ac07..a5e84b12 100644
--- a/Essentials Core/PepperDashEssentialsBase/Devices/CodecInterfaces.cs
+++ b/Essentials Core/PepperDashEssentialsBase/Devices/CodecInterfaces.cs
@@ -27,6 +27,52 @@ namespace PepperDash.Essentials.Core
}
+ ///
+ /// Defines minimum volume controls for a codec device with dialing capabilities
+ ///
+ public interface ICodecAudio : IBasicVolumeWithFeedback, ICodecPrivacy
+ {
+
+ }
+
+ ///
+ /// Adds control of codec receive volume
+ ///
+ public interface ICodecReceiveVolume
+ {
+ // Break this out into 3 interfaces
+ void SetReceiveVolume(ushort level);
+ void ReceiveMuteOn();
+ void ReceiveMuteOff();
+ void ReceiveMuteToggle();
+ IntFeedback ReceiveLevelFeedback { get; }
+ BoolFeedback ReceiveMuteIsOnFeedback { get; }
+ }
+
+ ///
+ /// Adds control of codec transmit volume
+ ///
+ public interface ICodecTransmitVolume
+ {
+ void SetTransmitVolume(ushort level);
+ void TransmitMuteOn();
+ void TransmitMuteOff();
+ void TransmitMuteToggle();
+ IntFeedback TransmitLevelFeedback { get; }
+ BoolFeedback TransmitMuteIsOnFeedback { get; }
+ }
+
+ ///
+ /// Adds control of codec privacy function (microphone mute)
+ ///
+ public interface ICodecPrivacy
+ {
+ void PrivacyModeOn();
+ void PrivacyModeOff();
+ void PrivacyModeToggle();
+ BoolFeedback PrivacyModeIsOnFeedback { get; }
+ }
+
public interface IHasCallHistory
{
// Add recent calls list
diff --git a/Essentials Core/PepperDashEssentialsBase/Devices/IVolumeAndAudioInterfaces.cs b/Essentials Core/PepperDashEssentialsBase/Devices/IVolumeAndAudioInterfaces.cs
index 9990b2ed..c2b3ded9 100644
--- a/Essentials Core/PepperDashEssentialsBase/Devices/IVolumeAndAudioInterfaces.cs
+++ b/Essentials Core/PepperDashEssentialsBase/Devices/IVolumeAndAudioInterfaces.cs
@@ -68,37 +68,6 @@ namespace PepperDash.Essentials.Core
IntFeedback DefaultVolumeFeedback { get; }
}
- ///
- /// Defines minimum volume controls for a codec device with dialing capabilities
- ///
- public interface ICodecAudio
- {
- // ICodecReceiveVolume
- // Break this out into 3 interfaces
- void SetReceiveVolume(ushort level);
- void ReceiveMuteOn();
- void ReceiveMuteOff();
- void ReceiveMuteToggle();
- IntFeedback ReceiveLevelFeedback { get; }
- BoolFeedback ReceiveMuteIsOnFeedback { get; }
-
- // ICodecTransmitVolume
- void SetTransmitVolume(ushort level);
- void TransmitMuteOn();
- void TransmitMuteOff();
- void TransmitMuteToggle();
- IntFeedback TransmitLevelFeedback { get; }
- BoolFeedback TransmitMuteIsOnFeedback { get; }
-
- // ICodecPrivacy
- void PrivacyModeOn();
- void PrivacyModeOff();
- void PrivacyModeToggle();
- BoolFeedback PrivacyModeIsOnFeedback { get; }
- }
-
-
-
///
/// A class that implements this, contains a reference to an IBasicVolumeControls device.
/// For example, speakers attached to an audio zone. The speakers can provide reference
diff --git a/Essentials Devices Common/Essentials Devices Common/References/Cisco One Button To Push.dll b/Essentials Devices Common/Essentials Devices Common/References/Cisco One Button To Push.dll
index 10a39122..a6fcd201 100644
Binary files a/Essentials Devices Common/Essentials Devices Common/References/Cisco One Button To Push.dll and b/Essentials Devices Common/Essentials Devices Common/References/Cisco One Button To Push.dll differ
diff --git a/Essentials Devices Common/Essentials Devices Common/VC/CiscoCodec/CiscoCodec.cs b/Essentials Devices Common/Essentials Devices Common/VC/CiscoCodec/CiscoCodec.cs
index 032c5ba6..72af49a5 100644
--- a/Essentials Devices Common/Essentials Devices Common/VC/CiscoCodec/CiscoCodec.cs
+++ b/Essentials Devices Common/Essentials Devices Common/VC/CiscoCodec/CiscoCodec.cs
@@ -26,6 +26,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public StatusMonitorBase CommunicationMonitor { get; private set; }
+ public BoolFeedback StandbyIsOnFeedback { get; private set; }
+
private CiscoOneButtonToPush CodecObtp;
private Corporate_Phone_Book PhoneBook;
@@ -92,15 +94,20 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
int PresentationSource;
+ public bool CommDebuggingIsOn;
+
// Constructor for IBasicCommunication
public CiscoCodec(string key, string name, IBasicCommunication comm, int serverPort)
: base(key, name)
{
+ StandbyIsOnFeedback = new BoolFeedback(StandbyStateFeedbackFunc);
+
Communication = comm;
SyncState = new CodecSyncState(key + "--sync");
PortGather = new CommunicationGather(Communication, Delimiter);
+ PortGather.IncludeDelimiter = true;
PortGather.LineReceived += this.Port_LineReceived;
//ServerPort = serverPort;
@@ -116,6 +123,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
CodecEvent = new CiscoCodecEvents.RootObject();
CodecStatus.Status.Audio.Volume.ValueChangedAction = VolumeLevelFeedback.FireUpdate;
+ CodecStatus.Status.Audio.VolumeMute.ValueChangedAction = MuteFeedback.FireUpdate;
+ CodecStatus.Status.Audio.Microphones.Mute.ValueChangedAction = PrivacyModeIsOnFeedback.FireUpdate;
+ CodecStatus.Status.Standby.State.ValueChangedAction = StandbyIsOnFeedback.FireUpdate;
//Client = new HttpsClient();
@@ -129,6 +139,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public override bool CustomActivate()
{
CrestronConsole.AddNewConsoleCommand(SendText, "send" + Key, "", ConsoleAccessLevelEnum.AccessOperator);
+ CrestronConsole.AddNewConsoleCommand(SetCommDebug, "SetCiscoCommDebug", "0 for Off, 1 for on", ConsoleAccessLevelEnum.AccessOperator);
+
+
Communication.Connect();
var socket = Communication as ISocketStatus;
@@ -137,8 +150,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
socket.ConnectionChange += new EventHandler(socket_ConnectionChange);
}
- InputPorts.Add(new RoutingInputPort(RoutingPortNames.HdmiIn1, eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, new Action(SelectPresentationSource(1)), this));
- InputPorts.Add(new RoutingInputPort(RoutingPortNames.HdmiIn2, eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, new Action(SelectPresentationSource(2)), this));
+ 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));
//Debug.Console(1, this, "Starting Cisco API Server");
@@ -193,6 +206,20 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
return base.CustomActivate();
}
+ public void SetCommDebug(string s)
+ {
+ if (s == "1")
+ {
+ CommDebuggingIsOn = true;
+ Debug.Console(0, this, "Comm Debug Enabled.");
+ }
+ else
+ {
+ CommDebuggingIsOn = false;
+ Debug.Console(0, this, "Comm Debug Disabled.");
+ }
+ }
+
void socket_ConnectionChange(object sender, GenericSocketStatusChageEventArgs e)
{
// Reset sync status on disconnect
@@ -208,7 +235,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
///
void Port_LineReceived(object dev, GenericCommMethodReceiveTextArgs args)
{
- if (Debug.Level == 1)
+ if (CommDebuggingIsOn)
{
if(!JsonFeedbackMessageIsIncoming)
Debug.Console(1, this, "RX: '{0}'", args.Text);
@@ -218,7 +245,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
{
JsonFeedbackMessageIsIncoming = true;
- Debug.Console(1, this, "Incoming JSON message...");
+ if (CommDebuggingIsOn)
+ Debug.Console(1, this, "Incoming JSON message...");
JsonMessage = new StringBuilder();
}
@@ -228,7 +256,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
JsonMessage.Append(args.Text);
- Debug.Console(1, this, "Complete JSON Received:\n{0}", JsonMessage.ToString());
+ if (CommDebuggingIsOn)
+ Debug.Console(1, this, "Complete JSON Received:\n{0}", JsonMessage.ToString());
// Forward the complete message to be deserialized
DeserializeResponse(JsonMessage.ToString());
@@ -269,7 +298,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public void SendText(string command)
{
- Debug.Console(1, this, "Sending: '{0}'", command);
+ if (CommDebuggingIsOn)
+ Debug.Console(1, this, "Sending: '{0}'", command);
+
Communication.SendText(command + Delimiter);
}
@@ -490,12 +521,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
protected override Func IncomingCallFeedbackFunc { get { return () => false; } }
- protected override Func TransmitMuteFeedbackFunc { get { return () => false; } }
-
- protected override Func ReceiveMuteFeedbackFunc { get { return () => false; } }
-
- protected override Func PrivacyModeFeedbackFunc { get { return () => false; } }
-
///
/// Gets the first CallId or returns null
///
@@ -548,8 +573,31 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
StartSharing();
}
+ ///
+ /// Select source 1 as the presetnation source
+ ///
+ public void SelectPresentationSource1()
+ {
+ SelectPresentationSource(1);
+ }
+
+ ///
+ /// Select source 2 as the presetnation source
+ ///
+ public void SelectPresentationSource2()
+ {
+ SelectPresentationSource(2);
+ }
+
public override void StartSharing()
{
+ string sendingMode = string.Empty;
+
+ if (InCallFeedback.BoolValue)
+ sendingMode = "LocalRemote";
+ else
+ sendingMode = "LocalOnly";
+
SendText(string.Format("xCommand Presentation Start PresentationSource: {0}", PresentationSource));
}
@@ -558,46 +606,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
SendText(string.Format("xCommand Presentation Stop PresentationSource: {0}", PresentationSource));
}
- public override void ReceiveMuteOff()
- {
-
- }
-
- public override void ReceiveMuteOn()
- {
-
- }
-
- public override void ReceiveMuteToggle()
- {
-
- }
-
- public override void SetReceiveVolume(ushort level)
- {
-
- }
-
- public override void TransmitMuteOff()
- {
-
- }
-
- public override void TransmitMuteOn()
- {
-
- }
-
- public override void TransmitMuteToggle()
- {
-
- }
-
- public override void SetTransmitVolume(ushort level)
- {
-
- }
-
public override void PrivacyModeOn()
{
SendText("xCommand Audio Microphones Mute");
@@ -687,22 +695,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
{
SendText("xCommand SystemUnit Boot Action: Restart");
}
-
- public override void MuteOff()
- {
- }
-
- public override void MuteOn()
- {
- }
-
- public override void SetVolume(ushort level)
- {
- }
-
- public override void MuteToggle()
- {
- }
}
///
diff --git a/Essentials Devices Common/Essentials Devices Common/VC/CiscoCodec/xStatus.cs b/Essentials Devices Common/Essentials Devices Common/VC/CiscoCodec/xStatus.cs
index 44cec29f..35fa2a77 100644
--- a/Essentials Devices Common/Essentials Devices Common/VC/CiscoCodec/xStatus.cs
+++ b/Essentials Devices Common/Essentials Devices Common/VC/CiscoCodec/xStatus.cs
@@ -1524,26 +1524,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public string Value { get; set; }
}
- public class DisplayName
- {
- public string Value { get; set; }
- }
-
public class Duration
{
public string Value { get; set; }
}
- public class Type
- {
- public string Value { get; set; }
- }
-
- public class Encryption
- {
- public string id { get; set; }
- public Type Type { get; set; }
- }
public class FacilityServiceId
{
@@ -1575,11 +1560,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public string Value { get; set; }
}
- public class Status2
- {
- public string Value { get; set; }
- }
-
public class TransmitCallRate
{
public string Value { get; set; }
diff --git a/Essentials Devices Common/Essentials Devices Common/VC/MockVC/MockVC.cs b/Essentials Devices Common/Essentials Devices Common/VC/MockVC/MockVC.cs
index 2d2eba76..97f2f5e7 100644
--- a/Essentials Devices Common/Essentials Devices Common/VC/MockVC/MockVC.cs
+++ b/Essentials Devices Common/Essentials Devices Common/VC/MockVC/MockVC.cs
@@ -255,14 +255,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
public override void TransmitMuteToggle()
{
- _TransmitMute = !_TransmitMute;
- Debug.Console(1, this, "TransmitMuteToggle: {0}", _TransmitMute);
- TransmitMuteIsOnFeedback.FireUpdate();
+
}
- public override void SetTransmitVolume(ushort level)
+ public override void VolumeUp(bool pressRelease)
{
- Debug.Console(1, this, "SetTransmitVolume: {0}", level);
+
}
public override void PrivacyModeOn()
diff --git a/Essentials Devices Common/Essentials Devices Common/VC/VideoCodecBase.cs b/Essentials Devices Common/Essentials Devices Common/VC/VideoCodecBase.cs
index 738c2c2d..da4a33a2 100644
--- a/Essentials Devices Common/Essentials Devices Common/VC/VideoCodecBase.cs
+++ b/Essentials Devices Common/Essentials Devices Common/VC/VideoCodecBase.cs
@@ -9,7 +9,7 @@ using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Devices.Common.VideoCodec
{
- public abstract class VideoCodecBase : Device, IRoutingSinkWithSwitching, IUsageTracking, IHasDialer, IHasSharing, IBasicVolumeWithFeedback //, ICodecAudio
+ public abstract class VideoCodecBase : Device, IRoutingSinkWithSwitching, IUsageTracking, IHasDialer, IHasSharing, ICodecAudio
{
#region IUsageTracking Members
@@ -84,8 +84,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
{
InCallFeedback,
IncomingCallFeedback,
- ReceiveMuteIsOnFeedback,
- TransmitMuteIsOnFeedback,
PrivacyModeIsOnFeedback
};
}
@@ -95,25 +93,29 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
#region ICodecAudio Members
- public IntFeedback ReceiveLevelFeedback { get; private set; }
- public BoolFeedback ReceiveMuteIsOnFeedback { get; private set; }
- public abstract void ReceiveMuteOff();
- public abstract void ReceiveMuteOn();
- public abstract void ReceiveMuteToggle();
- public abstract void SetReceiveVolume(ushort level);
-
- public IntFeedback TransmitLevelFeedback { get; private set; }
- public BoolFeedback TransmitMuteIsOnFeedback { get; private set; }
- public abstract void TransmitMuteOff();
- public abstract void TransmitMuteOn();
- public abstract void TransmitMuteToggle();
- public abstract void SetTransmitVolume(ushort level);
-
public abstract void PrivacyModeOn();
public abstract void PrivacyModeOff();
public abstract void PrivacyModeToggle();
public BoolFeedback PrivacyModeIsOnFeedback { get; private set; }
+
+ public BoolFeedback MuteFeedback { get; private set; }
+
+ public abstract void MuteOff();
+
+ public abstract void MuteOn();
+
+ public abstract void SetVolume(ushort level);
+
+ public IntFeedback VolumeLevelFeedback { get; private set; }
+
+ public abstract void MuteToggle();
+
+ public abstract void VolumeDown(bool pressRelease);
+
+
+ public abstract void VolumeUp(bool pressRelease);
+
#endregion
#region IHasSharing Members
@@ -125,30 +127,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
#endregion
- #region IBasicVolumeWithFeedback Members
- public BoolFeedback MuteFeedback { get; private set; }
-
- public abstract void MuteOff();
-
- public abstract void MuteOn();
-
- public abstract void SetVolume(ushort level);
-
- public IntFeedback VolumeLevelFeedback { get; private set; }
-
- #endregion
-
- #region IBasicVolumeControls Members
-
- public abstract void MuteToggle();
-
- public abstract void VolumeDown(bool pressRelease);
-
-
- public abstract void VolumeUp(bool pressRelease);
-
-
- #endregion
}
}
\ No newline at end of file
diff --git a/Essentials/PepperDashEssentials/ControlSystem.cs b/Essentials/PepperDashEssentials/ControlSystem.cs
index 20288baf..f46e4ff8 100644
--- a/Essentials/PepperDashEssentials/ControlSystem.cs
+++ b/Essentials/PepperDashEssentials/ControlSystem.cs
@@ -128,12 +128,14 @@ namespace PepperDash.Essentials
}
// CODEC TESTING
- //GenericSshClient TestCodecClient = new GenericSshClient("TestCodec-1--SshClient", "10.11.50.135", 22, "crestron", "2H3Zu&OvgXp6");
+ GenericSshClient TestCodecClient = new GenericSshClient("TestCodec-1--SshClient", "10.11.50.135", 22, "crestron", "2H3Zu&OvgXp6");
- //PepperDash.Essentials.Devices.Common.VideoCodec.Cisco.CiscoCodec TestCodec =
- // new PepperDash.Essentials.Devices.Common.VideoCodec.Cisco.CiscoCodec("TestCodec-1", "Cisco Spark Room Kit", TestCodecClient, 8080);
+ PepperDash.Essentials.Devices.Common.VideoCodec.Cisco.CiscoCodec TestCodec =
+ new PepperDash.Essentials.Devices.Common.VideoCodec.Cisco.CiscoCodec("TestCodec-1", "Cisco Spark Room Kit", TestCodecClient, 8080);
- //TestCodec.CustomActivate();
+ TestCodec.CommDebuggingIsOn = true;
+
+ TestCodec.CustomActivate();
// CODEC TESTING
}