Merge with feature/cisco-spark

This commit is contained in:
Heath Volmer
2017-09-12 11:12:52 -06:00
15 changed files with 3731 additions and 275 deletions

View File

@@ -1,128 +1,127 @@
using Crestron.SimplSharpPro;
namespace PepperDash.Essentials.Core
{
public static class CommonBoolCue
{
public static readonly Cue Power = new Cue("Power", 101, eCueType.Bool);
public static readonly Cue PowerOn = new Cue("PowerOn", 102, eCueType.Bool);
public static readonly Cue PowerOff = new Cue("PowerOff", 103, eCueType.Bool);
public static readonly Cue HasPowerFeedback = new Cue("HasPowerFeedback", 101, eCueType.Bool);
public static readonly Cue PowerOnFeedback = new Cue("PowerOnFeedback", 102, eCueType.Bool);
public static readonly Cue IsOnlineFeedback = new Cue("IsOnlineFeedback", 104, eCueType.Bool);
public static readonly Cue IsWarmingUp = new Cue("IsWarmingUp", 105, eCueType.Bool);
public static readonly Cue IsCoolingDown = new Cue("IsCoolingDown", 106, eCueType.Bool);
public static readonly Cue Dash = new Cue("Dash", 109, eCueType.Bool);
public static readonly Cue Digit0 = new Cue("Digit0", 110, eCueType.Bool);
public static readonly Cue Digit1 = new Cue("Digit1", 111, eCueType.Bool);
public static readonly Cue Digit2 = new Cue("Digit2", 112, eCueType.Bool);
public static readonly Cue Digit3 = new Cue("Digit3", 113, eCueType.Bool);
public static readonly Cue Digit4 = new Cue("Digit4", 114, eCueType.Bool);
public static readonly Cue Digit5 = new Cue("Digit5", 115, eCueType.Bool);
public static readonly Cue Digit6 = new Cue("Digit6", 116, eCueType.Bool);
public static readonly Cue Digit7 = new Cue("Digit7", 117, eCueType.Bool);
public static readonly Cue Digit8 = new Cue("Digit8", 118, eCueType.Bool);
public static readonly Cue Digit9 = new Cue("Digit9", 119, eCueType.Bool);
public static readonly Cue KeypadMisc1 = new Cue("KeypadMisc1", 120, eCueType.Bool);
public static readonly Cue KeypadMisc2 = new Cue("KeypadMisc2", 121, eCueType.Bool);
public static readonly Cue NumericEnter = new Cue("Enter", 122, eCueType.Bool);
public static readonly Cue ChannelUp = new Cue("ChannelUp", 123, eCueType.Bool);
public static readonly Cue ChannelDown = new Cue("ChannelDown", 124, eCueType.Bool);
public static readonly Cue Last = new Cue("Last", 125, eCueType.Bool);
public static readonly Cue OpenClose = new Cue("OpenClose", 126, eCueType.Bool);
public static readonly Cue Subtitle = new Cue("Subtitle", 127, eCueType.Bool);
public static readonly Cue Audio = new Cue("Audio", 128, eCueType.Bool);
public static readonly Cue Info = new Cue("Info", 129, eCueType.Bool);
public static readonly Cue Menu = new Cue("Menu", 130, eCueType.Bool);
public static readonly Cue DeviceMenu = new Cue("DeviceMenu", 131, eCueType.Bool);
public static readonly Cue Return = new Cue("Return", 132, eCueType.Bool);
public static readonly Cue Back = new Cue("Back", 133, eCueType.Bool);
public static readonly Cue Exit = new Cue("Exit", 134, eCueType.Bool);
public static readonly Cue Clear = new Cue("Clear", 135, eCueType.Bool);
public static readonly Cue List = new Cue("List", 136, eCueType.Bool);
public static readonly Cue Guide = new Cue("Guide", 137, eCueType.Bool);
public static readonly Cue Am = new Cue("Am", 136, eCueType.Bool);
public static readonly Cue Fm = new Cue("Fm", 137, eCueType.Bool);
public static readonly Cue Up = new Cue("Up", 138, eCueType.Bool);
public static readonly Cue Down = new Cue("Down", 139, eCueType.Bool);
public static readonly Cue Left = new Cue("Left", 140, eCueType.Bool);
public static readonly Cue Right = new Cue("Right", 141, eCueType.Bool);
public static readonly Cue Select = new Cue("Select", 142, eCueType.Bool);
public static readonly Cue SmartApps = new Cue("SmartApps", 143, eCueType.Bool);
public static readonly Cue Dvr = new Cue("Dvr", 144, eCueType.Bool);
public static readonly Cue Play = new Cue("Play", 145, eCueType.Bool);
public static readonly Cue Pause = new Cue("Pause", 146, eCueType.Bool);
public static readonly Cue Stop = new Cue("Stop", 147, eCueType.Bool);
public static readonly Cue ChapNext = new Cue("ChapNext", 148, eCueType.Bool);
public static readonly Cue ChapPrevious = new Cue("ChapPrevious", 149, eCueType.Bool);
public static readonly Cue Rewind = new Cue("Rewind", 150, eCueType.Bool);
public static readonly Cue Ffwd = new Cue("Ffwd", 151, eCueType.Bool);
public static readonly Cue Replay = new Cue("Replay", 152, eCueType.Bool);
public static readonly Cue Advance = new Cue("Advance", 153, eCueType.Bool);
public static readonly Cue Record = new Cue("Record", 154, eCueType.Bool);
public static readonly Cue Red = new Cue("Red", 155, eCueType.Bool);
public static readonly Cue Green = new Cue("Green", 156, eCueType.Bool);
public static readonly Cue Yellow = new Cue("Yellow", 157, eCueType.Bool);
public static readonly Cue Blue = new Cue("Blue", 158, eCueType.Bool);
public static readonly Cue Home = new Cue("Home", 159, eCueType.Bool);
public static readonly Cue PopUp = new Cue("PopUp", 160, eCueType.Bool);
public static readonly Cue PageUp = new Cue("PageUp", 161, eCueType.Bool);
public static readonly Cue PageDown = new Cue("PageDown", 162, eCueType.Bool);
public static readonly Cue Search = new Cue("Search", 163, eCueType.Bool);
public static readonly Cue Setup = new Cue("Setup", 164, eCueType.Bool);
public static readonly Cue RStep = new Cue("RStep", 165, eCueType.Bool);
public static readonly Cue FStep = new Cue("FStep", 166, eCueType.Bool);
public static readonly Cue IsConnected = new Cue("IsConnected", 281, eCueType.Bool);
public static readonly Cue IsOk = new Cue("IsOk", 282, eCueType.Bool);
public static readonly Cue InWarning = new Cue("InWarning", 283, eCueType.Bool);
public static readonly Cue InError = new Cue("InError", 284, eCueType.Bool);
public static readonly Cue StatusUnknown = new Cue("StatusUnknown", 285, eCueType.Bool);
public static readonly Cue VolumeUp = new Cue("VolumeUp", 401, eCueType.Bool);
public static readonly Cue VolumeDown = new Cue("VolumeDown", 402, eCueType.Bool);
public static readonly Cue MuteOn = new Cue("MuteOn", 403, eCueType.Bool);
public static readonly Cue MuteOff = new Cue("MuteOff", 404, eCueType.Bool);
public static readonly Cue MuteToggle = new Cue("MuteToggle", 405, eCueType.Bool);
public static readonly Cue ShowVolumeButtons = new Cue("ShowVolumeButtons", 406, eCueType.Bool);
public static readonly Cue ShowVolumeSlider = new Cue("ShowVolumeSlider", 407, eCueType.Bool);
public static readonly Cue Hdmi1 = new Cue("Hdmi1", 451, eCueType.Bool);
public static readonly Cue Hdmi2 = new Cue("Hdmi2", 452, eCueType.Bool);
public static readonly Cue Hdmi3 = new Cue("Hdmi3", 453, eCueType.Bool);
public static readonly Cue Hdmi4 = new Cue("Hdmi4", 454, eCueType.Bool);
public static readonly Cue Hdmi5 = new Cue("Hdmi5", 455, eCueType.Bool);
public static readonly Cue Hdmi6 = new Cue("Hdmi6", 456, eCueType.Bool);
public static readonly Cue DisplayPort1 = new Cue("DisplayPort1", 457, eCueType.Bool);
public static readonly Cue DisplayPort2 = new Cue("DisplayPort2", 458, eCueType.Bool);
public static readonly Cue Dvi1 = new Cue("Dvi1", 459, eCueType.Bool);
public static readonly Cue Dvi2 = new Cue("Dvi2", 460, eCueType.Bool);
public static readonly Cue Video1 = new Cue("Video1", 461, eCueType.Bool);
public static readonly Cue Video2 = new Cue("Video2", 462, eCueType.Bool);
public static readonly Cue Component1 = new Cue("Component1", 463, eCueType.Bool);
public static readonly Cue Component2 = new Cue("Component2", 464, eCueType.Bool);
public static readonly Cue Vga1 = new Cue("Vga1", 465, eCueType.Bool);
public static readonly Cue Vga2 = new Cue("Vga2", 466, eCueType.Bool);
public static readonly Cue Rgb1 = new Cue("Rgb1", 467, eCueType.Bool);
public static readonly Cue Rgb2 = new Cue("Rgb2", 468, eCueType.Bool);
public static readonly Cue Antenna = new Cue("Antenna", 469, eCueType.Bool);
}
public static class CommonIntCue
{
public static readonly Cue MainVolumeLevel = new Cue("MainVolumeLevel", 401, eCueType.Int);
public static readonly Cue MainVolumeLevelFeedback = new Cue("MainVolumeLevelFeedback", 401, eCueType.Int);
}
public static class CommonStringCue
{
public static readonly Cue IpConnectionsText = new Cue("IpConnectionsText", 9999, eCueType.String);
}
using Crestron.SimplSharpPro;
namespace PepperDash.Essentials.Core
{
public static class CommonBoolCue
{
public static readonly Cue Power = new Cue("Power", 101, eCueType.Bool);
public static readonly Cue PowerOn = new Cue("PowerOn", 102, eCueType.Bool);
public static readonly Cue PowerOff = new Cue("PowerOff", 103, eCueType.Bool);
public static readonly Cue HasPowerFeedback = new Cue("HasPowerFeedback", 101, eCueType.Bool);
public static readonly Cue PowerOnFeedback = new Cue("PowerOnFeedback", 102, eCueType.Bool);
public static readonly Cue IsOnlineFeedback = new Cue("IsOnlineFeedback", 104, eCueType.Bool);
public static readonly Cue IsWarmingUp = new Cue("IsWarmingUp", 105, eCueType.Bool);
public static readonly Cue IsCoolingDown = new Cue("IsCoolingDown", 106, eCueType.Bool);
public static readonly Cue Dash = new Cue("Dash", 109, eCueType.Bool);
public static readonly Cue Digit0 = new Cue("Digit0", 110, eCueType.Bool);
public static readonly Cue Digit1 = new Cue("Digit1", 111, eCueType.Bool);
public static readonly Cue Digit2 = new Cue("Digit2", 112, eCueType.Bool);
public static readonly Cue Digit3 = new Cue("Digit3", 113, eCueType.Bool);
public static readonly Cue Digit4 = new Cue("Digit4", 114, eCueType.Bool);
public static readonly Cue Digit5 = new Cue("Digit5", 115, eCueType.Bool);
public static readonly Cue Digit6 = new Cue("Digit6", 116, eCueType.Bool);
public static readonly Cue Digit7 = new Cue("Digit7", 117, eCueType.Bool);
public static readonly Cue Digit8 = new Cue("Digit8", 118, eCueType.Bool);
public static readonly Cue Digit9 = new Cue("Digit9", 119, eCueType.Bool);
public static readonly Cue KeypadMisc1 = new Cue("KeypadMisc1", 120, eCueType.Bool);
public static readonly Cue KeypadMisc2 = new Cue("KeypadMisc2", 121, eCueType.Bool);
public static readonly Cue NumericEnter = new Cue("Enter", 122, eCueType.Bool);
public static readonly Cue ChannelUp = new Cue("ChannelUp", 123, eCueType.Bool);
public static readonly Cue ChannelDown = new Cue("ChannelDown", 124, eCueType.Bool);
public static readonly Cue Last = new Cue("Last", 125, eCueType.Bool);
public static readonly Cue OpenClose = new Cue("OpenClose", 126, eCueType.Bool);
public static readonly Cue Subtitle = new Cue("Subtitle", 127, eCueType.Bool);
public static readonly Cue Audio = new Cue("Audio", 128, eCueType.Bool);
public static readonly Cue Info = new Cue("Info", 129, eCueType.Bool);
public static readonly Cue Menu = new Cue("Menu", 130, eCueType.Bool);
public static readonly Cue DeviceMenu = new Cue("DeviceMenu", 131, eCueType.Bool);
public static readonly Cue Return = new Cue("Return", 132, eCueType.Bool);
public static readonly Cue Back = new Cue("Back", 133, eCueType.Bool);
public static readonly Cue Exit = new Cue("Exit", 134, eCueType.Bool);
public static readonly Cue Clear = new Cue("Clear", 135, eCueType.Bool);
public static readonly Cue List = new Cue("List", 136, eCueType.Bool);
public static readonly Cue Guide = new Cue("Guide", 137, eCueType.Bool);
public static readonly Cue Am = new Cue("Am", 136, eCueType.Bool);
public static readonly Cue Fm = new Cue("Fm", 137, eCueType.Bool);
public static readonly Cue Up = new Cue("Up", 138, eCueType.Bool);
public static readonly Cue Down = new Cue("Down", 139, eCueType.Bool);
public static readonly Cue Left = new Cue("Left", 140, eCueType.Bool);
public static readonly Cue Right = new Cue("Right", 141, eCueType.Bool);
public static readonly Cue Select = new Cue("Select", 142, eCueType.Bool);
public static readonly Cue SmartApps = new Cue("SmartApps", 143, eCueType.Bool);
public static readonly Cue Dvr = new Cue("Dvr", 144, eCueType.Bool);
public static readonly Cue Play = new Cue("Play", 145, eCueType.Bool);
public static readonly Cue Pause = new Cue("Pause", 146, eCueType.Bool);
public static readonly Cue Stop = new Cue("Stop", 147, eCueType.Bool);
public static readonly Cue ChapNext = new Cue("ChapNext", 148, eCueType.Bool);
public static readonly Cue ChapPrevious = new Cue("ChapPrevious", 149, eCueType.Bool);
public static readonly Cue Rewind = new Cue("Rewind", 150, eCueType.Bool);
public static readonly Cue Ffwd = new Cue("Ffwd", 151, eCueType.Bool);
public static readonly Cue Replay = new Cue("Replay", 152, eCueType.Bool);
public static readonly Cue Advance = new Cue("Advance", 153, eCueType.Bool);
public static readonly Cue Record = new Cue("Record", 154, eCueType.Bool);
public static readonly Cue Red = new Cue("Red", 155, eCueType.Bool);
public static readonly Cue Green = new Cue("Green", 156, eCueType.Bool);
public static readonly Cue Yellow = new Cue("Yellow", 157, eCueType.Bool);
public static readonly Cue Blue = new Cue("Blue", 158, eCueType.Bool);
public static readonly Cue Home = new Cue("Home", 159, eCueType.Bool);
public static readonly Cue PopUp = new Cue("PopUp", 160, eCueType.Bool);
public static readonly Cue PageUp = new Cue("PageUp", 161, eCueType.Bool);
public static readonly Cue PageDown = new Cue("PageDown", 162, eCueType.Bool);
public static readonly Cue Search = new Cue("Search", 163, eCueType.Bool);
public static readonly Cue Setup = new Cue("Setup", 164, eCueType.Bool);
public static readonly Cue RStep = new Cue("RStep", 165, eCueType.Bool);
public static readonly Cue FStep = new Cue("FStep", 166, eCueType.Bool);
public static readonly Cue IsConnected = new Cue("IsConnected", 281, eCueType.Bool);
public static readonly Cue IsOk = new Cue("IsOk", 282, eCueType.Bool);
public static readonly Cue InWarning = new Cue("InWarning", 283, eCueType.Bool);
public static readonly Cue InError = new Cue("InError", 284, eCueType.Bool);
public static readonly Cue StatusUnknown = new Cue("StatusUnknown", 285, eCueType.Bool);
public static readonly Cue VolumeUp = new Cue("VolumeUp", 401, eCueType.Bool);
public static readonly Cue VolumeDown = new Cue("VolumeDown", 402, eCueType.Bool);
public static readonly Cue MuteOn = new Cue("MuteOn", 403, eCueType.Bool);
public static readonly Cue MuteOff = new Cue("MuteOff", 404, eCueType.Bool);
public static readonly Cue MuteToggle = new Cue("MuteToggle", 405, eCueType.Bool);
public static readonly Cue ShowVolumeButtons = new Cue("ShowVolumeButtons", 406, eCueType.Bool);
public static readonly Cue ShowVolumeSlider = new Cue("ShowVolumeSlider", 407, eCueType.Bool);
public static readonly Cue Hdmi1 = new Cue("Hdmi1", 451, eCueType.Bool);
public static readonly Cue Hdmi2 = new Cue("Hdmi2", 452, eCueType.Bool);
public static readonly Cue Hdmi3 = new Cue("Hdmi3", 453, eCueType.Bool);
public static readonly Cue Hdmi4 = new Cue("Hdmi4", 454, eCueType.Bool);
public static readonly Cue Hdmi5 = new Cue("Hdmi5", 455, eCueType.Bool);
public static readonly Cue Hdmi6 = new Cue("Hdmi6", 456, eCueType.Bool);
public static readonly Cue DisplayPort1 = new Cue("DisplayPort1", 457, eCueType.Bool);
public static readonly Cue DisplayPort2 = new Cue("DisplayPort2", 458, eCueType.Bool);
public static readonly Cue Dvi1 = new Cue("Dvi1", 459, eCueType.Bool);
public static readonly Cue Dvi2 = new Cue("Dvi2", 460, eCueType.Bool);
public static readonly Cue Video1 = new Cue("Video1", 461, eCueType.Bool);
public static readonly Cue Video2 = new Cue("Video2", 462, eCueType.Bool);
public static readonly Cue Component1 = new Cue("Component1", 463, eCueType.Bool);
public static readonly Cue Component2 = new Cue("Component2", 464, eCueType.Bool);
public static readonly Cue Vga1 = new Cue("Vga1", 465, eCueType.Bool);
public static readonly Cue Vga2 = new Cue("Vga2", 466, eCueType.Bool);
public static readonly Cue Rgb1 = new Cue("Rgb1", 467, eCueType.Bool);
public static readonly Cue Rgb2 = new Cue("Rgb2", 468, eCueType.Bool);
public static readonly Cue Antenna = new Cue("Antenna", 469, eCueType.Bool);
public static readonly Cue InCall = new Cue("InCall", 501, eCueType.Bool);
}
public static class CommonIntCue
{
public static readonly Cue MainVolumeLevel = new Cue("MainVolumeLevel", 401, eCueType.Int);
public static readonly Cue MainVolumeLevelFeedback = new Cue("MainVolumeLevelFeedback", 401, eCueType.Int);
}
public static class CommonStringCue
{
public static readonly Cue IpConnectionsText = new Cue("IpConnectionsText", 9999, eCueType.String);
}
}

View File

@@ -45,24 +45,4 @@ namespace PepperDash.Essentials.Core
dev.PowerIsOnFeedback.UnlinkInputSig(triList.BooleanInput[101]);
}
}
/*
public static class IFusionPowerExtensions
{
public static void LinkAttributes(this IPower dev, FusionRoom room)
{
dev.PowerIsOnFeedback.LinkInputSig(room.DisplayPowerOn.InputSig);
room.DisplayPowerOn.OutputSig.SetSigFalseAction(dev.PowerOn);
room.DisplayPowerOff.OutputSig.SetSigFalseAction(dev.PowerOff);
}
public static void UnlinkAttributes(this IPower dev, FusionRoom room)
{
dev.PowerIsOnFeedback.UnlinkInputSig(room.DisplayPowerOn.InputSig);
room.DisplayPowerOn.OutputSig.SetSigFalseAction(null);
room.DisplayPowerOff.OutputSig.SetSigFalseAction(null);
}
}
*/
}

