mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 12:44:58 +00:00
Mock testing: Connect/End UI behavior start
This commit is contained in:
@@ -100,6 +100,12 @@ namespace PepperDash.Essentials.Devices.Common
|
|||||||
return new Laptop(key, name);
|
return new Laptop(key, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if (typeName == "mockvc")
|
||||||
|
{
|
||||||
|
return new PepperDash.Essentials.Devices.Common.VideoCodec
|
||||||
|
.MockVC(key, name);
|
||||||
|
}
|
||||||
|
|
||||||
else if (groupName == "settopbox") //(typeName == "irstbbase")
|
else if (groupName == "settopbox") //(typeName == "irstbbase")
|
||||||
{
|
{
|
||||||
var irCont = IRPortHelper.GetIrOutputPortController(dc);
|
var irCont = IRPortHelper.GetIrOutputPortController(dc);
|
||||||
|
|||||||
@@ -52,7 +52,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public override void Dial(string s)
|
public override void Dial(string s)
|
||||||
{
|
{
|
||||||
|
Debug.Console(1, this, "Dial: {0}", s);
|
||||||
|
|
||||||
_InCall = true;
|
_InCall = true;
|
||||||
InCallFeedback.FireUpdate();
|
InCallFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
@@ -63,12 +64,15 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
/// <param name="s"></param>
|
/// <param name="s"></param>
|
||||||
public void SendDTMF(string s)
|
public void SendDTMF(string s)
|
||||||
{
|
{
|
||||||
|
Debug.Console(1, this, "SendDTMF: {0}", s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
public override void EndCall()
|
public override void EndCall()
|
||||||
{
|
{
|
||||||
|
Debug.Console(1, this, "EndCall");
|
||||||
_InCall = false;
|
_InCall = false;
|
||||||
InCallFeedback.FireUpdate();
|
InCallFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
@@ -78,7 +82,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public override void AcceptCall()
|
public override void AcceptCall()
|
||||||
{
|
{
|
||||||
|
Debug.Console(1, this, "AcceptCall");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -86,52 +90,84 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public override void RejectCall()
|
public override void RejectCall()
|
||||||
{
|
{
|
||||||
|
Debug.Console(1, this, "RejectCall");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Called by routing to make it happen
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="selector"></param>
|
||||||
public override void ExecuteSwitch(object selector)
|
public override void ExecuteSwitch(object selector)
|
||||||
{
|
{
|
||||||
|
Debug.Console(1, this, "ExecuteSwitch");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
public override void ReceiveMuteOff()
|
public override void ReceiveMuteOff()
|
||||||
{
|
{
|
||||||
|
Debug.Console(1, this, "ReceiveMuteOff");
|
||||||
|
|
||||||
if (!_ReceiveMute)
|
if (!_ReceiveMute)
|
||||||
return;
|
return;
|
||||||
_ReceiveMute = false;
|
_ReceiveMute = false;
|
||||||
ReceiveMuteIsOnFeedback.FireUpdate();
|
ReceiveMuteIsOnFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
public override void ReceiveMuteOn()
|
public override void ReceiveMuteOn()
|
||||||
{
|
{
|
||||||
|
Debug.Console(1, this, "ReceiveMuteOn");
|
||||||
if (_ReceiveMute)
|
if (_ReceiveMute)
|
||||||
return;
|
return;
|
||||||
ReceiveMuteIsOnFeedback.FireUpdate();
|
ReceiveMuteIsOnFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
public override void ReceiveMuteToggle()
|
public override void ReceiveMuteToggle()
|
||||||
{
|
{
|
||||||
|
Debug.Console(1, this, "ReceiveMuteToggle");
|
||||||
|
|
||||||
_ReceiveMute = !_ReceiveMute;
|
_ReceiveMute = !_ReceiveMute;
|
||||||
ReceiveMuteIsOnFeedback.FireUpdate();
|
ReceiveMuteIsOnFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="level"></param>
|
||||||
public override void SetReceiveVolume(ushort level)
|
public override void SetReceiveVolume(ushort level)
|
||||||
{
|
{
|
||||||
|
Debug.Console(1, this, "SetReceiveVolume: {0}", level);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
public override void TransmitMuteOff()
|
public override void TransmitMuteOff()
|
||||||
{
|
{
|
||||||
|
Debug.Console(1, this, "TransmitMuteOff");
|
||||||
|
|
||||||
if (!_TransmitMute)
|
if (!_TransmitMute)
|
||||||
return;
|
return;
|
||||||
_TransmitMute = false;
|
_TransmitMute = false;
|
||||||
TransmitMuteIsOnFeedback.FireUpdate();
|
TransmitMuteIsOnFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
public override void TransmitMuteOn()
|
public override void TransmitMuteOn()
|
||||||
{
|
{
|
||||||
|
Debug.Console(1, this, "TransmitMuteOn");
|
||||||
if (_TransmitMute)
|
if (_TransmitMute)
|
||||||
return;
|
return;
|
||||||
TransmitMuteIsOnFeedback.FireUpdate();
|
TransmitMuteIsOnFeedback.FireUpdate();
|
||||||
@@ -140,16 +176,18 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
public override void TransmitMuteToggle()
|
public override void TransmitMuteToggle()
|
||||||
{
|
{
|
||||||
_TransmitMute = !_TransmitMute;
|
_TransmitMute = !_TransmitMute;
|
||||||
|
Debug.Console(1, this, "TransmitMuteToggle: {0}", _TransmitMute);
|
||||||
TransmitMuteIsOnFeedback.FireUpdate();
|
TransmitMuteIsOnFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void SetTransmitVolume(ushort level)
|
public override void SetTransmitVolume(ushort level)
|
||||||
{
|
{
|
||||||
|
Debug.Console(1, this, "SetTransmitVolume: {0}", level);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void PrivacyModeOn()
|
public override void PrivacyModeOn()
|
||||||
{
|
{
|
||||||
|
Debug.Console(1, this, "PrivacyMuteOn");
|
||||||
if (_PrivacyModeIsOn)
|
if (_PrivacyModeIsOn)
|
||||||
return;
|
return;
|
||||||
_PrivacyModeIsOn = true;
|
_PrivacyModeIsOn = true;
|
||||||
@@ -159,6 +197,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
|
|
||||||
public override void PrivacyModeOff()
|
public override void PrivacyModeOff()
|
||||||
{
|
{
|
||||||
|
Debug.Console(1, this, "PrivacyMuteOff");
|
||||||
if (!_PrivacyModeIsOn)
|
if (!_PrivacyModeIsOn)
|
||||||
return;
|
return;
|
||||||
_PrivacyModeIsOn = false;
|
_PrivacyModeIsOn = false;
|
||||||
@@ -168,7 +207,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
public override void PrivacyModeToggle()
|
public override void PrivacyModeToggle()
|
||||||
{
|
{
|
||||||
_PrivacyModeIsOn = !_PrivacyModeIsOn;
|
_PrivacyModeIsOn = !_PrivacyModeIsOn;
|
||||||
PrivacyModeIsOnFeedback.FireUpdate();
|
Debug.Console(1, this, "PrivacyMuteToggle: {0}", _PrivacyModeIsOn);
|
||||||
|
PrivacyModeIsOnFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
//********************************************************
|
//********************************************************
|
||||||
@@ -176,16 +216,16 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
|
|
||||||
public void TestIncomingCall(string url)
|
public void TestIncomingCall(string url)
|
||||||
{
|
{
|
||||||
|
Debug.Console(1, this, "TestIncomingCall");
|
||||||
|
|
||||||
_IncomingCall = true;
|
_IncomingCall = true;
|
||||||
IncomingCallFeedback.FireUpdate();
|
IncomingCallFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void TestFarEndHangup()
|
public void TestFarEndHangup()
|
||||||
{
|
{
|
||||||
|
Debug.Console(1, this, "TestFarEndHangup");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -35,6 +35,7 @@ namespace PepperDash.Essentials
|
|||||||
properties.ToString());
|
properties.ToString());
|
||||||
return new EssentialsTouchpanelController(key, name, typeName, props, comm.IpIdInt);
|
return new EssentialsTouchpanelController(key, name, typeName, props, comm.IpIdInt);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (typeName == "mockdisplay")
|
else if (typeName == "mockdisplay")
|
||||||
{
|
{
|
||||||
return new MockDisplay(key, name);
|
return new MockDisplay(key, name);
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Fusion
|
namespace PepperDash.Essentials.Fusion
|
||||||
{
|
{
|
||||||
public class ScheduleChangeEventArgs : EventArgs
|
public class ScheduleChangeEventArgs : EventArgs
|
||||||
{
|
{
|
||||||
public RoomSchedule Schedule { get; set; }
|
public RoomSchedule Schedule { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class MeetingChangeEventArgs : EventArgs
|
public class MeetingChangeEventArgs : EventArgs
|
||||||
{
|
{
|
||||||
public Event Meeting { get; set; }
|
public Event Meeting { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,63 +1,63 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Fusion
|
namespace PepperDash.Essentials.Fusion
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// When created, runs progcomments on every slot and stores the program names in a list
|
/// When created, runs progcomments on every slot and stores the program names in a list
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class ProcessorProgReg
|
public class ProcessorProgReg
|
||||||
{
|
{
|
||||||
//public static Dictionary<int, ProcessorProgramItem> Programs { get; private set; }
|
//public static Dictionary<int, ProcessorProgramItem> Programs { get; private set; }
|
||||||
|
|
||||||
public static Dictionary<int, ProcessorProgramItem> GetProcessorProgReg()
|
public static Dictionary<int, ProcessorProgramItem> GetProcessorProgReg()
|
||||||
{
|
{
|
||||||
var programs = new Dictionary<int, ProcessorProgramItem>();
|
var programs = new Dictionary<int, ProcessorProgramItem>();
|
||||||
for (int i = 1; i <= Global.ControlSystem.NumProgramsSupported; i++)
|
for (int i = 1; i <= Global.ControlSystem.NumProgramsSupported; i++)
|
||||||
{
|
{
|
||||||
string response = null;
|
string response = null;
|
||||||
var success = CrestronConsole.SendControlSystemCommand("progcomments:" + i, ref response);
|
var success = CrestronConsole.SendControlSystemCommand("progcomments:" + i, ref response);
|
||||||
var item = new ProcessorProgramItem();
|
var item = new ProcessorProgramItem();
|
||||||
if (!success)
|
if (!success)
|
||||||
item.Name = "Error: PROGCOMMENTS failed";
|
item.Name = "Error: PROGCOMMENTS failed";
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (response.ToLower().Contains("bad or incomplete"))
|
if (response.ToLower().Contains("bad or incomplete"))
|
||||||
item.Name = "";
|
item.Name = "";
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var startPos = response.IndexOf("Program File");
|
var startPos = response.IndexOf("Program File");
|
||||||
var colonPos = response.IndexOf(":", startPos) + 1;
|
var colonPos = response.IndexOf(":", startPos) + 1;
|
||||||
var endPos = response.IndexOf(CrestronEnvironment.NewLine, colonPos);
|
var endPos = response.IndexOf(CrestronEnvironment.NewLine, colonPos);
|
||||||
item.Name = response.Substring(colonPos, endPos - colonPos).Trim();
|
item.Name = response.Substring(colonPos, endPos - colonPos).Trim();
|
||||||
item.Exists = true;
|
item.Exists = true;
|
||||||
if (item.Name.Contains(".dll"))
|
if (item.Name.Contains(".dll"))
|
||||||
{
|
{
|
||||||
startPos = response.IndexOf("Compiler Revision");
|
startPos = response.IndexOf("Compiler Revision");
|
||||||
colonPos = response.IndexOf(":", startPos) + 1;
|
colonPos = response.IndexOf(":", startPos) + 1;
|
||||||
endPos = response.IndexOf(CrestronEnvironment.NewLine, colonPos);
|
endPos = response.IndexOf(CrestronEnvironment.NewLine, colonPos);
|
||||||
item.Name = item.Name + "_v" + response.Substring(colonPos, endPos - colonPos).Trim();
|
item.Name = item.Name + "_v" + response.Substring(colonPos, endPos - colonPos).Trim();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
programs[i] = item;
|
programs[i] = item;
|
||||||
Debug.Console(1, "Program {0}: {1}", i, item.Name);
|
Debug.Console(1, "Program {0}: {1}", i, item.Name);
|
||||||
}
|
}
|
||||||
return programs;
|
return programs;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used in ProcessorProgReg
|
/// Used in ProcessorProgReg
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class ProcessorProgramItem
|
public class ProcessorProgramItem
|
||||||
{
|
{
|
||||||
public bool Exists { get; set; }
|
public bool Exists { get; set; }
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,499 +1,499 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharpPro.Fusion;
|
using Crestron.SimplSharpPro.Fusion;
|
||||||
|
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Fusion
|
namespace PepperDash.Essentials.Fusion
|
||||||
{
|
{
|
||||||
// Helper Classes for GUIDs
|
// Helper Classes for GUIDs
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Stores GUIDs to be written to a file in NVRAM
|
/// Stores GUIDs to be written to a file in NVRAM
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class FusionRoomGuids
|
public class FusionRoomGuids
|
||||||
{
|
{
|
||||||
public string RoomName { get; set; }
|
public string RoomName { get; set; }
|
||||||
public uint IpId { get; set; }
|
public uint IpId { get; set; }
|
||||||
public string RoomGuid { get; set; }
|
public string RoomGuid { get; set; }
|
||||||
public FusionOccupancySensorAsset OccupancyAsset { get; set; }
|
public FusionOccupancySensorAsset OccupancyAsset { get; set; }
|
||||||
public Dictionary<int, FusionAsset> StaticAssets { get; set; }
|
public Dictionary<int, FusionAsset> StaticAssets { get; set; }
|
||||||
|
|
||||||
public FusionRoomGuids()
|
public FusionRoomGuids()
|
||||||
{
|
{
|
||||||
StaticAssets = new Dictionary<int, FusionAsset>();
|
StaticAssets = new Dictionary<int, FusionAsset>();
|
||||||
OccupancyAsset = new FusionOccupancySensorAsset();
|
OccupancyAsset = new FusionOccupancySensorAsset();
|
||||||
}
|
}
|
||||||
|
|
||||||
public FusionRoomGuids(string roomName, uint ipId, string roomGuid, Dictionary<int, FusionAsset> staticAssets)
|
public FusionRoomGuids(string roomName, uint ipId, string roomGuid, Dictionary<int, FusionAsset> staticAssets)
|
||||||
{
|
{
|
||||||
RoomName = roomName;
|
RoomName = roomName;
|
||||||
IpId = ipId;
|
IpId = ipId;
|
||||||
RoomGuid = roomGuid;
|
RoomGuid = roomGuid;
|
||||||
|
|
||||||
StaticAssets = staticAssets;
|
StaticAssets = staticAssets;
|
||||||
OccupancyAsset = new FusionOccupancySensorAsset();
|
OccupancyAsset = new FusionOccupancySensorAsset();
|
||||||
}
|
}
|
||||||
|
|
||||||
public FusionRoomGuids(string roomName, uint ipId, string roomGuid, Dictionary<int, FusionAsset> staticAssets, FusionOccupancySensorAsset occAsset)
|
public FusionRoomGuids(string roomName, uint ipId, string roomGuid, Dictionary<int, FusionAsset> staticAssets, FusionOccupancySensorAsset occAsset)
|
||||||
{
|
{
|
||||||
RoomName = roomName;
|
RoomName = roomName;
|
||||||
IpId = ipId;
|
IpId = ipId;
|
||||||
RoomGuid = roomGuid;
|
RoomGuid = roomGuid;
|
||||||
|
|
||||||
StaticAssets = staticAssets;
|
StaticAssets = staticAssets;
|
||||||
OccupancyAsset = occAsset;
|
OccupancyAsset = occAsset;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Generates a new room GUID prefixed by the program slot number and NIC MAC address
|
/// Generates a new room GUID prefixed by the program slot number and NIC MAC address
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="progSlot"></param>
|
/// <param name="progSlot"></param>
|
||||||
/// <param name="mac"></param>
|
/// <param name="mac"></param>
|
||||||
public string GenerateNewRoomGuid(uint progSlot, string mac)
|
public string GenerateNewRoomGuid(uint progSlot, string mac)
|
||||||
{
|
{
|
||||||
Guid roomGuid = Guid.NewGuid();
|
Guid roomGuid = Guid.NewGuid();
|
||||||
|
|
||||||
return string.Format("{0}-{1}-{2}", progSlot, mac, roomGuid.ToString());
|
return string.Format("{0}-{1}-{2}", progSlot, mac, roomGuid.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds an asset to the StaticAssets collection and returns the new asset
|
/// Adds an asset to the StaticAssets collection and returns the new asset
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="room"></param>
|
/// <param name="room"></param>
|
||||||
/// <param name="uid"></param>
|
/// <param name="uid"></param>
|
||||||
/// <param name="assetName"></param>
|
/// <param name="assetName"></param>
|
||||||
/// <param name="type"></param>
|
/// <param name="type"></param>
|
||||||
/// <param name="instanceId"></param>
|
/// <param name="instanceId"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public FusionAsset AddStaticAsset(FusionRoom room, int uid, string assetName, string type, string instanceId)
|
public FusionAsset AddStaticAsset(FusionRoom room, int uid, string assetName, string type, string instanceId)
|
||||||
{
|
{
|
||||||
var slotNum = GetNextAvailableAssetNumber(room);
|
var slotNum = GetNextAvailableAssetNumber(room);
|
||||||
|
|
||||||
Debug.Console(2, "Adding Fusion Asset: {0} of Type: {1} at Slot Number: {2} with GUID: {3}", assetName, type, slotNum, instanceId);
|
Debug.Console(2, "Adding Fusion Asset: {0} of Type: {1} at Slot Number: {2} with GUID: {3}", assetName, type, slotNum, instanceId);
|
||||||
|
|
||||||
var tempAsset = new FusionAsset(slotNum, assetName, type, instanceId);
|
var tempAsset = new FusionAsset(slotNum, assetName, type, instanceId);
|
||||||
|
|
||||||
StaticAssets.Add(uid, tempAsset);
|
StaticAssets.Add(uid, tempAsset);
|
||||||
|
|
||||||
return tempAsset;
|
return tempAsset;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the next available slot number in the Fusion UserConfigurableAssetDetails collection
|
/// Returns the next available slot number in the Fusion UserConfigurableAssetDetails collection
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="room"></param>
|
/// <param name="room"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static uint GetNextAvailableAssetNumber(FusionRoom room)
|
public static uint GetNextAvailableAssetNumber(FusionRoom room)
|
||||||
{
|
{
|
||||||
uint slotNum = 0;
|
uint slotNum = 0;
|
||||||
|
|
||||||
foreach (var item in room.UserConfigurableAssetDetails)
|
foreach (var item in room.UserConfigurableAssetDetails)
|
||||||
{
|
{
|
||||||
if(item.Number > slotNum)
|
if(item.Number > slotNum)
|
||||||
slotNum = item.Number;
|
slotNum = item.Number;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (slotNum < 5)
|
if (slotNum < 5)
|
||||||
{
|
{
|
||||||
slotNum = 5;
|
slotNum = 5;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
slotNum = slotNum + 1;
|
slotNum = slotNum + 1;
|
||||||
|
|
||||||
Debug.Console(2, "#Next available fusion asset number is: {0}", slotNum);
|
Debug.Console(2, "#Next available fusion asset number is: {0}", slotNum);
|
||||||
|
|
||||||
return slotNum;
|
return slotNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class FusionOccupancySensorAsset
|
public class FusionOccupancySensorAsset
|
||||||
{
|
{
|
||||||
// SlotNumber fixed at 4
|
// SlotNumber fixed at 4
|
||||||
|
|
||||||
public uint SlotNumber { get { return 4; } }
|
public uint SlotNumber { get { return 4; } }
|
||||||
public string Name { get { return "Occupancy Sensor"; } }
|
public string Name { get { return "Occupancy Sensor"; } }
|
||||||
public eAssetType Type { get; set; }
|
public eAssetType Type { get; set; }
|
||||||
public string InstanceId { get; set; }
|
public string InstanceId { get; set; }
|
||||||
|
|
||||||
public FusionOccupancySensorAsset()
|
public FusionOccupancySensorAsset()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public FusionOccupancySensorAsset(eAssetType type)
|
public FusionOccupancySensorAsset(eAssetType type)
|
||||||
{
|
{
|
||||||
Type = type;
|
Type = type;
|
||||||
|
|
||||||
InstanceId = Guid.NewGuid().ToString();
|
InstanceId = Guid.NewGuid().ToString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class FusionAsset
|
public class FusionAsset
|
||||||
{
|
{
|
||||||
public uint SlotNumber { get; set; }
|
public uint SlotNumber { get; set; }
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public string Type { get; set; }
|
public string Type { get; set; }
|
||||||
public string InstanceId { get;set; }
|
public string InstanceId { get;set; }
|
||||||
|
|
||||||
public FusionAsset()
|
public FusionAsset()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public FusionAsset(uint slotNum, string assetName, string type, string instanceId)
|
public FusionAsset(uint slotNum, string assetName, string type, string instanceId)
|
||||||
{
|
{
|
||||||
SlotNumber = slotNum;
|
SlotNumber = slotNum;
|
||||||
Name = assetName;
|
Name = assetName;
|
||||||
Type = type;
|
Type = type;
|
||||||
if (string.IsNullOrEmpty(instanceId))
|
if (string.IsNullOrEmpty(instanceId))
|
||||||
{
|
{
|
||||||
InstanceId = Guid.NewGuid().ToString();
|
InstanceId = Guid.NewGuid().ToString();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
InstanceId = instanceId;
|
InstanceId = instanceId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************************************
|
//***************************************************************************************************
|
||||||
|
|
||||||
public class RoomSchedule
|
public class RoomSchedule
|
||||||
{
|
{
|
||||||
public List<Event> Meetings { get; set; }
|
public List<Event> Meetings { get; set; }
|
||||||
|
|
||||||
public RoomSchedule()
|
public RoomSchedule()
|
||||||
{
|
{
|
||||||
Meetings = new List<Event>();
|
Meetings = new List<Event>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************************************
|
//****************************************************************************************************
|
||||||
// Helper Classes for XML API
|
// Helper Classes for XML API
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Data needed to request the local time from the Fusion server
|
/// Data needed to request the local time from the Fusion server
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class LocalTimeRequest
|
public class LocalTimeRequest
|
||||||
{
|
{
|
||||||
public string RequestID { get; set; }
|
public string RequestID { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// All the data needed for a full schedule request in a room
|
/// All the data needed for a full schedule request in a room
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// //[XmlRoot(ElementName = "RequestSchedule")]
|
/// //[XmlRoot(ElementName = "RequestSchedule")]
|
||||||
public class RequestSchedule
|
public class RequestSchedule
|
||||||
{
|
{
|
||||||
//[XmlElement(ElementName = "RequestID")]
|
//[XmlElement(ElementName = "RequestID")]
|
||||||
public string RequestID { get; set; }
|
public string RequestID { get; set; }
|
||||||
//[XmlElement(ElementName = "RoomID")]
|
//[XmlElement(ElementName = "RoomID")]
|
||||||
public string RoomID { get; set; }
|
public string RoomID { get; set; }
|
||||||
//[XmlElement(ElementName = "Start")]
|
//[XmlElement(ElementName = "Start")]
|
||||||
public DateTime Start { get; set; }
|
public DateTime Start { get; set; }
|
||||||
//[XmlElement(ElementName = "HourSpan")]
|
//[XmlElement(ElementName = "HourSpan")]
|
||||||
public double HourSpan { get; set; }
|
public double HourSpan { get; set; }
|
||||||
|
|
||||||
public RequestSchedule(string requestID, string roomID)
|
public RequestSchedule(string requestID, string roomID)
|
||||||
{
|
{
|
||||||
RequestID = requestID;
|
RequestID = requestID;
|
||||||
RoomID = roomID;
|
RoomID = roomID;
|
||||||
Start = DateTime.Now;
|
Start = DateTime.Now;
|
||||||
HourSpan = 24;
|
HourSpan = 24;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//[XmlRoot(ElementName = "RequestAction")]
|
//[XmlRoot(ElementName = "RequestAction")]
|
||||||
public class RequestAction
|
public class RequestAction
|
||||||
{
|
{
|
||||||
//[XmlElement(ElementName = "RequestID")]
|
//[XmlElement(ElementName = "RequestID")]
|
||||||
public string RequestID { get; set; }
|
public string RequestID { get; set; }
|
||||||
//[XmlElement(ElementName = "RoomID")]
|
//[XmlElement(ElementName = "RoomID")]
|
||||||
public string RoomID { get; set; }
|
public string RoomID { get; set; }
|
||||||
//[XmlElement(ElementName = "ActionID")]
|
//[XmlElement(ElementName = "ActionID")]
|
||||||
public string ActionID { get; set; }
|
public string ActionID { get; set; }
|
||||||
//[XmlElement(ElementName = "Parameters")]
|
//[XmlElement(ElementName = "Parameters")]
|
||||||
public List<Parameter> Parameters { get; set; }
|
public List<Parameter> Parameters { get; set; }
|
||||||
|
|
||||||
public RequestAction(string roomID, string actionID, List<Parameter> parameters)
|
public RequestAction(string roomID, string actionID, List<Parameter> parameters)
|
||||||
{
|
{
|
||||||
RoomID = roomID;
|
RoomID = roomID;
|
||||||
ActionID = actionID;
|
ActionID = actionID;
|
||||||
Parameters = parameters;
|
Parameters = parameters;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//[XmlRoot(ElementName = "ActionResponse")]
|
//[XmlRoot(ElementName = "ActionResponse")]
|
||||||
public class ActionResponse
|
public class ActionResponse
|
||||||
{
|
{
|
||||||
//[XmlElement(ElementName = "RequestID")]
|
//[XmlElement(ElementName = "RequestID")]
|
||||||
public string RequestID { get; set; }
|
public string RequestID { get; set; }
|
||||||
//[XmlElement(ElementName = "ActionID")]
|
//[XmlElement(ElementName = "ActionID")]
|
||||||
public string ActionID { get; set; }
|
public string ActionID { get; set; }
|
||||||
//[XmlElement(ElementName = "Parameters")]
|
//[XmlElement(ElementName = "Parameters")]
|
||||||
public List<Parameter> Parameters { get; set; }
|
public List<Parameter> Parameters { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
//[XmlRoot(ElementName = "Parameter")]
|
//[XmlRoot(ElementName = "Parameter")]
|
||||||
public class Parameter
|
public class Parameter
|
||||||
{
|
{
|
||||||
//[XmlAttribute(AttributeName = "ID")]
|
//[XmlAttribute(AttributeName = "ID")]
|
||||||
public string ID { get; set; }
|
public string ID { get; set; }
|
||||||
//[XmlAttribute(AttributeName = "Value")]
|
//[XmlAttribute(AttributeName = "Value")]
|
||||||
public string Value { get; set; }
|
public string Value { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
////[XmlRoot(ElementName = "Parameters")]
|
////[XmlRoot(ElementName = "Parameters")]
|
||||||
//public class Parameters
|
//public class Parameters
|
||||||
//{
|
//{
|
||||||
// //[XmlElement(ElementName = "Parameter")]
|
// //[XmlElement(ElementName = "Parameter")]
|
||||||
// public List<Parameter> Parameter { get; set; }
|
// public List<Parameter> Parameter { get; set; }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Data structure for a ScheduleResponse from Fusion
|
/// Data structure for a ScheduleResponse from Fusion
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// //[XmlRoot(ElementName = "ScheduleResponse")]
|
/// //[XmlRoot(ElementName = "ScheduleResponse")]
|
||||||
public class ScheduleResponse
|
public class ScheduleResponse
|
||||||
{
|
{
|
||||||
//[XmlElement(ElementName = "RequestID")]
|
//[XmlElement(ElementName = "RequestID")]
|
||||||
public string RequestID { get; set; }
|
public string RequestID { get; set; }
|
||||||
//[XmlElement(ElementName = "RoomID")]
|
//[XmlElement(ElementName = "RoomID")]
|
||||||
public string RoomID { get; set; }
|
public string RoomID { get; set; }
|
||||||
//[XmlElement(ElementName = "RoomName")]
|
//[XmlElement(ElementName = "RoomName")]
|
||||||
public string RoomName { get; set; }
|
public string RoomName { get; set; }
|
||||||
//[XmlElement("Event")]
|
//[XmlElement("Event")]
|
||||||
public List<Event> Events { get; set; }
|
public List<Event> Events { get; set; }
|
||||||
|
|
||||||
public ScheduleResponse()
|
public ScheduleResponse()
|
||||||
{
|
{
|
||||||
Events = new List<Event>();
|
Events = new List<Event>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//[XmlRoot(ElementName = "Event")]
|
//[XmlRoot(ElementName = "Event")]
|
||||||
public class Event
|
public class Event
|
||||||
{
|
{
|
||||||
//[XmlElement(ElementName = "MeetingID")]
|
//[XmlElement(ElementName = "MeetingID")]
|
||||||
public string MeetingID { get; set; }
|
public string MeetingID { get; set; }
|
||||||
//[XmlElement(ElementName = "RVMeetingID")]
|
//[XmlElement(ElementName = "RVMeetingID")]
|
||||||
public string RVMeetingID { get; set; }
|
public string RVMeetingID { get; set; }
|
||||||
//[XmlElement(ElementName = "Recurring")]
|
//[XmlElement(ElementName = "Recurring")]
|
||||||
public string Recurring { get; set; }
|
public string Recurring { get; set; }
|
||||||
//[XmlElement(ElementName = "InstanceID")]
|
//[XmlElement(ElementName = "InstanceID")]
|
||||||
public string InstanceID { get; set; }
|
public string InstanceID { get; set; }
|
||||||
//[XmlElement(ElementName = "dtStart")]
|
//[XmlElement(ElementName = "dtStart")]
|
||||||
public DateTime dtStart { get; set; }
|
public DateTime dtStart { get; set; }
|
||||||
//[XmlElement(ElementName = "dtEnd")]
|
//[XmlElement(ElementName = "dtEnd")]
|
||||||
public DateTime dtEnd { get; set; }
|
public DateTime dtEnd { get; set; }
|
||||||
//[XmlElement(ElementName = "Organizer")]
|
//[XmlElement(ElementName = "Organizer")]
|
||||||
public string Organizer { get; set; }
|
public string Organizer { get; set; }
|
||||||
//[XmlElement(ElementName = "Attendees")]
|
//[XmlElement(ElementName = "Attendees")]
|
||||||
public Attendees Attendees { get; set; }
|
public Attendees Attendees { get; set; }
|
||||||
//[XmlElement(ElementName = "Resources")]
|
//[XmlElement(ElementName = "Resources")]
|
||||||
public Resources Resources { get; set; }
|
public Resources Resources { get; set; }
|
||||||
//[XmlElement(ElementName = "IsEvent")]
|
//[XmlElement(ElementName = "IsEvent")]
|
||||||
public string IsEvent { get; set; }
|
public string IsEvent { get; set; }
|
||||||
//[XmlElement(ElementName = "IsRoomViewMeeting")]
|
//[XmlElement(ElementName = "IsRoomViewMeeting")]
|
||||||
public string IsRoomViewMeeting { get; set; }
|
public string IsRoomViewMeeting { get; set; }
|
||||||
//[XmlElement(ElementName = "IsPrivate")]
|
//[XmlElement(ElementName = "IsPrivate")]
|
||||||
public string IsPrivate { get; set; }
|
public string IsPrivate { get; set; }
|
||||||
//[XmlElement(ElementName = "IsExchangePrivate")]
|
//[XmlElement(ElementName = "IsExchangePrivate")]
|
||||||
public string IsExchangePrivate { get; set; }
|
public string IsExchangePrivate { get; set; }
|
||||||
//[XmlElement(ElementName = "MeetingTypes")]
|
//[XmlElement(ElementName = "MeetingTypes")]
|
||||||
public MeetingTypes MeetingTypes { get; set; }
|
public MeetingTypes MeetingTypes { get; set; }
|
||||||
//[XmlElement(ElementName = "ParticipantCode")]
|
//[XmlElement(ElementName = "ParticipantCode")]
|
||||||
public string ParticipantCode { get; set; }
|
public string ParticipantCode { get; set; }
|
||||||
//[XmlElement(ElementName = "PhoneNo")]
|
//[XmlElement(ElementName = "PhoneNo")]
|
||||||
public string PhoneNo { get; set; }
|
public string PhoneNo { get; set; }
|
||||||
//[XmlElement(ElementName = "WelcomeMsg")]
|
//[XmlElement(ElementName = "WelcomeMsg")]
|
||||||
public string WelcomeMsg { get; set; }
|
public string WelcomeMsg { get; set; }
|
||||||
//[XmlElement(ElementName = "Subject")]
|
//[XmlElement(ElementName = "Subject")]
|
||||||
public string Subject { get; set; }
|
public string Subject { get; set; }
|
||||||
//[XmlElement(ElementName = "LiveMeeting")]
|
//[XmlElement(ElementName = "LiveMeeting")]
|
||||||
public LiveMeeting LiveMeeting { get; set; }
|
public LiveMeeting LiveMeeting { get; set; }
|
||||||
//[XmlElement(ElementName = "ShareDocPath")]
|
//[XmlElement(ElementName = "ShareDocPath")]
|
||||||
public string ShareDocPath { get; set; }
|
public string ShareDocPath { get; set; }
|
||||||
//[XmlElement(ElementName = "HaveAttendees")]
|
//[XmlElement(ElementName = "HaveAttendees")]
|
||||||
public string HaveAttendees { get; set; }
|
public string HaveAttendees { get; set; }
|
||||||
//[XmlElement(ElementName = "HaveResources")]
|
//[XmlElement(ElementName = "HaveResources")]
|
||||||
public string HaveResources { get; set; }
|
public string HaveResources { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the duration of the meeting
|
/// Gets the duration of the meeting
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string DurationInMinutes
|
public string DurationInMinutes
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
string duration;
|
string duration;
|
||||||
|
|
||||||
var timeSpan = dtEnd.Subtract(dtStart);
|
var timeSpan = dtEnd.Subtract(dtStart);
|
||||||
int hours = timeSpan.Hours;
|
int hours = timeSpan.Hours;
|
||||||
double minutes = timeSpan.Minutes;
|
double minutes = timeSpan.Minutes;
|
||||||
double roundedMinutes = Math.Round(minutes);
|
double roundedMinutes = Math.Round(minutes);
|
||||||
if (hours > 0)
|
if (hours > 0)
|
||||||
{
|
{
|
||||||
duration = string.Format("{0} hours {1} minutes", hours, roundedMinutes);
|
duration = string.Format("{0} hours {1} minutes", hours, roundedMinutes);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
duration = string.Format("{0} minutes", roundedMinutes);
|
duration = string.Format("{0} minutes", roundedMinutes);
|
||||||
}
|
}
|
||||||
|
|
||||||
return duration;
|
return duration;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the remaining time in the meeting. Returns null if the meeting is not currently in progress.
|
/// Gets the remaining time in the meeting. Returns null if the meeting is not currently in progress.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string RemainingTime
|
public string RemainingTime
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
var now = DateTime.Now;
|
var now = DateTime.Now;
|
||||||
|
|
||||||
string remainingTime;
|
string remainingTime;
|
||||||
|
|
||||||
if (GetInProgress())
|
if (GetInProgress())
|
||||||
{
|
{
|
||||||
var timeSpan = dtEnd.Subtract(now);
|
var timeSpan = dtEnd.Subtract(now);
|
||||||
int hours = timeSpan.Hours;
|
int hours = timeSpan.Hours;
|
||||||
double minutes = timeSpan.Minutes;
|
double minutes = timeSpan.Minutes;
|
||||||
double roundedMinutes = Math.Round(minutes);
|
double roundedMinutes = Math.Round(minutes);
|
||||||
if (hours > 0)
|
if (hours > 0)
|
||||||
{
|
{
|
||||||
remainingTime = string.Format("{0} hours {1} minutes", hours, roundedMinutes);
|
remainingTime = string.Format("{0} hours {1} minutes", hours, roundedMinutes);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
remainingTime = string.Format("{0} minutes", roundedMinutes);
|
remainingTime = string.Format("{0} minutes", roundedMinutes);
|
||||||
}
|
}
|
||||||
|
|
||||||
return remainingTime;
|
return remainingTime;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Indicates that the meeting is in progress
|
/// Indicates that the meeting is in progress
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool isInProgress
|
public bool isInProgress
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return GetInProgress();
|
return GetInProgress();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Determines if the meeting is in progress
|
/// Determines if the meeting is in progress
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>Returns true if in progress</returns>
|
/// <returns>Returns true if in progress</returns>
|
||||||
bool GetInProgress()
|
bool GetInProgress()
|
||||||
{
|
{
|
||||||
var now = DateTime.Now;
|
var now = DateTime.Now;
|
||||||
|
|
||||||
if (now > dtStart && now < dtEnd)
|
if (now > dtStart && now < dtEnd)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//[XmlRoot(ElementName = "Resources")]
|
//[XmlRoot(ElementName = "Resources")]
|
||||||
public class Resources
|
public class Resources
|
||||||
{
|
{
|
||||||
//[XmlElement(ElementName = "Rooms")]
|
//[XmlElement(ElementName = "Rooms")]
|
||||||
public Rooms Rooms { get; set; }
|
public Rooms Rooms { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
//[XmlRoot(ElementName = "Rooms")]
|
//[XmlRoot(ElementName = "Rooms")]
|
||||||
public class Rooms
|
public class Rooms
|
||||||
{
|
{
|
||||||
//[XmlElement(ElementName = "Room")]
|
//[XmlElement(ElementName = "Room")]
|
||||||
public List<Room> Room { get; set; }
|
public List<Room> Room { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
//[XmlRoot(ElementName = "Room")]
|
//[XmlRoot(ElementName = "Room")]
|
||||||
public class Room
|
public class Room
|
||||||
{
|
{
|
||||||
//[XmlElement(ElementName = "Name")]
|
//[XmlElement(ElementName = "Name")]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
//[XmlElement(ElementName = "ID")]
|
//[XmlElement(ElementName = "ID")]
|
||||||
public string ID { get; set; }
|
public string ID { get; set; }
|
||||||
//[XmlElement(ElementName = "MPType")]
|
//[XmlElement(ElementName = "MPType")]
|
||||||
public string MPType { get; set; }
|
public string MPType { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
//[XmlRoot(ElementName = "Attendees")]
|
//[XmlRoot(ElementName = "Attendees")]
|
||||||
public class Attendees
|
public class Attendees
|
||||||
{
|
{
|
||||||
//[XmlElement(ElementName = "Required")]
|
//[XmlElement(ElementName = "Required")]
|
||||||
public Required Required { get; set; }
|
public Required Required { get; set; }
|
||||||
//[XmlElement(ElementName = "Optional")]
|
//[XmlElement(ElementName = "Optional")]
|
||||||
public Optional Optional { get; set; }
|
public Optional Optional { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
//[XmlRoot(ElementName = "Required")]
|
//[XmlRoot(ElementName = "Required")]
|
||||||
public class Required
|
public class Required
|
||||||
{
|
{
|
||||||
//[XmlElement(ElementName = "Attendee")]
|
//[XmlElement(ElementName = "Attendee")]
|
||||||
public List<string> Attendee { get; set; }
|
public List<string> Attendee { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
//[XmlRoot(ElementName = "Optional")]
|
//[XmlRoot(ElementName = "Optional")]
|
||||||
public class Optional
|
public class Optional
|
||||||
{
|
{
|
||||||
//[XmlElement(ElementName = "Attendee")]
|
//[XmlElement(ElementName = "Attendee")]
|
||||||
public List<string> Attendee { get; set; }
|
public List<string> Attendee { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
//[XmlRoot(ElementName = "MeetingType")]
|
//[XmlRoot(ElementName = "MeetingType")]
|
||||||
public class MeetingType
|
public class MeetingType
|
||||||
{
|
{
|
||||||
//[XmlAttribute(AttributeName = "ID")]
|
//[XmlAttribute(AttributeName = "ID")]
|
||||||
public string ID { get; set; }
|
public string ID { get; set; }
|
||||||
//[XmlAttribute(AttributeName = "Value")]
|
//[XmlAttribute(AttributeName = "Value")]
|
||||||
public string Value { get; set; }
|
public string Value { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
//[XmlRoot(ElementName = "MeetingTypes")]
|
//[XmlRoot(ElementName = "MeetingTypes")]
|
||||||
public class MeetingTypes
|
public class MeetingTypes
|
||||||
{
|
{
|
||||||
//[XmlElement(ElementName = "MeetingType")]
|
//[XmlElement(ElementName = "MeetingType")]
|
||||||
public List<MeetingType> MeetingType { get; set; }
|
public List<MeetingType> MeetingType { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
//[XmlRoot(ElementName = "LiveMeeting")]
|
//[XmlRoot(ElementName = "LiveMeeting")]
|
||||||
public class LiveMeeting
|
public class LiveMeeting
|
||||||
{
|
{
|
||||||
//[XmlElement(ElementName = "URL")]
|
//[XmlElement(ElementName = "URL")]
|
||||||
public string URL { get; set; }
|
public string URL { get; set; }
|
||||||
//[XmlElement(ElementName = "ID")]
|
//[XmlElement(ElementName = "ID")]
|
||||||
public string ID { get; set; }
|
public string ID { get; set; }
|
||||||
//[XmlElement(ElementName = "Key")]
|
//[XmlElement(ElementName = "Key")]
|
||||||
public string Key { get; set; }
|
public string Key { get; set; }
|
||||||
//[XmlElement(ElementName = "Subject")]
|
//[XmlElement(ElementName = "Subject")]
|
||||||
public string Subject { get; set; }
|
public string Subject { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
//[XmlRoot(ElementName = "LiveMeetingURL")]
|
//[XmlRoot(ElementName = "LiveMeetingURL")]
|
||||||
public class LiveMeetingURL
|
public class LiveMeetingURL
|
||||||
{
|
{
|
||||||
//[XmlElement(ElementName = "LiveMeeting")]
|
//[XmlElement(ElementName = "LiveMeeting")]
|
||||||
public LiveMeeting LiveMeeting { get; set; }
|
public LiveMeeting LiveMeeting { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -134,11 +134,11 @@
|
|||||||
<Compile Include="Devices\DiscPlayer\OppoExtendedBdp.cs" />
|
<Compile Include="Devices\DiscPlayer\OppoExtendedBdp.cs" />
|
||||||
<Compile Include="Devices\NUMERIC AppleTV.cs" />
|
<Compile Include="Devices\NUMERIC AppleTV.cs" />
|
||||||
<Compile Include="ControlSystem.cs" />
|
<Compile Include="ControlSystem.cs" />
|
||||||
<Compile Include="Fusion\FusionEventHandlers.cs" />
|
<Compile Include="OTHER\Fusion\FusionEventHandlers.cs" />
|
||||||
<Compile Include="Fusion\FusionProcessorQueries.cs" />
|
<Compile Include="OTHER\Fusion\FusionProcessorQueries.cs" />
|
||||||
<Compile Include="Fusion\FusionRviDataClasses.cs" />
|
<Compile Include="OTHER\Fusion\FusionRviDataClasses.cs" />
|
||||||
<Compile Include="REMOVE EssentialsApp.cs" />
|
<Compile Include="REMOVE EssentialsApp.cs" />
|
||||||
<Compile Include="Fusion\FusionSystemController.cs" />
|
<Compile Include="OTHER\Fusion\FusionSystemController.cs" />
|
||||||
<Compile Include="HttpApiHandler.cs" />
|
<Compile Include="HttpApiHandler.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Room\Config\EssentialsPresentationPropertiesConfig.cs" />
|
<Compile Include="Room\Config\EssentialsPresentationPropertiesConfig.cs" />
|
||||||
@@ -165,7 +165,7 @@
|
|||||||
<Compile Include="FOR REFERENCE UI\PageControllers\LargeTouchpanelControllerBase.cs" />
|
<Compile Include="FOR REFERENCE UI\PageControllers\LargeTouchpanelControllerBase.cs" />
|
||||||
<Compile Include="FOR REFERENCE UI\Panels\SmartGraphicsTouchpanelControllerBase.cs" />
|
<Compile Include="FOR REFERENCE UI\Panels\SmartGraphicsTouchpanelControllerBase.cs" />
|
||||||
<Compile Include="UI\SubpageReferenceListCallStagingItem.cs" />
|
<Compile Include="UI\SubpageReferenceListCallStagingItem.cs" />
|
||||||
<Compile Include="UIDrivers\VC\EssentialsCiscoSparkUiDriver.cs" />
|
<Compile Include="UIDrivers\VC\EssentialsVideoCodecUiDriver.cs" />
|
||||||
<Compile Include="UIDrivers\JoinedSigInterlock.cs" />
|
<Compile Include="UIDrivers\JoinedSigInterlock.cs" />
|
||||||
<Compile Include="UIDrivers\EssentialsHuddleVTC\HuddleVTCPanelAvFunctionsDriver.cs" />
|
<Compile Include="UIDrivers\EssentialsHuddleVTC\HuddleVTCPanelAvFunctionsDriver.cs" />
|
||||||
<Compile Include="UIDrivers\VolumeAndSourceChangeArgs.cs" />
|
<Compile Include="UIDrivers\VolumeAndSourceChangeArgs.cs" />
|
||||||
@@ -193,9 +193,6 @@
|
|||||||
<None Include="app.config" />
|
<None Include="app.config" />
|
||||||
<None Include="Properties\ControlSystem.cfg" />
|
<None Include="Properties\ControlSystem.cfg" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<Folder Include="OTHER\" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
|
||||||
<ProjectExtensions>
|
<ProjectExtensions>
|
||||||
<VisualStudio>
|
<VisualStudio>
|
||||||
|
|||||||
@@ -13,5 +13,6 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
public string DefaultAudioKey { get; set; }
|
public string DefaultAudioKey { get; set; }
|
||||||
public string SourceListKey { get; set; }
|
public string SourceListKey { get; set; }
|
||||||
public string DefaultSourceItem { get; set; }
|
public string DefaultSourceItem { get; set; }
|
||||||
|
public string VideoCodecKey { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -59,7 +59,11 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
var props = JsonConvert.DeserializeObject<EssentialsHuddleVtc1PropertiesConfig>
|
var props = JsonConvert.DeserializeObject<EssentialsHuddleVtc1PropertiesConfig>
|
||||||
(this.Properties.ToString());
|
(this.Properties.ToString());
|
||||||
var disp = DeviceManager.GetDeviceForKey(props.DefaultDisplayKey) as IRoutingSinkWithSwitching;
|
var disp = DeviceManager.GetDeviceForKey(props.DefaultDisplayKey) as IRoutingSinkWithSwitching;
|
||||||
var rm = new EssentialsHuddleVtc1Room(Key, Name, disp, disp, props);
|
|
||||||
|
var codec = DeviceManager.GetDeviceForKey(props.VideoCodecKey) as
|
||||||
|
PepperDash.Essentials.Devices.Common.VideoCodec.VideoCodecBase;
|
||||||
|
|
||||||
|
var rm = new EssentialsHuddleVtc1Room(Key, Name, disp, disp, codec, props);
|
||||||
rm.LogoUrl = props.Logo.GetUrl();
|
rm.LogoUrl = props.Logo.GetUrl();
|
||||||
rm.SourceListKey = props.SourceListKey;
|
rm.SourceListKey = props.SourceListKey;
|
||||||
rm.DefaultSourceItem = props.DefaultSourceItem;
|
rm.DefaultSourceItem = props.DefaultSourceItem;
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ using Crestron.SimplSharp;
|
|||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Room.Config;
|
using PepperDash.Essentials.Room.Config;
|
||||||
|
using PepperDash.Essentials.Devices.Common.VideoCodec;
|
||||||
|
|
||||||
namespace PepperDash.Essentials
|
namespace PepperDash.Essentials
|
||||||
{
|
{
|
||||||
@@ -71,6 +72,8 @@ namespace PepperDash.Essentials
|
|||||||
public IRoutingSinkNoSwitching DefaultAudioDevice { get; private set; }
|
public IRoutingSinkNoSwitching DefaultAudioDevice { get; private set; }
|
||||||
public IBasicVolumeControls DefaultVolumeControls { get; private set; }
|
public IBasicVolumeControls DefaultVolumeControls { get; private set; }
|
||||||
|
|
||||||
|
public VideoCodecBase VideoCodec { get; private set; }
|
||||||
|
|
||||||
public bool ExcludeFromGlobalFunctions { get; set; }
|
public bool ExcludeFromGlobalFunctions { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -152,11 +155,12 @@ namespace PepperDash.Essentials
|
|||||||
/// <param name="key"></param>
|
/// <param name="key"></param>
|
||||||
/// <param name="name"></param>
|
/// <param name="name"></param>
|
||||||
public EssentialsHuddleVtc1Room(string key, string name, IRoutingSinkWithSwitching defaultDisplay,
|
public EssentialsHuddleVtc1Room(string key, string name, IRoutingSinkWithSwitching defaultDisplay,
|
||||||
IRoutingSinkNoSwitching defaultAudio, EssentialsHuddleVtc1PropertiesConfig config)
|
IRoutingSinkNoSwitching defaultAudio, VideoCodecBase vc, EssentialsHuddleVtc1PropertiesConfig config)
|
||||||
: base(key, name)
|
: base(key, name)
|
||||||
{
|
{
|
||||||
Config = config;
|
Config = config;
|
||||||
DefaultDisplay = defaultDisplay;
|
DefaultDisplay = defaultDisplay;
|
||||||
|
VideoCodec = vc;
|
||||||
DefaultAudioDevice = defaultAudio;
|
DefaultAudioDevice = defaultAudio;
|
||||||
if (defaultAudio is IBasicVolumeControls)
|
if (defaultAudio is IBasicVolumeControls)
|
||||||
DefaultVolumeControls = defaultAudio as IBasicVolumeControls;
|
DefaultVolumeControls = defaultAudio as IBasicVolumeControls;
|
||||||
|
|||||||
@@ -154,6 +154,9 @@ namespace PepperDash.Essentials
|
|||||||
{
|
{
|
||||||
Debug.Console(0, this, "Adding huddle space driver");
|
Debug.Console(0, this, "Adding huddle space driver");
|
||||||
var avDriver = new EssentialsHuddleVtc1PanelAvFunctionsDriver(mainDriver, props);
|
var avDriver = new EssentialsHuddleVtc1PanelAvFunctionsDriver(mainDriver, props);
|
||||||
|
var codecDriver = new PepperDash.Essentials.UIDrivers.VC.EssentialsVideoCodecUiDriver(Panel,
|
||||||
|
(room as EssentialsHuddleVtc1Room).VideoCodec);
|
||||||
|
avDriver.SetVideoCodecDriver(codecDriver);
|
||||||
avDriver.CurrentRoom = room as EssentialsHuddleVtc1Room;
|
avDriver.CurrentRoom = room as EssentialsHuddleVtc1Room;
|
||||||
avDriver.DefaultRoomKey = props.DefaultRoomKey;
|
avDriver.DefaultRoomKey = props.DefaultRoomKey;
|
||||||
mainDriver.AvDriver = avDriver;
|
mainDriver.AvDriver = avDriver;
|
||||||
|
|||||||
@@ -143,6 +143,10 @@ namespace PepperDash.Essentials
|
|||||||
/// 1235
|
/// 1235
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint VCStagingCameraPress = 1235;
|
public const uint VCStagingCameraPress = 1235;
|
||||||
|
/// <summary>
|
||||||
|
/// 1236
|
||||||
|
/// </summary>
|
||||||
|
public const uint VCStagingConnectEnable = 1236;
|
||||||
|
|
||||||
//******************************************************
|
//******************************************************
|
||||||
// Keyboard
|
// Keyboard
|
||||||
|
|||||||
@@ -5,6 +5,12 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class UIUshortJoin
|
public class UIUshortJoin
|
||||||
{
|
{
|
||||||
|
// Video Codec
|
||||||
|
/// <summary>
|
||||||
|
/// 1234 - 0 = Connect, 1 = End
|
||||||
|
/// </summary>
|
||||||
|
public const uint VCStagingConnectButtonMode = 1234;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 3812
|
/// 3812
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Linq;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharpPro;
|
using Crestron.SimplSharpPro;
|
||||||
@@ -127,7 +128,7 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
JoinedSigInterlock CallPagesInterlock;
|
JoinedSigInterlock CallPagesInterlock;
|
||||||
|
|
||||||
PepperDash.Essentials.UIDrivers.VC.EssentialsCiscoSparkUiDriver VCDriver;
|
PepperDash.Essentials.UIDrivers.VC.EssentialsVideoCodecUiDriver VCDriver;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructor
|
/// Constructor
|
||||||
@@ -138,8 +139,6 @@ namespace PepperDash.Essentials
|
|||||||
Config = config;
|
Config = config;
|
||||||
Parent = parent;
|
Parent = parent;
|
||||||
|
|
||||||
VCDriver = new PepperDash.Essentials.UIDrivers.VC.EssentialsCiscoSparkUiDriver(Parent.TriList, null);
|
|
||||||
|
|
||||||
PopupInterlock = new JoinedSigInterlock(TriList);
|
PopupInterlock = new JoinedSigInterlock(TriList);
|
||||||
StagingBarInterlock = new JoinedSigInterlock(TriList);
|
StagingBarInterlock = new JoinedSigInterlock(TriList);
|
||||||
CallPagesInterlock = new JoinedSigInterlock(TriList);
|
CallPagesInterlock = new JoinedSigInterlock(TriList);
|
||||||
@@ -158,6 +157,15 @@ namespace PepperDash.Essentials
|
|||||||
//TriList.StringInput[UIStringJoin.StartActivityText].StringValue = "Tap an activity below";
|
//TriList.StringInput[UIStringJoin.StartActivityText].StringValue = "Tap an activity below";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Add a video codec driver to this
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="vcd"></param>
|
||||||
|
public void SetVideoCodecDriver(PepperDash.Essentials.UIDrivers.VC.EssentialsVideoCodecUiDriver vcd)
|
||||||
|
{
|
||||||
|
VCDriver = vcd;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -19,8 +19,11 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
/// Probably needs event or FB to feed AV driver - to show two-mute volume when appropriate.
|
/// Probably needs event or FB to feed AV driver - to show two-mute volume when appropriate.
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class EssentialsCiscoSparkUiDriver : PanelDriverBase
|
public class EssentialsVideoCodecUiDriver : PanelDriverBase
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
VideoCodecBase Codec;
|
VideoCodecBase Codec;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -62,7 +65,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="triList"></param>
|
/// <param name="triList"></param>
|
||||||
/// <param name="codec"></param>
|
/// <param name="codec"></param>
|
||||||
public EssentialsCiscoSparkUiDriver(BasicTriListWithSmartObject triList, VideoCodecBase codec)
|
public EssentialsVideoCodecUiDriver(BasicTriListWithSmartObject triList, VideoCodecBase codec)
|
||||||
: base(triList)
|
: base(triList)
|
||||||
{
|
{
|
||||||
Codec = codec;
|
Codec = codec;
|
||||||
@@ -146,6 +149,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
DialKeypad.Misc1.SetSigFalseAction(() => DialKeypadPress("*"));
|
DialKeypad.Misc1.SetSigFalseAction(() => DialKeypadPress("*"));
|
||||||
DialKeypad.Misc2SigName = "#";
|
DialKeypad.Misc2SigName = "#";
|
||||||
DialKeypad.Misc2.SetSigFalseAction(() => DialKeypadPress("#"));
|
DialKeypad.Misc2.SetSigFalseAction(() => DialKeypadPress("#"));
|
||||||
|
TriList.SetSigFalseAction(UIBoolJoin.KeyboardClearPress, DialKeypadBackspacePress);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Debug.Console(0, "Trilist {0:x2}, VC dial keypad object {1} not found. Check SGD file or VTP",
|
Debug.Console(0, "Trilist {0:x2}, VC dial keypad object {1} not found. Check SGD file or VTP",
|
||||||
@@ -198,6 +202,13 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
|
|
||||||
void InCallFeedback_OutputChange(object sender, EventArgs e)
|
void InCallFeedback_OutputChange(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
#warning mode does not change!
|
||||||
|
var inCall = Codec.InCallFeedback.BoolValue;
|
||||||
|
Debug.Console(2, "*#* Codec Driver InCallFeedback change={0}", InCall);
|
||||||
|
TriList.UShortInput[UIUshortJoin.VCStagingConnectButtonMode].UShortValue = (ushort)(inCall ? 1 : 0);
|
||||||
|
StagingBarInterlock.ShowInterlocked(
|
||||||
|
inCall ? UIBoolJoin.VCStagingActivePopoverVisible : UIBoolJoin.VCStagingInactivePopoverVisible);
|
||||||
|
|
||||||
if (Codec.InCallFeedback.BoolValue) // Call is starting
|
if (Codec.InCallFeedback.BoolValue) // Call is starting
|
||||||
{
|
{
|
||||||
// Header icon
|
// Header icon
|
||||||
@@ -224,12 +235,16 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
DialStringBuilder.Length > 0;
|
DialStringBuilder.Length > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
void DialKeypadBackspacePress()
|
void DialKeypadBackspacePress()
|
||||||
{
|
{
|
||||||
DialStringBuilder.Remove(DialStringBuilder.Length - 1, 1);
|
DialStringBuilder.Remove(DialStringBuilder.Length - 1, 1);
|
||||||
DialStringFeedback.FireUpdate();
|
DialStringFeedback.FireUpdate();
|
||||||
TriList.BooleanInput[UIBoolJoin.KeyboardClearVisible].BoolValue =
|
TriList.BooleanInput[UIBoolJoin.KeyboardClearVisible].BoolValue =
|
||||||
DialStringBuilder.Length > 0;
|
DialStringBuilder.Length > 0;
|
||||||
|
TriList.SetBool(UIBoolJoin.VCStagingConnectEnable, DialStringBuilder.Length > 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user