View File

@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
namespace PepperDash.Essentials.Core
{
/// <summary>
/// Requirements for a device that has dialing capabilities
/// </summary>
public interface IHasDialer
{
// Add requirements for Dialer functionality
void Dial(string number);
void EndCall();
void AcceptCall();
void RejectCall();
BoolFeedback InCallFeedback { get; }
BoolFeedback IncomingCallFeedback { get; }
}
}

View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
namespace PepperDash.Essentials.Core
{
/// <summary>
/// Indicates that the device has the capability to share sources outside the local room
/// </summary>
public interface IHasSharing
{
BoolFeedback SharingSourceFeedback { get; }
}
}

View File

@@ -1,98 +1,127 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
namespace PepperDash.Essentials.Core
{
/// <summary>
/// Defines minimal volume control methods
/// </summary>
public interface IBasicVolumeControls
{
void VolumeUp(bool pressRelease);
void VolumeDown(bool pressRelease);
void MuteToggle();
}
/// <summary>
/// Adds feedback and direct volume level set to IBasicVolumeControls
/// </summary>
public interface IBasicVolumeWithFeedback : IBasicVolumeControls
{
void SetVolume(ushort level);
void MuteOn();
void MuteOff();
IntFeedback VolumeLevelFeedback { get; }
BoolFeedback MuteFeedback { get; }
}
/// <summary>
///
/// </summary>
public interface IFullAudioSettings : IBasicVolumeWithFeedback
{
void SetBalance(ushort level);
void BalanceLeft(bool pressRelease);
void BalanceRight(bool pressRelease);
void SetBass(ushort level);
void BassUp(bool pressRelease);
void BassDown(bool pressRelease);
void SetTreble(ushort level);
void TrebleUp(bool pressRelease);
void TrebleDown(bool pressRelease);
bool hasMaxVolume { get; }
void SetMaxVolume(ushort level);
void MaxVolumeUp(bool pressRelease);
void MaxVolumeDown(bool pressRelease);
bool hasDefaultVolume { get; }
void SetDefaultVolume(ushort level);
void DefaultVolumeUp(bool pressRelease);
void DefaultVolumeDown(bool pressRelease);
void LoudnessToggle();
void MonoToggle();
BoolFeedback LoudnessFeedback { get; }
BoolFeedback MonoFeedback { get; }
IntFeedback BalanceFeedback { get; }
IntFeedback BassFeedback { get; }
IntFeedback TrebleFeedback { get; }
IntFeedback MaxVolumeFeedback { get; }
IntFeedback DefaultVolumeFeedback { get; }
}
/// <summary>
/// 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
/// to their linked volume control.
/// </summary>
public interface IHasVolumeDevice
{
IBasicVolumeControls VolumeDevice { get; }
}
/// <summary>
/// Identifies a device that contains audio zones
/// </summary>
public interface IAudioZones : IRouting
{
Dictionary<uint, IAudioZone> Zone { get; }
}
/// <summary>
/// Defines minimum functionality for an audio zone
/// </summary>
public interface IAudioZone : IBasicVolumeWithFeedback
{
void SelectInput(ushort input);
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
namespace PepperDash.Essentials.Core
{
/// <summary>
/// Defines minimal volume control methods
/// </summary>
public interface IBasicVolumeControls
{
void VolumeUp(bool pressRelease);
void VolumeDown(bool pressRelease);
void MuteToggle();
}
/// <summary>
/// Adds feedback and direct volume level set to IBasicVolumeControls
/// </summary>
public interface IBasicVolumeWithFeedback : IBasicVolumeControls
{
void SetVolume(ushort level);
void MuteOn();
void MuteOff();
IntFeedback VolumeLevelFeedback { get; }
BoolFeedback MuteFeedback { get; }
}
/// <summary>
///
/// </summary>
public interface IFullAudioSettings : IBasicVolumeWithFeedback
{
void SetBalance(ushort level);
void BalanceLeft(bool pressRelease);
void BalanceRight(bool pressRelease);
void SetBass(ushort level);
void BassUp(bool pressRelease);
void BassDown(bool pressRelease);
void SetTreble(ushort level);
void TrebleUp(bool pressRelease);
void TrebleDown(bool pressRelease);
bool hasMaxVolume { get; }
void SetMaxVolume(ushort level);
void MaxVolumeUp(bool pressRelease);
void MaxVolumeDown(bool pressRelease);
bool hasDefaultVolume { get; }
void SetDefaultVolume(ushort level);
void DefaultVolumeUp(bool pressRelease);
void DefaultVolumeDown(bool pressRelease);
void LoudnessToggle();
void MonoToggle();
BoolFeedback LoudnessFeedback { get; }
BoolFeedback MonoFeedback { get; }
IntFeedback BalanceFeedback { get; }
IntFeedback BassFeedback { get; }
IntFeedback TrebleFeedback { get; }
IntFeedback MaxVolumeFeedback { get; }
IntFeedback DefaultVolumeFeedback { get; }
}
/// <summary>
/// Defines minimum volume controls for a codec device with dialing capabilities
/// </summary>
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; }
}
/// <summary>
/// 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
/// to their linked volume control.
/// </summary>
public interface IHasVolumeDevice
{
IBasicVolumeControls VolumeDevice { get; }
}
/// <summary>
/// Identifies a device that contains audio zones
/// </summary>
public interface IAudioZones : IRouting
{
Dictionary<uint, IAudioZone> Zone { get; }
}
/// <summary>
/// Defines minimum functionality for an audio zone
/// </summary>
public interface IAudioZone : IBasicVolumeWithFeedback
{
void SelectInput(ushort input);
}
}

View File

@@ -103,6 +103,8 @@
<Reference Include="System.Data" />
</ItemGroup>
<ItemGroup>
<Compile Include="Devices\IHasDialer.cs" />
<Compile Include="Devices\IHasSharing.cs" />
<Compile Include="Ramps and Increments\ActionIncrementer.cs" />
<Compile Include="Comm and IR\CommFactory.cs" />
<Compile Include="Comm and IR\CommunicationExtras.cs" />

View File

@@ -46,6 +46,14 @@
<GenerateSerializationAssemblies>off</GenerateSerializationAssemblies>
</PropertyGroup>
<ItemGroup>
<Reference Include="Cisco One Button To Push, Version=1.0.0.29558, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Crestron Cisco OBTP\OBTP\bin\Cisco One Button To Push.dll</HintPath>
</Reference>
<Reference Include="Cisco SX80 Corporate Phone Book, Version=1.0.0.15355, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\CodeBlue\libraries\Cisco CODEC\Cisco SX80 Corporate Phone Book\Cisco SX80 Corporate Phone Book\bin\Cisco SX80 Corporate Phone Book.dll</HintPath>
</Reference>
<Reference Include="Crestron.SimplSharpPro.DeviceSupport, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DeviceSupport.dll</HintPath>
@@ -119,6 +127,11 @@
<Compile Include="SetTopBox\IRSetTopBoxBase.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Streaming\Roku.cs" />
<Compile Include="VC\Cisco\Configuration.cs" />
<Compile Include="VC\Cisco\HttpApiServer.cs" />
<Compile Include="VC\Cisco\Status.cs" />
<Compile Include="VC\Cisco\CiscoCodec.cs" />
<Compile Include="VC\VideoCodecBase.cs" />
<None Include="Properties\ControlSystem.cfg" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />

View File

@@ -0,0 +1,388 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharp.Net.Https;
using Crestron.SimplSharp.CrestronXml;
using Crestron.SimplSharp.CrestronXml.Serialization;
using Newtonsoft.Json;
using Cisco_One_Button_To_Push;
using Cisco_SX80_Corporate_Phone_Book;
using PepperDash.Core;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Devices.VideoCodec.Cisco
{
enum eCommandType { SessionStart, SessionEnd, Command, GetStatus, GetConfiguration };
public class CiscoCodec : VideoCodecBase
{
public IBasicCommunication Communication { get; private set; }
public StatusMonitorBase CommunicationMonitor { get; private set; }
private CiscoOneButtonToPush CodecObtp;
private Corporate_Phone_Book PhoneBook;
private CiscoCodecConfiguration.Configuration CodecConfiguration;
private CiscoCodecStatus.Status CodecStatus;
private HttpsClient Client;
private HttpApiServer Server;
private int ServerPort;
private string CodecUrl;
private string HttpSessionId;
private string FeedbackRegistrationExpression;
// Constructor for IBasicCommunication
public CiscoCodec(string key, string name, IBasicCommunication comm, int serverPort)
: base(key, name)
{
Communication = comm;
Communication.TextReceived += new EventHandler<GenericCommMethodReceiveTextArgs>(Communication_TextReceived);
ServerPort = serverPort;
CodecObtp = new CiscoOneButtonToPush();
PhoneBook = new Corporate_Phone_Book();
CodecConfiguration = new CiscoCodecConfiguration.Configuration();
CodecStatus = new CiscoCodecStatus.Status();
Client = new HttpsClient();
Server = new HttpApiServer();
}
/// <summary>
/// Starts the HTTP feedback server and syncronizes state of codec
/// </summary>
/// <returns></returns>
public override bool CustomActivate()
{
Debug.Console(1, this, "Starting Cisco API Server");
Server.Start(ServerPort);
Server.ApiRequest += new EventHandler<Crestron.SimplSharp.Net.Http.OnHttpRequestArgs>(Server_ApiRequest);
CodecUrl = string.Format("http://{0}", (Communication as GenericSshClient).Hostname);
CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, 2000, 120000, 300000, "xStatus SystemUnit Software Version\r");
DeviceManager.AddDevice(CommunicationMonitor);
Client = new HttpsClient();
Client.Verbose = true;
Client.KeepAlive = true;
// Temp feedback registration
FeedbackRegistrationExpression =
"<Command><HttpFeedback><Register command=\"True\"><FeedbackSlot>1</FeedbackSlot>" +
string.Format("<ServerUrl>http://{0}:{1}/cisco/api</ServerUrl>", CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 0), ServerPort) +
"<Format>JSON</Format>" +
"<Expression item=\"1\">/Configuration</Expression>" +
"<Expression item=\"2\">/Event/CallDisconnect</Expression>" +
"<Expression item=\"3\">/Status/Call</Expression>" +
"</Register>" +
"</HttpFeedback>" +
"</Command>";
StartHttpsSession();
//CodecObtp.Initialize();
//CodecObtp.GetMeetings();
//PhoneBook.DownloadPhoneBook(Corporate_Phone_Book.ePhoneBookLocation.Corporate);
return base.CustomActivate();
}
private void StartHttpsSession()
{
SendHttpCommand("", eCommandType.SessionStart);
}
private void EndHttpsSession()
{
SendHttpCommand("", eCommandType.SessionEnd);
}
private void SendHttpCommand(string command, eCommandType commandType)
{
HttpsClientRequest request = new HttpsClientRequest();
string urlSuffix = null;
Client.UserName = null;
Client.Password = null;
Client.PeerVerification = false;
Client.HostVerification = false;
request.RequestType = RequestType.Post;
if(!string.IsNullOrEmpty(HttpSessionId))
request.Header.SetHeaderValue("Cookie", HttpSessionId);
switch (commandType)
{
case eCommandType.Command:
{
urlSuffix = "/putxml";
request.ContentString = command;
request.Header.SetHeaderValue("Content-Type", "text/xml");
break;
}
case eCommandType.SessionStart:
{
urlSuffix = "/xmlapi/session/begin";
Client.UserName = (Communication as GenericSshClient).Username;
Client.Password = (Communication as GenericSshClient).Password;
break;
}
case eCommandType.SessionEnd:
{
urlSuffix = "/xmlapi/session/end";
request.Header.SetHeaderValue("Cookie", HttpSessionId);
break;
}
case eCommandType.GetStatus:
{
request.RequestType = RequestType.Get;
request.Header.SetHeaderValue("Content-Type", "text/xml");
urlSuffix = "/getxml?location=/Status";
break;
}
case eCommandType.GetConfiguration:
{
request.RequestType = RequestType.Get;
request.Header.SetHeaderValue("Content-Type", "text/xml");
urlSuffix = "/getxml?location=/Configuration";
break;
}
}
var requestUrl = CodecUrl + urlSuffix;
request.Header.RequestVersion = "HTTP/1.1";
request.Url.Parse(requestUrl);
Debug.Console(1, this, "Sending HTTP request to Cisco Codec at {0}\nHeader:\n{1}\nContent:\n{2}", requestUrl, request.Header, request.ContentString);
Client.DispatchAsync(request, PostConnectionCallback);
}
void PostConnectionCallback(HttpsClientResponse resp, HTTP_CALLBACK_ERROR err)
{
try
{
if (resp != null)
{
if (resp.Code == 200)
{
Debug.Console(1, this, "Http Post to Cisco Codec Successful. Code: {0}\nContent: {1}", resp.Code, resp.ContentString);
if (resp.ContentString.IndexOf("<HttpFeedbackRegisterResult status=\"OK\">") > 1)
{
// Get the initial configruation for sync purposes
SendHttpCommand("", eCommandType.GetConfiguration);
}
else
{
try
{
if (resp.ContentString.IndexOf("</Configuration>") > -1)
{
XmlReaderSettings settings = new XmlReaderSettings();
XmlReader reader = new XmlReader(resp.ContentString, settings);
CodecConfiguration = CrestronXMLSerialization.DeSerializeObject<CiscoCodecConfiguration.Configuration>(reader);
Debug.Console(1, this, "Product Name: {0} Software Version: {1} ApiVersion: {2}", CodecConfiguration.Product, CodecConfiguration.Version, CodecConfiguration.ApiVersion);
// Get the initial status for sync purposes
SendHttpCommand("", eCommandType.GetStatus);
}
else if (resp.ContentString.IndexOf("</Status>") > -1)
{
XmlReaderSettings settings = new XmlReaderSettings();
XmlReader reader = new XmlReader(resp.ContentString, settings);
CodecStatus = CrestronXMLSerialization.DeSerializeObject<CiscoCodecStatus.Status>(reader);
Debug.Console(1, this, "Product Name: {0} Software Version: {1} ApiVersion: {2} Volume: {3}", CodecStatus.Product, CodecStatus.Version, CodecStatus.ApiVersion, CodecStatus.Audio.Volume);
}
}
catch (Exception ex)
{
Debug.Console(1, this, "Error Deserializing XML document from codec: {0}", ex);
}
}
}
else if (resp.Code == 204)
{
Debug.Console(1, this, "Response Code: {0}\nHeader:\n{1}Content:\n{1}", resp.Code, resp.Header, resp.ContentString);
HttpSessionId = resp.Header.GetHeaderValue("Set-Cookie");
//var chunks = HttpSessionId.Split(';');
//HttpSessionId = chunks[0];
//HttpSessionId = HttpSessionId.Substring(HttpSessionId.IndexOf("=") + 1);
// Register for feedbacks once we have a valid session
SendHttpCommand(FeedbackRegistrationExpression, eCommandType.Command);
}
else
{
Debug.Console(1, this, "Response Code: {0}\nHeader:\n{1}Content:\n{1}Err:\n{2}", resp.Code, resp.Header, resp.ContentString, err);
}
}
else
Debug.Console(1, this, "Null response received from server");
}
catch (Exception e)
{
Debug.Console(1, this, "Error Initializing HTTPS Client: {0}", e);
}
}
void Server_ApiRequest(object sender, Crestron.SimplSharp.Net.Http.OnHttpRequestArgs e)
{
Debug.Console(1, this, "Api Reqeust from Codec: {0}", e.Request.ContentString);
e.Response.Code = 200;
e.Response.ContentString = "OK";
try
{
// Serializer settings. We want to ignore null values and mising members
JsonSerializerSettings settings = new JsonSerializerSettings();
settings.NullValueHandling = NullValueHandling.Ignore;
settings.MissingMemberHandling = MissingMemberHandling.Ignore;
if (e.Request.ContentString.IndexOf("\"Configuration\":{") > -1)
CodecConfiguration = JsonConvert.DeserializeObject<CiscoCodecConfiguration.Configuration>(e.Request.ContentString, settings);
else if (e.Request.ContentString.IndexOf("\"Status\":{") > -1)
CodecStatus = JsonConvert.DeserializeObject<CiscoCodecStatus.Status>(e.Request.ContentString, settings);
}
catch (Exception ex)
{
Debug.Console(1, this, "Error Deserializing feedback from codec: {0}", ex);
}
}
void Communication_TextReceived(object sender, GenericCommMethodReceiveTextArgs e)
{
//CodecObtp.
}
public override void ExecuteSwitch(object selector)
{
throw new NotImplementedException();
}
protected override Func<bool> InCallFeedbackFunc { get { return () => false; } }
protected override Func<bool> IncomingCallFeedbackFunc { get { return () => false; } }
protected override Func<bool> TransmitMuteFeedbackFunc { get { return () => false; } }
protected override Func<bool> ReceiveMuteFeedbackFunc { get { return () => false; } }
protected override Func<bool> PrivacyModeFeedbackFunc { get { return () => false; } }
public override void Dial()
{
}
public override void EndCall()
{
}
public override void AcceptCall()
{
}
public override void RejectCall()
{
}
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()
{
}
public override void PrivacyModeOff()
{
}
public override void PrivacyModeToggle()
{
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,106 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharp.Net.Http;
using PepperDash.Core;
namespace PepperDash.Essentials.Devices.VideoCodec.Cisco
{
public class HttpApiServer
{
public static Dictionary<string, string> ExtensionContentTypes;
public event EventHandler<OnHttpRequestArgs> ApiRequest;
public Crestron.SimplSharp.Net.Http.HttpServer HttpServer { get; private set; }
public string HtmlRoot { get; set; }
/// <summary>
/// SIMPL+ can only execute the default constructor. If you have variables that require initialization, please
/// use an Initialize method
/// </summary>
public HttpApiServer()
{
ExtensionContentTypes = new Dictionary<string, string>
{
{ ".css", "text/css" },
{ ".htm", "text/html" },
{ ".html", "text/html" },
{ ".jpg", "image/jpeg" },
{ ".jpeg", "image/jpeg" },
{ ".js", "application/javascript" },
{ ".json", "application/json" },
{ ".xml", "text/xml" },
{ ".map", "application/x-navimap" },
{ ".pdf", "application.pdf" },
{ ".png", "image/png" },
{ ".txt", "text/plain" },
};
HtmlRoot = @"\HTML";
}
public void Start(int port)
{
// TEMP - this should be inserted by configuring class
HttpServer = new Crestron.SimplSharp.Net.Http.HttpServer();
HttpServer.ServerName = "Cisco API Server";
HttpServer.KeepAlive = true;
HttpServer.Port = port;
HttpServer.OnHttpRequest += Server_Request;
HttpServer.Open();
CrestronEnvironment.ProgramStatusEventHandler += (a) =>
{
if (a == eProgramStatusEventType.Stopping)
{
HttpServer.Close();
Debug.Console(1, "Shutting down HTTP Server on port {0}", HttpServer.Port);
}
};
}
void Server_Request(object sender, OnHttpRequestArgs args)
{
if (args.Request.Header.RequestType == "OPTIONS")
{
Debug.Console(2, "Asking for OPTIONS");
args.Response.Header.SetHeaderValue("Access-Control-Allow-Origin", "*");
args.Response.Header.SetHeaderValue("Access-Control-Allow-Methods", "GET, POST, PATCH, PUT, DELETE, OPTIONS");
return;
}
string path = Uri.UnescapeDataString(args.Request.Path);
var host = args.Request.DataConnection.RemoteEndPointAddress;
//string authToken;
Debug.Console(2, "HTTP Request: {2}: Path='{0}' ?'{1}'", path, args.Request.QueryString, host);
// ----------------------------------- ADD AUTH HERE
if (path.StartsWith("/cisco/api"))
{
var handler = ApiRequest;
if (ApiRequest != null)
ApiRequest(this, args);
}
}
public static string GetContentType(string extension)
{
string type;
if (ExtensionContentTypes.ContainsKey(extension))
type = ExtensionContentTypes[extension];
else
type = "text/plain";
return type;
}
}
}

View File

@@ -0,0 +1,872 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharp.CrestronXml.Serialization;
namespace PepperDash.Essentials.Devices.VideoCodec.Cisco
{
public class CiscoCodecStatus
{
//[XmlRoot(ElementName="Microphone")]
public class Microphone {
//[XmlElement(ElementName="ConnectionStatus")]
public string ConnectionStatus { get; set; }
//[XmlAttribute(AttributeName="item")]
public string Item { get; set; }
//[XmlAttribute(AttributeName="maxOccurrence")]
public string MaxOccurrence { get; set; }
}
//[XmlRoot(ElementName="Connectors")]
public class Connectors {
//[XmlElement(ElementName="Microphone")]
public List<Microphone> Microphone { get; set; }
//[XmlElement(ElementName="Line")]
public Line Line { get; set; }
}
//[XmlRoot(ElementName="Input")]
public class Input {
//[XmlElement(ElementName="Connectors")]
public Connectors Connectors { get; set; }
//[XmlElement(ElementName="Connector")]
public List<Connector> Connector { get; set; }
//[XmlElement(ElementName="MainVideoSource")]
public string MainVideoSource { get; set; }
//[XmlElement(ElementName="Source")]
public List<Source> Source { get; set; }
}
//[XmlRoot(ElementName="Microphones")]
public class Microphones {
//[XmlElement(ElementName="Mute")]
public string Mute { get; set; }
}
//[XmlRoot(ElementName="Line")]
public class Line {
//[XmlElement(ElementName="ConnectionStatus")]
public string ConnectionStatus { get; set; }
//[XmlElement(ElementName="DelayMs")]
public string DelayMs { get; set; }
//[XmlAttribute(AttributeName="item")]
public string Item { get; set; }
//[XmlAttribute(AttributeName="maxOccurrence")]
public string MaxOccurrence { get; set; }
}
//[XmlRoot(ElementName="Output")]
public class Output {
//[XmlElement(ElementName="Connectors")]
public Connectors Connectors { get; set; }
//[XmlElement(ElementName="Connector")]
public List<Connector> Connector { get; set; }
}
//[XmlRoot(ElementName="Audio")]
public class Audio {
//[XmlElement(ElementName="Input")]
public Input Input { get; set; }
//[XmlElement(ElementName="Microphones")]
public Microphones Microphones { get; set; }
//[XmlElement(ElementName="Output")]
public Output Output { get; set; }
//[XmlElement(ElementName="Volume")]
public string Volume { get; set; }
//[XmlElement(ElementName="VolumeMute")]
public string VolumeMute { get; set; }
}
//[XmlRoot(ElementName="Current")]
public class Current {
//[XmlElement(ElementName="Id")]
public string Id { get; set; }
//[XmlElement(ElementName="CompletedAt")]
public string CompletedAt { get; set; }
//[XmlElement(ElementName="URL")]
public string URL { get; set; }
//[XmlElement(ElementName="VersionId")]
public string VersionId { get; set; }
}
//[XmlRoot(ElementName="Bookings")]
public class Bookings {
//[XmlElement(ElementName="Current")]
public Current Current { get; set; }
}
//[XmlRoot(ElementName="Capabilities")]
public class Capabilities {
//[XmlElement(ElementName="Options")]
public string Options { get; set; }
//[XmlElement(ElementName="Conference")]
public Conference Conference { get; set; }
}
//[XmlRoot(ElementName="Position")]
public class Position {
//[XmlElement(ElementName="Pan")]
public string Pan { get; set; }
//[XmlElement(ElementName="Tilt")]
public string Tilt { get; set; }
//[XmlElement(ElementName="Zoom")]
public string Zoom { get; set; }
}
//[XmlRoot(ElementName="Camera")]
public class Camera {
//[XmlElement(ElementName="Capabilities")]
public Capabilities Capabilities { get; set; }
//[XmlElement(ElementName="Connected")]
public string Connected { get; set; }
//[XmlElement(ElementName="Framerate")]
public string Framerate { get; set; }
//[XmlElement(ElementName="Manufacturer")]
public string Manufacturer { get; set; }
//[XmlElement(ElementName="Model")]
public string Model { get; set; }
//[XmlElement(ElementName="Position")]
public Position Position { get; set; }
//[XmlAttribute(AttributeName="item")]
public string Item { get; set; }
//[XmlAttribute(AttributeName="maxOccurrence")]
public string MaxOccurrence { get; set; }
}
//[XmlRoot(ElementName="SpeakerTrack")]
public class SpeakerTrack {
//[XmlElement(ElementName="Availability")]
public string Availability { get; set; }
//[XmlElement(ElementName="Status")]
public string Status { get; set; }
}
//[XmlRoot(ElementName="Cameras")]
public class Cameras {
//[XmlElement(ElementName="Camera")]
public Camera Camera { get; set; }
//[XmlElement(ElementName="SpeakerTrack")]
public SpeakerTrack SpeakerTrack { get; set; }
}
//[XmlRoot(ElementName="Conference")]
public class Conference {
//[XmlElement(ElementName="MaxActiveCalls")]
public string MaxActiveCalls { get; set; }
//[XmlElement(ElementName="MaxAudioCalls")]
public string MaxAudioCalls { get; set; }
//[XmlElement(ElementName="MaxCalls")]
public string MaxCalls { get; set; }
//[XmlElement(ElementName="MaxVideoCalls")]
public string MaxVideoCalls { get; set; }
//[XmlElement(ElementName="ActiveSpeaker")]
public ActiveSpeaker ActiveSpeaker { get; set; }
//[XmlElement(ElementName="DoNotDisturb")]
public string DoNotDisturb { get; set; }
//[XmlElement(ElementName="Multipoint")]
public Multipoint Multipoint { get; set; }
//[XmlElement(ElementName="Presentation")]
public Presentation Presentation { get; set; }
//[XmlElement(ElementName="SpeakerLock")]
public SpeakerLock SpeakerLock { get; set; }
}
//[XmlRoot(ElementName="ActiveSpeaker")]
public class ActiveSpeaker {
//[XmlElement(ElementName="CallId")]
public string CallId { get; set; }
//[XmlElement(ElementName="PIPPosition")]
public string PIPPosition { get; set; }
}
//[XmlRoot(ElementName="Multipoint")]
public class Multipoint {
//[XmlElement(ElementName="Mode")]
public string Mode { get; set; }
}
//[XmlRoot(ElementName="Whiteboard")]
public class Whiteboard {
//[XmlElement(ElementName="Mode")]
public string Mode { get; set; }
//[XmlElement(ElementName="ReleaseFloorAvailability")]
public string ReleaseFloorAvailability { get; set; }
//[XmlElement(ElementName="RequestFloorAvailability")]
public string RequestFloorAvailability { get; set; }
}
//[XmlRoot(ElementName="Presentation")]
public class Presentation {
//[XmlElement(ElementName="CallId")]
public string CallId { get; set; }
//[XmlElement(ElementName="Mode")]
public string Mode { get; set; }
//[XmlElement(ElementName="Whiteboard")]
public Whiteboard Whiteboard { get; set; }
//[XmlElement(ElementName="PIPPosition")]
public string PIPPosition { get; set; }
}
//[XmlRoot(ElementName="SpeakerLock")]
public class SpeakerLock {
//[XmlElement(ElementName="CallId")]
public string CallId { get; set; }
//[XmlElement(ElementName="Mode")]
public string Mode { get; set; }
}
//[XmlRoot(ElementName="Message")]
public class Message {
//[XmlElement(ElementName="Description")]
public string Description { get; set; }
//[XmlElement(ElementName="Level")]
public string Level { get; set; }
//[XmlElement(ElementName="References")]
public string References { get; set; }
//[XmlElement(ElementName="Type")]
public string Type { get; set; }
//[XmlAttribute(AttributeName="item")]
public string Item { get; set; }
//[XmlAttribute(AttributeName="maxOccurrence")]
public string MaxOccurrence { get; set; }
}
//[XmlRoot(ElementName="Diagnostics")]
public class Diagnostics {
//[XmlElement(ElementName="Message")]
public List<Message> Message { get; set; }
}
//[XmlRoot(ElementName="Experimental")]
public class Experimental {
//[XmlElement(ElementName="Conference")]
public string Conference { get; set; }
}
//[XmlRoot(ElementName="Gatekeeper")]
public class Gatekeeper {
//[XmlElement(ElementName="Address")]
public string Address { get; set; }
//[XmlElement(ElementName="Port")]
public string Port { get; set; }
//[XmlElement(ElementName="Reason")]
public string Reason { get; set; }
//[XmlElement(ElementName="Status")]
public string Status { get; set; }
}
//[XmlRoot(ElementName="Mode")]
public class Mode {
//[XmlElement(ElementName="Reason")]
public string Reason { get; set; }
//[XmlElement(ElementName="Status")]
public string Status { get; set; }
}
//[XmlRoot(ElementName="H323")]
public class H323 {
//[XmlElement(ElementName="Gatekeeper")]
public Gatekeeper Gatekeeper { get; set; }
//[XmlElement(ElementName="Mode")]
public Mode Mode { get; set; }
}
//[XmlRoot(ElementName="Expression")]
public class Expression {
//[XmlAttribute(AttributeName="item")]
public string Item { get; set; }
//[XmlAttribute(AttributeName="maxOccurrence")]
public string MaxOccurrence { get; set; }
//[XmlText]
public string Text { get; set; }
}
//[XmlRoot(ElementName="HttpFeedback")]
public class HttpFeedback {
//[XmlElement(ElementName="Expression")]
public List<Expression> Expression { get; set; }
//[XmlElement(ElementName="Format")]
public string Format { get; set; }
//[XmlElement(ElementName="URL")]
public string URL { get; set; }
//[XmlAttribute(AttributeName="item")]
public string Item { get; set; }
//[XmlAttribute(AttributeName="maxOccurrence")]
public string MaxOccurrence { get; set; }
}
//[XmlRoot(ElementName="CDP")]
public class CDP {
//[XmlElement(ElementName="Address")]
public string Address { get; set; }
//[XmlElement(ElementName="Capabilities")]
public string Capabilities { get; set; }
//[XmlElement(ElementName="DeviceId")]
public string DeviceId { get; set; }
//[XmlElement(ElementName="Duplex")]
public string Duplex { get; set; }
//[XmlElement(ElementName="Platform")]
public string Platform { get; set; }
//[XmlElement(ElementName="PortID")]
public string PortID { get; set; }
//[XmlElement(ElementName="PrimaryMgmtAddress")]
public string PrimaryMgmtAddress { get; set; }
//[XmlElement(ElementName="SysName")]
public string SysName { get; set; }
//[XmlElement(ElementName="SysObjectID")]
public string SysObjectID { get; set; }
//[XmlElement(ElementName="VTPMgmtDomain")]
public string VTPMgmtDomain { get; set; }
//[XmlElement(ElementName="Version")]
public string Version { get; set; }
//[XmlElement(ElementName="VoIPApplianceVlanID")]
public string VoIPApplianceVlanID { get; set; }
}
//[XmlRoot(ElementName="Domain")]
public class Domain {
//[XmlElement(ElementName="Name")]
public string Name { get; set; }
}
//[XmlRoot(ElementName="Server")]
public class Server {
//[XmlElement(ElementName="Address")]
public string Address { get; set; }
//[XmlAttribute(AttributeName="item")]
public string Item { get; set; }
//[XmlAttribute(AttributeName="maxOccurrence")]
public string MaxOccurrence { get; set; }
}
//[XmlRoot(ElementName="DNS")]
public class DNS {
//[XmlElement(ElementName="Domain")]
public Domain Domain { get; set; }
//[XmlElement(ElementName="Server")]
public List<Server> Server { get; set; }
}
//[XmlRoot(ElementName="Ethernet")]
public class Ethernet {
//[XmlElement(ElementName="MacAddress")]
public string MacAddress { get; set; }
//[XmlElement(ElementName="Speed")]
public string Speed { get; set; }
}
//[XmlRoot(ElementName="IPv4")]
public class IPv4 {
//[XmlElement(ElementName="Address")]
public string Address { get; set; }
//[XmlElement(ElementName="Gateway")]
public string Gateway { get; set; }
//[XmlElement(ElementName="SubnetMask")]
public string SubnetMask { get; set; }
}
//[XmlRoot(ElementName="IPv6")]
public class IPv6 {
//[XmlElement(ElementName="Address")]
public string Address { get; set; }
//[XmlElement(ElementName="Gateway")]
public string Gateway { get; set; }
}
//[XmlRoot(ElementName="Voice")]
public class Voice {
//[XmlElement(ElementName="VlanId")]
public string VlanId { get; set; }
}
//[XmlRoot(ElementName="VLAN")]
public class VLAN {
//[XmlElement(ElementName="Voice")]
public Voice Voice { get; set; }
}
//[XmlRoot(ElementName="Network")]
public class Network {
//[XmlElement(ElementName="CDP")]
public CDP CDP { get; set; }
//[XmlElement(ElementName="DNS")]
public DNS DNS { get; set; }
//[XmlElement(ElementName="Ethernet")]
public Ethernet Ethernet { get; set; }
//[XmlElement(ElementName="IPv4")]
public IPv4 IPv4 { get; set; }
//[XmlElement(ElementName="IPv6")]
public IPv6 IPv6 { get; set; }
//[XmlElement(ElementName="VLAN")]
public VLAN VLAN { get; set; }
//[XmlAttribute(AttributeName="item")]
public string Item { get; set; }
//[XmlAttribute(AttributeName="maxOccurrence")]
public string MaxOccurrence { get; set; }
}
//[XmlRoot(ElementName="NTP")]
public class NTP {
//[XmlElement(ElementName="CurrentAddress")]
public string CurrentAddress { get; set; }
//[XmlElement(ElementName="Server")]
public List<Server> Server { get; set; }
//[XmlElement(ElementName="Status")]
public string Status { get; set; }
}
//[XmlRoot(ElementName="NetworkServices")]
public class NetworkServices {
//[XmlElement(ElementName="NTP")]
public NTP NTP { get; set; }
}
//[XmlRoot(ElementName="ConnectedDevice")]
public class ConnectedDevice {
//[XmlElement(ElementName="HardwareInfo")]
public string HardwareInfo { get; set; }
//[XmlElement(ElementName="ID")]
public string ID { get; set; }
//[XmlElement(ElementName="Name")]
public string Name { get; set; }
//[XmlElement(ElementName="SoftwareInfo")]
public string SoftwareInfo { get; set; }
//[XmlElement(ElementName="Status")]
public string Status { get; set; }
//[XmlElement(ElementName="Type")]
public string Type { get; set; }
//[XmlElement(ElementName="UpgradeStatus")]
public string UpgradeStatus { get; set; }
//[XmlAttribute(AttributeName="item")]
public string Item { get; set; }
//[XmlAttribute(AttributeName="maxOccurrence")]
public string MaxOccurrence { get; set; }
//[XmlElement(ElementName="PreferredFormat")]
public string PreferredFormat { get; set; }
}
//[XmlRoot(ElementName="Peripherals")]
public class Peripherals {
//[XmlElement(ElementName="ConnectedDevice")]
public ConnectedDevice ConnectedDevice { get; set; }
}
//[XmlRoot(ElementName="ExtensionMobility")]
public class ExtensionMobility {
//[XmlElement(ElementName="Enabled")]
public string Enabled { get; set; }
//[XmlElement(ElementName="LastLoggedInUserId")]
public string LastLoggedInUserId { get; set; }
//[XmlElement(ElementName="LoggedIn")]
public string LoggedIn { get; set; }
}
//[XmlRoot(ElementName="CUCM")]
public class CUCM {
//[XmlElement(ElementName="ExtensionMobility")]
public ExtensionMobility ExtensionMobility { get; set; }
}
//[XmlRoot(ElementName="UpgradeStatus")]
public class UpgradeStatus {
//[XmlElement(ElementName="LastChange")]
public string LastChange { get; set; }
//[XmlElement(ElementName="Message")]
public string Message { get; set; }
//[XmlElement(ElementName="Phase")]
public string Phase { get; set; }
//[XmlElement(ElementName="SessionId")]
public string SessionId { get; set; }
//[XmlElement(ElementName="Status")]
public string Status { get; set; }
//[XmlElement(ElementName="URL")]
public string URL { get; set; }
//[XmlElement(ElementName="VersionId")]
public string VersionId { get; set; }
}
//[XmlRoot(ElementName="Software")]
public class Software {
//[XmlElement(ElementName="Current")]
public Current Current { get; set; }
//[XmlElement(ElementName="UpgradeStatus")]
public UpgradeStatus UpgradeStatus { get; set; }
//[XmlElement(ElementName="DisplayName")]
public string DisplayName { get; set; }
//[XmlElement(ElementName="Name")]
public string Name { get; set; }
//[XmlElement(ElementName="OptionKeys")]
public OptionKeys OptionKeys { get; set; }
//[XmlElement(ElementName="ReleaseDate")]
public string ReleaseDate { get; set; }
//[XmlElement(ElementName="Version")]
public string Version { get; set; }
}
//[XmlRoot(ElementName="Provisioning")]
public class Provisioning {
//[XmlElement(ElementName="CUCM")]
public CUCM CUCM { get; set; }
//[XmlElement(ElementName="Software")]
public Software Software { get; set; }
//[XmlElement(ElementName="Status")]
public string Status { get; set; }
}
//[XmlRoot(ElementName="Services")]
public class Services {
//[XmlElement(ElementName="Availability")]
public string Availability { get; set; }
}
//[XmlRoot(ElementName="Proximity")]
public class Proximity {
//[XmlElement(ElementName="Services")]
public Services Services { get; set; }
}
//[XmlRoot(ElementName="PeopleCount")]
public class PeopleCount {
//[XmlElement(ElementName="Current")]
public string Current { get; set; }
}
//[XmlRoot(ElementName="RoomAnalytics")]
public class RoomAnalytics {
//[XmlElement(ElementName="PeopleCount")]
public PeopleCount PeopleCount { get; set; }
//[XmlElement(ElementName="PeoplePresence")]
public string PeoplePresence { get; set; }
}
//[XmlRoot(ElementName="CallForward")]
public class CallForward {
//[XmlElement(ElementName="DisplayName")]
public string DisplayName { get; set; }
//[XmlElement(ElementName="Mode")]
public string Mode { get; set; }
//[XmlElement(ElementName="URI")]
public string URI { get; set; }
}
//[XmlRoot(ElementName="Mailbox")]
public class Mailbox {
//[XmlElement(ElementName="MessagesWaiting")]
public string MessagesWaiting { get; set; }
//[XmlElement(ElementName="URI")]
public string URI { get; set; }
}
//[XmlRoot(ElementName="Proxy")]
public class Proxy {
//[XmlElement(ElementName="Address")]
public string Address { get; set; }
//[XmlElement(ElementName="Status")]
public string Status { get; set; }
//[XmlAttribute(AttributeName="item")]
public string Item { get; set; }
//[XmlAttribute(AttributeName="maxOccurrence")]
public string MaxOccurrence { get; set; }
}
//[XmlRoot(ElementName="Registration")]
public class Registration {
//[XmlElement(ElementName="Reason")]
public string Reason { get; set; }
//[XmlElement(ElementName="Status")]
public string Status { get; set; }
//[XmlElement(ElementName="URI")]
public string URI { get; set; }
//[XmlAttribute(AttributeName="item")]
public string Item { get; set; }
//[XmlAttribute(AttributeName="maxOccurrence")]
public string MaxOccurrence { get; set; }
}
//[XmlRoot(ElementName="SIP")]
public class SIP {
//[XmlElement(ElementName="Authentication")]
public string Authentication { get; set; }
//[XmlElement(ElementName="CallForward")]
public CallForward CallForward { get; set; }
//[XmlElement(ElementName="Mailbox")]
public Mailbox Mailbox { get; set; }
//[XmlElement(ElementName="Proxy")]
public Proxy Proxy { get; set; }
//[XmlElement(ElementName="Registration")]
public Registration Registration { get; set; }
//[XmlElement(ElementName="Secure")]
public string Secure { get; set; }
//[XmlElement(ElementName="Verified")]
public string Verified { get; set; }
}
//[XmlRoot(ElementName="FIPS")]
public class FIPS {
//[XmlElement(ElementName="Mode")]
public string Mode { get; set; }
}
//[XmlRoot(ElementName="Persistency")]
public class Persistency {
//[XmlElement(ElementName="CallHistory")]
public string CallHistory { get; set; }
//[XmlElement(ElementName="Configurations")]
public string Configurations { get; set; }
//[XmlElement(ElementName="DHCP")]
public string DHCP { get; set; }
//[XmlElement(ElementName="InternalLogging")]
public string InternalLogging { get; set; }
//[XmlElement(ElementName="LocalPhonebook")]
public string LocalPhonebook { get; set; }
}
//[XmlRoot(ElementName="Security")]
public class Security {
//[XmlElement(ElementName="FIPS")]
public FIPS FIPS { get; set; }
//[XmlElement(ElementName="Persistency")]
public Persistency Persistency { get; set; }
}
//[XmlRoot(ElementName="Standby")]
public class Standby {
//[XmlElement(ElementName="State")]
public string State { get; set; }
}
//[XmlRoot(ElementName="Module")]
public class Module {
//[XmlElement(ElementName="CompatibilityLevel")]
public string CompatibilityLevel { get; set; }
//[XmlElement(ElementName="SerialNumber")]
public string SerialNumber { get; set; }
}
//[XmlRoot(ElementName="Hardware")]
public class Hardware {
//[XmlElement(ElementName="Module")]
public Module Module { get; set; }
}
//[XmlRoot(ElementName="OptionKeys")]
public class OptionKeys {
//[XmlElement(ElementName="Encryption")]
public string Encryption { get; set; }
//[XmlElement(ElementName="MultiSite")]
public string MultiSite { get; set; }
//[XmlElement(ElementName="RemoteMonitoring")]
public string RemoteMonitoring { get; set; }
}
//[XmlRoot(ElementName="State")]
public class State {
//[XmlElement(ElementName="NumberOfActiveCalls")]
public string NumberOfActiveCalls { get; set; }
//[XmlElement(ElementName="NumberOfInProgressCalls")]
public string NumberOfInProgressCalls { get; set; }
//[XmlElement(ElementName="NumberOfSuspendedCalls")]
public string NumberOfSuspendedCalls { get; set; }
}
//[XmlRoot(ElementName="SystemUnit")]
public class SystemUnit {
//[XmlElement(ElementName="Hardware")]
public Hardware Hardware { get; set; }
//[XmlElement(ElementName="ProductId")]
public string ProductId { get; set; }
//[XmlElement(ElementName="ProductPlatform")]
public string ProductPlatform { get; set; }
//[XmlElement(ElementName="ProductType")]
public string ProductType { get; set; }
//[XmlElement(ElementName="Software")]
public Software Software { get; set; }
//[XmlElement(ElementName="State")]
public State State { get; set; }
//[XmlElement(ElementName="Uptime")]
public string Uptime { get; set; }
}
//[XmlRoot(ElementName="Time")]
public class Time {
//[XmlElement(ElementName="SystemTime")]
public string SystemTime { get; set; }
}
//[XmlRoot(ElementName="ContactMethod")]
public class ContactMethod {
//[XmlElement(ElementName="Number")]
public string Number { get; set; }
//[XmlAttribute(AttributeName="item")]
public string Item { get; set; }
//[XmlAttribute(AttributeName="maxOccurrence")]
public string MaxOccurrence { get; set; }
}
//[XmlRoot(ElementName="ContactInfo")]
public class ContactInfo {
//[XmlElement(ElementName="ContactMethod")]
public List<ContactMethod> ContactMethod { get; set; }
//[XmlElement(ElementName="Name")]
public string Name { get; set; }
}
//[XmlRoot(ElementName="UserInterface")]
public class UserInterface {
//[XmlElement(ElementName="ContactInfo")]
public ContactInfo ContactInfo { get; set; }
}
//[XmlRoot(ElementName="Connector")]
public class Connector {
//[XmlElement(ElementName="Connected")]
public string Connected { get; set; }
//[XmlElement(ElementName="SignalState")]
public string SignalState { get; set; }
//[XmlElement(ElementName="SourceId")]
public string SourceId { get; set; }
//[XmlElement(ElementName="Type")]
public string Type { get; set; }
//[XmlAttribute(AttributeName="item")]
public string Item { get; set; }
//[XmlAttribute(AttributeName="maxOccurrence")]
public string MaxOccurrence { get; set; }
//[XmlElement(ElementName="ConnectedDevice")]
public ConnectedDevice ConnectedDevice { get; set; }
//[XmlElement(ElementName="MonitorRole")]
public string MonitorRole { get; set; }
//[XmlElement(ElementName="Resolution")]
public Resolution Resolution { get; set; }
}
//[XmlRoot(ElementName="Resolution")]
public class Resolution {
//[XmlElement(ElementName="Height")]
public string Height { get; set; }
//[XmlElement(ElementName="RefreshRate")]
public string RefreshRate { get; set; }
//[XmlElement(ElementName="Width")]
public string Width { get; set; }
}
//[XmlRoot(ElementName="Source")]
public class Source {
//[XmlElement(ElementName="ConnectorId")]
public string ConnectorId { get; set; }
//[XmlElement(ElementName="FormatStatus")]
public string FormatStatus { get; set; }
//[XmlElement(ElementName="FormatType")]
public string FormatType { get; set; }
//[XmlElement(ElementName="MediaChannelId")]
public string MediaChannelId { get; set; }
//[XmlElement(ElementName="Resolution")]
public Resolution Resolution { get; set; }
//[XmlAttribute(AttributeName="item")]
public string Item { get; set; }
//[XmlAttribute(AttributeName="maxOccurrence")]
public string MaxOccurrence { get; set; }
}
//[XmlRoot(ElementName="LayoutFamily")]
public class LayoutFamily {
//[XmlElement(ElementName="Local")]
public string Local { get; set; }
}
//[XmlRoot(ElementName="Layout")]
public class Layout {
//[XmlElement(ElementName="LayoutFamily")]
public LayoutFamily LayoutFamily { get; set; }
}
//[XmlRoot(ElementName="Selfview")]
public class Selfview {
//[XmlElement(ElementName="FullscreenMode")]
public string FullscreenMode { get; set; }
//[XmlElement(ElementName="Mode")]
public string Mode { get; set; }
//[XmlElement(ElementName="OnMonitorRole")]
public string OnMonitorRole { get; set; }
//[XmlElement(ElementName="PIPPosition")]
public string PIPPosition { get; set; }
}
//[XmlRoot(ElementName="Video")]
public class Video {
//[XmlElement(ElementName="ActiveSpeaker")]
public ActiveSpeaker ActiveSpeaker { get; set; }
//[XmlElement(ElementName="Input")]
public Input Input { get; set; }
//[XmlElement(ElementName="Layout")]
public Layout Layout { get; set; }
//[XmlElement(ElementName="Monitors")]
public string Monitors { get; set; }
//[XmlElement(ElementName="Output")]
public Output Output { get; set; }
//[XmlElement(ElementName="Presentation")]
public Presentation Presentation { get; set; }
//[XmlElement(ElementName="Selfview")]
public Selfview Selfview { get; set; }
}
//[XmlRoot(ElementName="Status")]
public class Status {
//[XmlElement(ElementName="Audio")]
public Audio Audio { get; set; }
//[XmlElement(ElementName="Bookings")]
public Bookings Bookings { get; set; }
//[XmlElement(ElementName="Cameras")]
public Cameras Cameras { get; set; }
//[XmlElement(ElementName="Capabilities")]
public Capabilities Capabilities { get; set; }
//[XmlElement(ElementName="Conference")]
public Conference Conference { get; set; }
//[XmlElement(ElementName="Diagnostics")]
public Diagnostics Diagnostics { get; set; }
//[XmlElement(ElementName="Experimental")]
public Experimental Experimental { get; set; }
//[XmlElement(ElementName="H323")]
public H323 H323 { get; set; }
//[XmlElement(ElementName="HttpFeedback")]
public HttpFeedback HttpFeedback { get; set; }
//[XmlElement(ElementName="MediaChannels")]
public string MediaChannels { get; set; }
//[XmlElement(ElementName="Network")]
public Network Network { get; set; }
//[XmlElement(ElementName="NetworkServices")]
public NetworkServices NetworkServices { get; set; }
//[XmlElement(ElementName="Peripherals")]
public Peripherals Peripherals { get; set; }
//[XmlElement(ElementName="Provisioning")]
public Provisioning Provisioning { get; set; }
//[XmlElement(ElementName="Proximity")]
public Proximity Proximity { get; set; }
//[XmlElement(ElementName="RoomAnalytics")]
public RoomAnalytics RoomAnalytics { get; set; }
//[XmlElement(ElementName="SIP")]
public SIP SIP { get; set; }
//[XmlElement(ElementName="Security")]
public Security Security { get; set; }
//[XmlElement(ElementName="Standby")]
public Standby Standby { get; set; }
//[XmlElement(ElementName="SystemUnit")]
public SystemUnit SystemUnit { get; set; }
//[XmlElement(ElementName="Time")]
public Time Time { get; set; }
//[XmlElement(ElementName="UserInterface")]
public UserInterface UserInterface { get; set; }
//[XmlElement(ElementName="Video")]
public Video Video { get; set; }
//[XmlAttribute(AttributeName="product")]
public string Product { get; set; }
//[XmlAttribute(AttributeName="version")]
public string Version { get; set; }
//[XmlAttribute(AttributeName="apiVersion")]
public string ApiVersion { get; set; }
}
}
}

View File

@@ -0,0 +1,105 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Core;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Devices.VideoCodec
{
public abstract class VideoCodecBase : Device, IRoutingSinkWithSwitching, IUsageTracking, IHasDialer //, ICodecAudio
{
#region IUsageTracking Members
public UsageTracking UsageTracker { get; set; }
#endregion
#region IRoutingInputs Members
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
#endregion
public BoolFeedback InCallFeedback { get; protected set; }
public BoolFeedback IncomingCallFeedback { get; protected set; }
abstract protected Func<bool> InCallFeedbackFunc { get; }
abstract protected Func<bool> IncomingCallFeedbackFunc { get; }
abstract protected Func<bool> TransmitMuteFeedbackFunc { get; }
abstract protected Func<bool> ReceiveMuteFeedbackFunc { get; }
abstract protected Func<bool> PrivacyModeFeedbackFunc { get; }
public VideoCodecBase(string key, string name)
: base(key, name)
{
InCallFeedback = new BoolFeedback(InCallFeedbackFunc);
IncomingCallFeedback = new BoolFeedback(IncomingCallFeedbackFunc);
ReceiveMuteIsOnFeedback = new BoolFeedback(ReceiveMuteFeedbackFunc);
TransmitMuteIsOnFeedback = new BoolFeedback(TransmitMuteFeedbackFunc);
PrivacyModeIsOnFeedback = new BoolFeedback(PrivacyModeFeedbackFunc);
InputPorts = new RoutingPortCollection<RoutingInputPort>();
InCallFeedback.OutputChange += new EventHandler<EventArgs>(InCallFeedback_OutputChange);
}
void InCallFeedback_OutputChange(object sender, EventArgs e)
{
if (UsageTracker != null)
{
if (InCallFeedback.BoolValue)
UsageTracker.StartDeviceUsage();
else
UsageTracker.EndDeviceUsage();
}
}
public abstract void Dial();
public abstract void EndCall();
public abstract void AcceptCall();
public abstract void RejectCall();
public virtual List<Feedback> Feedbacks
{
get
{
return new List<Feedback>
{
InCallFeedback,
IncomingCallFeedback,
ReceiveMuteIsOnFeedback,
TransmitMuteIsOnFeedback,
PrivacyModeIsOnFeedback
};
}
}
public abstract void ExecuteSwitch(object selector);
#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; }
#endregion
}
}

View File

@@ -57,6 +57,17 @@ namespace PepperDash.Essentials
//PortalSync = new PepperDashPortalSyncClient();
// CODEC TESTING
GenericSshClient TestCodecClient = new GenericSshClient("TestCodec-1--SshClient", "10.11.50.135", 22, "crestron", "2H3Zu&OvgXp6");
PepperDash.Essentials.Devices.VideoCodec.Cisco.CiscoCodec TestCodec =
new PepperDash.Essentials.Devices.VideoCodec.Cisco.CiscoCodec("TestCodec-1", "Cisco Spark Room Kit", TestCodecClient, 8080);
TestCodec.CustomActivate();
// CODEC TESTING
Debug.Console(0, "Starting Essentials load from configuration");
ConfigReader.LoadConfig2();
LoadDevices();

View File

@@ -8,7 +8,7 @@ namespace PepperDash.Essentials.Fusion
{
public class ScheduleChangeEventArgs : EventArgs
{
public RoomSchedule MyProperty { get; set; }
public RoomSchedule Schedule { get; set; }
}
public class MeetingChangeEventArgs : EventArgs

View File

@@ -25,9 +25,9 @@ namespace PepperDash.Essentials.Fusion
{
public class EssentialsHuddleSpaceFusionSystemController : Device
{
//public event EventHandler<ScheduleChangeEventArgs> ScheduleChange;
//public event EventHandler<MeetingChangeEventArgs> MeetingEndWarning;
//public event EventHandler<MeetingChangeEventArgs> NextMeetingBeginWarning;
public event EventHandler<ScheduleChangeEventArgs> ScheduleChange;
public event EventHandler<MeetingChangeEventArgs> MeetingEndWarning;
public event EventHandler<MeetingChangeEventArgs> NextMeetingBeginWarning;
FusionRoom FusionRoom;
EssentialsHuddleSpaceRoom Room;
@@ -788,6 +788,15 @@ namespace PepperDash.Essentials.Fusion
if (!IsRegisteredForSchedulePushNotifications)
PollTimer.Reset(SchedulePollInterval, SchedulePollInterval);
// Fire Schedule Change Event
var handler = ScheduleChange;
if (handler != null)
{
handler(this, new ScheduleChangeEventArgs() { Schedule = CurrentSchedule });
}
}
}
@@ -806,20 +815,26 @@ namespace PepperDash.Essentials.Fusion
}
/// <summary>
/// Prints today's schedule to console for debugging
/// </summary>
void PrintTodaysSchedule()
{
if (CurrentSchedule.Meetings.Count > 0)
if (Debug.Level > 1)
{
Debug.Console(1, this, "Today's Schedule for '{0}'\n", Room.Name);
foreach (Event e in CurrentSchedule.Meetings)
if (CurrentSchedule.Meetings.Count > 0)
{
Debug.Console(1, this, "Subject: {0}", e.Subject);
Debug.Console(1, this, "Organizer: {0}", e.Organizer);
Debug.Console(1, this, "MeetingID: {0}", e.MeetingID);
Debug.Console(1, this, "Start Time: {0}", e.dtStart);
Debug.Console(1, this, "End Time: {0}", e.dtEnd);
Debug.Console(1, this, "Duration: {0}\n", e.DurationInMinutes);
Debug.Console(1, this, "Today's Schedule for '{0}'\n", Room.Name);
foreach (Event e in CurrentSchedule.Meetings)
{
Debug.Console(1, this, "Subject: {0}", e.Subject);
Debug.Console(1, this, "Organizer: {0}", e.Organizer);
Debug.Console(1, this, "MeetingID: {0}", e.MeetingID);
Debug.Console(1, this, "Start Time: {0}", e.dtStart);
Debug.Console(1, this, "End Time: {0}", e.dtEnd);
Debug.Console(1, this, "Duration: {0}\n", e.DurationInMinutes);
}
}
}
}
@@ -955,24 +970,23 @@ namespace PepperDash.Essentials.Fusion
string attrName = null;
uint attrNum = Convert.ToUInt32(keyNum);
if (dev is BasicTriListWithSmartObject)
if (dev is EssentialsTouchpanelController)
{
if (attrNum > 10)
continue;
attrName = "Online - Touch Panel " + attrNum;
attrNum += 150;
}
// add xpanel here
//if (dev is Crestron.SimplSharpPro.UI.XpanelForSmartGraphics)
//{
// if (attrNum > 10)
// continue;
// attrName = "Online - XPanel " + attrNum;
// attrNum += 160;
//}
if ((dev as EssentialsTouchpanelController).Panel is Crestron.SimplSharpPro.DeviceSupport.TswFt5Button)
{
if (attrNum > 10)
continue;
attrName = "Online - Touch Panel " + attrNum;
attrNum += 150;
}
else if ((dev as EssentialsTouchpanelController).Panel is Crestron.SimplSharpPro.UI.XpanelForSmartGraphics)
{
if (attrNum > 10)
continue;
attrName = "Online - XPanel " + attrNum;
attrNum += 160;
}
}
//else
if (dev is DisplayBase)