mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 12:44:58 +00:00
Adds FusionRoomJoinMap and ability to set IPID and JoinMapKey from config
This commit is contained in:
@@ -432,12 +432,26 @@ namespace PepperDash.Essentials
|
|||||||
var room = EssentialsRoomConfigHelper.GetRoomObject(roomConfig) as EssentialsRoomBase;
|
var room = EssentialsRoomConfigHelper.GetRoomObject(roomConfig) as EssentialsRoomBase;
|
||||||
if (room != null)
|
if (room != null)
|
||||||
{
|
{
|
||||||
|
// default IPID
|
||||||
|
uint fusionIpId = 0xf1;
|
||||||
|
|
||||||
|
// default to no join map key
|
||||||
|
string fusionJoinMapKey = string.Empty;
|
||||||
|
|
||||||
|
var fusionConfig = room.Config.Properties["fusion"].ToObject<EssentialsRoomFusionConfig>();
|
||||||
|
|
||||||
|
if (fusionConfig != null)
|
||||||
|
{
|
||||||
|
fusionIpId = fusionConfig.IpIdInt;
|
||||||
|
fusionJoinMapKey = fusionConfig.JoinMapKey;
|
||||||
|
}
|
||||||
|
|
||||||
if (room is EssentialsHuddleSpaceRoom)
|
if (room is EssentialsHuddleSpaceRoom)
|
||||||
{
|
{
|
||||||
DeviceManager.AddDevice(room);
|
DeviceManager.AddDevice(room);
|
||||||
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Room is EssentialsHuddleSpaceRoom, attempting to add to DeviceManager with Fusion");
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Room is EssentialsHuddleSpaceRoom, attempting to add to DeviceManager with Fusion");
|
||||||
DeviceManager.AddDevice(new Core.Fusion.EssentialsHuddleSpaceFusionSystemControllerBase(room, 0xf1));
|
DeviceManager.AddDevice(new Core.Fusion.EssentialsHuddleSpaceFusionSystemControllerBase(room, fusionIpId, fusionJoinMapKey));
|
||||||
|
|
||||||
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to build Mobile Control Bridge...");
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to build Mobile Control Bridge...");
|
||||||
@@ -449,7 +463,7 @@ namespace PepperDash.Essentials
|
|||||||
DeviceManager.AddDevice(room);
|
DeviceManager.AddDevice(room);
|
||||||
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Room is EssentialsHuddleVtc1Room, attempting to add to DeviceManager with Fusion");
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Room is EssentialsHuddleVtc1Room, attempting to add to DeviceManager with Fusion");
|
||||||
DeviceManager.AddDevice(new EssentialsHuddleVtc1FusionController((EssentialsHuddleVtc1Room)room, 0xf1));
|
DeviceManager.AddDevice(new EssentialsHuddleVtc1FusionController((EssentialsHuddleVtc1Room)room, fusionIpId, fusionJoinMapKey));
|
||||||
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to build Mobile Control Bridge...");
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to build Mobile Control Bridge...");
|
||||||
|
|
||||||
@@ -461,7 +475,7 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice,
|
Debug.Console(0, Debug.ErrorLogLevel.Notice,
|
||||||
"Room is EssentialsTechRoom, Attempting to add to DeviceManager with Fusion");
|
"Room is EssentialsTechRoom, Attempting to add to DeviceManager with Fusion");
|
||||||
DeviceManager.AddDevice(new EssentialsHuddleSpaceFusionSystemControllerBase(room, 0xF1));
|
DeviceManager.AddDevice(new EssentialsHuddleSpaceFusionSystemControllerBase(room, fusionIpId, fusionJoinMapKey));
|
||||||
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to build Mobile Control Bridge");
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to build Mobile Control Bridge");
|
||||||
|
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ namespace PepperDash.Essentials.Fusion
|
|||||||
{
|
{
|
||||||
BooleanSigData CodecIsInCall;
|
BooleanSigData CodecIsInCall;
|
||||||
|
|
||||||
public EssentialsHuddleVtc1FusionController(EssentialsHuddleVtc1Room room, uint ipId)
|
public EssentialsHuddleVtc1FusionController(EssentialsHuddleVtc1Room room, uint ipId, string joinMapKey)
|
||||||
: base(room, ipId)
|
: base(room, ipId, joinMapKey)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -166,7 +166,7 @@ namespace PepperDash.Essentials.Fusion
|
|||||||
|
|
||||||
CrestronConsole.AddNewConsoleCommand(RequestFullRoomSchedule, "FusReqRoomSchedule", "Requests schedule of the room for the next 24 hours", ConsoleAccessLevelEnum.AccessOperator);
|
CrestronConsole.AddNewConsoleCommand(RequestFullRoomSchedule, "FusReqRoomSchedule", "Requests schedule of the room for the next 24 hours", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
CrestronConsole.AddNewConsoleCommand(ModifyMeetingEndTimeConsoleHelper, "FusReqRoomSchMod", "Ends or extends a meeting by the specified time", ConsoleAccessLevelEnum.AccessOperator);
|
CrestronConsole.AddNewConsoleCommand(ModifyMeetingEndTimeConsoleHelper, "FusReqRoomSchMod", "Ends or extends a meeting by the specified time", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
CrestronConsole.AddNewConsoleCommand(CreateAsHocMeeting, "FusCreateMeeting", "Creates and Ad Hoc meeting for on hour or until the next meeting", ConsoleAccessLevelEnum.AccessOperator);
|
CrestronConsole.AddNewConsoleCommand(CreateAdHocMeeting, "FusCreateMeeting", "Creates and Ad Hoc meeting for on hour or until the next meeting", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
|
|
||||||
// Room to fusion room
|
// Room to fusion room
|
||||||
Room.OnFeedback.LinkInputSig(FusionRoom.SystemPowerOn.InputSig);
|
Room.OnFeedback.LinkInputSig(FusionRoom.SystemPowerOn.InputSig);
|
||||||
|
|||||||
@@ -177,6 +177,9 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
[JsonProperty("volumes")]
|
[JsonProperty("volumes")]
|
||||||
public EssentialsRoomVolumesConfig Volumes { get; set; }
|
public EssentialsRoomVolumesConfig Volumes { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("fusion")]
|
||||||
|
public EssentialsRoomFusionConfig Fusion { get; set; }
|
||||||
|
|
||||||
[JsonProperty("zeroVolumeWhenSwtichingVolumeDevices")]
|
[JsonProperty("zeroVolumeWhenSwtichingVolumeDevices")]
|
||||||
public bool ZeroVolumeWhenSwtichingVolumeDevices { get; set; }
|
public bool ZeroVolumeWhenSwtichingVolumeDevices { get; set; }
|
||||||
|
|
||||||
@@ -220,6 +223,32 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class EssentialsRoomFusionConfig
|
||||||
|
{
|
||||||
|
public uint IpIdInt
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return Convert.ToUInt32(IpId, 16);
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
throw new FormatException(string.Format("ERROR:Unable to convert IP ID: {0} to hex. Error:\n{1}", IpId));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[JsonProperty("ipId")]
|
||||||
|
public string IpId { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("joinMapKey")]
|
||||||
|
public string JoinMapKey { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public class EssentialsRoomMicrophonePrivacyConfig
|
public class EssentialsRoomMicrophonePrivacyConfig
|
||||||
{
|
{
|
||||||
[JsonProperty("deviceKey")]
|
[JsonProperty("deviceKey")]
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ namespace PepperDash.Essentials.Core.Bridges
|
|||||||
/// <param name="joinStart">Join this join map will start at</param>
|
/// <param name="joinStart">Join this join map will start at</param>
|
||||||
/// <param name="type">Type of the child join map</param>
|
/// <param name="type">Type of the child join map</param>
|
||||||
public AppleTvJoinMap(uint joinStart, Type type) : base(joinStart, type)
|
public AppleTvJoinMap(uint joinStart, Type type) : base(joinStart, type)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -16,6 +16,8 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
{
|
{
|
||||||
public class EssentialsHuddleSpaceFusionSystemControllerBase : Device, IOccupancyStatusProvider
|
public class EssentialsHuddleSpaceFusionSystemControllerBase : Device, IOccupancyStatusProvider
|
||||||
{
|
{
|
||||||
|
FusionRoomJoinMap JoinMap;
|
||||||
|
|
||||||
private const string RemoteOccupancyXml = "<Occupancy><Type>Local</Type><State>{0}</State></Occupancy>";
|
private const string RemoteOccupancyXml = "<Occupancy><Type>Local</Type><State>{0}</State></Occupancy>";
|
||||||
private readonly bool _guidFileExists;
|
private readonly bool _guidFileExists;
|
||||||
|
|
||||||
@@ -84,11 +86,19 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public EssentialsHuddleSpaceFusionSystemControllerBase(EssentialsRoomBase room, uint ipId)
|
public EssentialsHuddleSpaceFusionSystemControllerBase(EssentialsRoomBase room, uint ipId, string joinMapKey)
|
||||||
: base(room.Key + "-fusion")
|
: base(room.Key + "-fusion")
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
JoinMap = new FusionRoomJoinMap(1);
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(joinMapKey))
|
||||||
|
{
|
||||||
|
var customJoins = JoinMapHelper.TryGetJoinMapAdvancedForDevice(joinMapKey);
|
||||||
|
JoinMap.SetCustomJoinData(customJoins);
|
||||||
|
}
|
||||||
|
|
||||||
Room = room;
|
Room = room;
|
||||||
|
|
||||||
_ipId = ipId;
|
_ipId = ipId;
|
||||||
@@ -319,7 +329,7 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
"Requests schedule of the room for the next 24 hours", ConsoleAccessLevelEnum.AccessOperator);
|
"Requests schedule of the room for the next 24 hours", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
CrestronConsole.AddNewConsoleCommand(ModifyMeetingEndTimeConsoleHelper, "FusReqRoomSchMod",
|
CrestronConsole.AddNewConsoleCommand(ModifyMeetingEndTimeConsoleHelper, "FusReqRoomSchMod",
|
||||||
"Ends or extends a meeting by the specified time", ConsoleAccessLevelEnum.AccessOperator);
|
"Ends or extends a meeting by the specified time", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
CrestronConsole.AddNewConsoleCommand(CreateAsHocMeeting, "FusCreateMeeting",
|
CrestronConsole.AddNewConsoleCommand(CreateAdHocMeeting, "FusCreateMeeting",
|
||||||
"Creates and Ad Hoc meeting for on hour or until the next meeting",
|
"Creates and Ad Hoc meeting for on hour or until the next meeting",
|
||||||
ConsoleAccessLevelEnum.AccessOperator);
|
ConsoleAccessLevelEnum.AccessOperator);
|
||||||
|
|
||||||
@@ -327,7 +337,7 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
Room.OnFeedback.LinkInputSig(FusionRoom.SystemPowerOn.InputSig);
|
Room.OnFeedback.LinkInputSig(FusionRoom.SystemPowerOn.InputSig);
|
||||||
|
|
||||||
// Moved to
|
// Moved to
|
||||||
CurrentRoomSourceNameSig = FusionRoom.CreateOffsetStringSig(84, "Display 1 - Current Source",
|
CurrentRoomSourceNameSig = FusionRoom.CreateOffsetStringSig(JoinMap.CurrentRoomSourceName.JoinNumber, "Display 1 - Current Source",
|
||||||
eSigIoMask.InputSigOnly);
|
eSigIoMask.InputSigOnly);
|
||||||
// Don't think we need to get current status of this as nothing should be alive yet.
|
// Don't think we need to get current status of this as nothing should be alive yet.
|
||||||
var hasCurrentSourceInfoChange = Room as IHasCurrentSourceInfoChange;
|
var hasCurrentSourceInfoChange = Room as IHasCurrentSourceInfoChange;
|
||||||
@@ -377,24 +387,24 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
|
|
||||||
var response = string.Empty;
|
var response = string.Empty;
|
||||||
|
|
||||||
var systemReboot = FusionRoom.CreateOffsetBoolSig(74, "Processor - Reboot", eSigIoMask.OutputSigOnly);
|
var systemReboot = FusionRoom.CreateOffsetBoolSig(JoinMap.ProcessorReboot.JoinNumber, "Processor - Reboot", eSigIoMask.OutputSigOnly);
|
||||||
systemReboot.OutputSig.SetSigFalseAction(
|
systemReboot.OutputSig.SetSigFalseAction(
|
||||||
() => CrestronConsole.SendControlSystemCommand("reboot", ref response));
|
() => CrestronConsole.SendControlSystemCommand("reboot", ref response));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void SetUpEthernetValues()
|
protected void SetUpEthernetValues()
|
||||||
{
|
{
|
||||||
_ip1 = FusionRoom.CreateOffsetStringSig(50, "Info - Processor - IP 1", eSigIoMask.InputSigOnly);
|
_ip1 = FusionRoom.CreateOffsetStringSig(JoinMap.ProcessorIp1.JoinNumber, "Info - Processor - IP 1", eSigIoMask.InputSigOnly);
|
||||||
_ip2 = FusionRoom.CreateOffsetStringSig(51, "Info - Processor - IP 2", eSigIoMask.InputSigOnly);
|
_ip2 = FusionRoom.CreateOffsetStringSig(JoinMap.ProcessorIp2.JoinNumber, "Info - Processor - IP 2", eSigIoMask.InputSigOnly);
|
||||||
_gateway = FusionRoom.CreateOffsetStringSig(52, "Info - Processor - Gateway", eSigIoMask.InputSigOnly);
|
_gateway = FusionRoom.CreateOffsetStringSig(JoinMap.ProcessorGateway.JoinNumber, "Info - Processor - Gateway", eSigIoMask.InputSigOnly);
|
||||||
_hostname = FusionRoom.CreateOffsetStringSig(53, "Info - Processor - Hostname", eSigIoMask.InputSigOnly);
|
_hostname = FusionRoom.CreateOffsetStringSig(JoinMap.ProcessorHostname.JoinNumber, "Info - Processor - Hostname", eSigIoMask.InputSigOnly);
|
||||||
_domain = FusionRoom.CreateOffsetStringSig(54, "Info - Processor - Domain", eSigIoMask.InputSigOnly);
|
_domain = FusionRoom.CreateOffsetStringSig(JoinMap.ProcessorDomain.JoinNumber, "Info - Processor - Domain", eSigIoMask.InputSigOnly);
|
||||||
_dns1 = FusionRoom.CreateOffsetStringSig(55, "Info - Processor - DNS 1", eSigIoMask.InputSigOnly);
|
_dns1 = FusionRoom.CreateOffsetStringSig(JoinMap.ProcessorDns1.JoinNumber, "Info - Processor - DNS 1", eSigIoMask.InputSigOnly);
|
||||||
_dns2 = FusionRoom.CreateOffsetStringSig(56, "Info - Processor - DNS 2", eSigIoMask.InputSigOnly);
|
_dns2 = FusionRoom.CreateOffsetStringSig(JoinMap.ProcessorDns2.JoinNumber, "Info - Processor - DNS 2", eSigIoMask.InputSigOnly);
|
||||||
_mac1 = FusionRoom.CreateOffsetStringSig(57, "Info - Processor - MAC 1", eSigIoMask.InputSigOnly);
|
_mac1 = FusionRoom.CreateOffsetStringSig(JoinMap.ProcessorMac1.JoinNumber, "Info - Processor - MAC 1", eSigIoMask.InputSigOnly);
|
||||||
_mac2 = FusionRoom.CreateOffsetStringSig(58, "Info - Processor - MAC 2", eSigIoMask.InputSigOnly);
|
_mac2 = FusionRoom.CreateOffsetStringSig(JoinMap.ProcessorMac2.JoinNumber, "Info - Processor - MAC 2", eSigIoMask.InputSigOnly);
|
||||||
_netMask1 = FusionRoom.CreateOffsetStringSig(59, "Info - Processor - Net Mask 1", eSigIoMask.InputSigOnly);
|
_netMask1 = FusionRoom.CreateOffsetStringSig(JoinMap.ProcessorNetMask1.JoinNumber, "Info - Processor - Net Mask 1", eSigIoMask.InputSigOnly);
|
||||||
_netMask2 = FusionRoom.CreateOffsetStringSig(60, "Info - Processor - Net Mask 2", eSigIoMask.InputSigOnly);
|
_netMask2 = FusionRoom.CreateOffsetStringSig(JoinMap.ProcessorNetMask2.JoinNumber, "Info - Processor - Net Mask 2", eSigIoMask.InputSigOnly);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void GetProcessorEthernetValues()
|
protected void GetProcessorEthernetValues()
|
||||||
@@ -447,13 +457,13 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
|
|
||||||
protected void GetProcessorInfo()
|
protected void GetProcessorInfo()
|
||||||
{
|
{
|
||||||
_firmware = FusionRoom.CreateOffsetStringSig(61, "Info - Processor - Firmware", eSigIoMask.InputSigOnly);
|
_firmware = FusionRoom.CreateOffsetStringSig(JoinMap.ProcessorFirmware.JoinNumber, "Info - Processor - Firmware", eSigIoMask.InputSigOnly);
|
||||||
|
|
||||||
if (CrestronEnvironment.DevicePlatform != eDevicePlatform.Server)
|
if (CrestronEnvironment.DevicePlatform != eDevicePlatform.Server)
|
||||||
{
|
{
|
||||||
for (var i = 0; i < Global.ControlSystem.NumProgramsSupported; i++)
|
for (var i = 0; i < Global.ControlSystem.NumProgramsSupported; i++)
|
||||||
{
|
{
|
||||||
var join = 62 + i;
|
var join = JoinMap.ProgramNameStart.JoinNumber + i;
|
||||||
var progNum = i + 1;
|
var progNum = i + 1;
|
||||||
_program[i] = FusionRoom.CreateOffsetStringSig((uint) join,
|
_program[i] = FusionRoom.CreateOffsetStringSig((uint) join,
|
||||||
string.Format("Info - Processor - Program {0}", progNum), eSigIoMask.InputSigOnly);
|
string.Format("Info - Processor - Program {0}", progNum), eSigIoMask.InputSigOnly);
|
||||||
@@ -484,57 +494,60 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
{
|
{
|
||||||
if (args.DeviceOnLine)
|
if (args.DeviceOnLine)
|
||||||
{
|
{
|
||||||
CrestronEnvironment.Sleep(200);
|
CrestronInvoke.BeginInvoke((o) =>
|
||||||
|
|
||||||
// Send Push Notification Action request:
|
|
||||||
|
|
||||||
const string requestId = "InitialPushRequest";
|
|
||||||
|
|
||||||
|
|
||||||
var actionRequest =
|
|
||||||
string.Format("<RequestAction>\n<RequestID>{0}</RequestID>\n", requestId) +
|
|
||||||
"<ActionID>RegisterPushModel</ActionID>\n" +
|
|
||||||
"<Parameters>\n" +
|
|
||||||
"<Parameter ID='Enabled' Value='1' />\n" +
|
|
||||||
"<Parameter ID='RequestID' Value='PushNotification' />\n" +
|
|
||||||
"<Parameter ID='Start' Value='00:00:00' />\n" +
|
|
||||||
"<Parameter ID='HourSpan' Value='24' />\n" +
|
|
||||||
"<Parameter ID='Field' Value='MeetingID' />\n" +
|
|
||||||
"<Parameter ID='Field' Value='RVMeetingID' />\n" +
|
|
||||||
"<Parameter ID='Field' Value='InstanceID' />\n" +
|
|
||||||
"<Parameter ID='Field' Value='dtStart' />\n" +
|
|
||||||
"<Parameter ID='Field' Value='dtEnd' />\n" +
|
|
||||||
"<Parameter ID='Field' Value='Subject' />\n" +
|
|
||||||
"<Parameter ID='Field' Value='Organizer' />\n" +
|
|
||||||
"<Parameter ID='Field' Value='IsEvent' />\n" +
|
|
||||||
"<Parameter ID='Field' Value='IsPrivate' />\n" +
|
|
||||||
"<Parameter ID='Field' Value='IsExchangePrivate' />\n" +
|
|
||||||
"<Parameter ID='Field' Value='LiveMeeting' />\n" +
|
|
||||||
"<Parameter ID='Field' Value='ShareDocPath' />\n" +
|
|
||||||
"<Parameter ID='Field' Value='PhoneNo' />\n" +
|
|
||||||
"<Parameter ID='Field' Value='ParticipantCode' />\n" +
|
|
||||||
"</Parameters>\n" +
|
|
||||||
"</RequestAction>\n";
|
|
||||||
|
|
||||||
Debug.Console(2, this, "Sending Fusion ActionRequest: \n{0}", actionRequest);
|
|
||||||
|
|
||||||
FusionRoom.ExtenderFusionRoomDataReservedSigs.ActionQuery.StringValue = actionRequest;
|
|
||||||
|
|
||||||
GetCustomProperties();
|
|
||||||
|
|
||||||
// Request current Fusion Server Time
|
|
||||||
RequestLocalDateTime(null);
|
|
||||||
|
|
||||||
// Setup timer to request time daily
|
|
||||||
if (_dailyTimeRequestTimer != null && !_dailyTimeRequestTimer.Disposed)
|
|
||||||
{
|
{
|
||||||
_dailyTimeRequestTimer.Stop();
|
CrestronEnvironment.Sleep(200);
|
||||||
_dailyTimeRequestTimer.Dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
_dailyTimeRequestTimer = new CTimer(RequestLocalDateTime, null, 86400000, 86400000);
|
// Send Push Notification Action request:
|
||||||
|
|
||||||
_dailyTimeRequestTimer.Reset(86400000, 86400000);
|
const string requestId = "InitialPushRequest";
|
||||||
|
|
||||||
|
|
||||||
|
var actionRequest =
|
||||||
|
string.Format("<RequestAction>\n<RequestID>{0}</RequestID>\n", requestId) +
|
||||||
|
"<ActionID>RegisterPushModel</ActionID>\n" +
|
||||||
|
"<Parameters>\n" +
|
||||||
|
"<Parameter ID='Enabled' Value='1' />\n" +
|
||||||
|
"<Parameter ID='RequestID' Value='PushNotification' />\n" +
|
||||||
|
"<Parameter ID='Start' Value='00:00:00' />\n" +
|
||||||
|
"<Parameter ID='HourSpan' Value='24' />\n" +
|
||||||
|
"<Parameter ID='Field' Value='MeetingID' />\n" +
|
||||||
|
"<Parameter ID='Field' Value='RVMeetingID' />\n" +
|
||||||
|
"<Parameter ID='Field' Value='InstanceID' />\n" +
|
||||||
|
"<Parameter ID='Field' Value='dtStart' />\n" +
|
||||||
|
"<Parameter ID='Field' Value='dtEnd' />\n" +
|
||||||
|
"<Parameter ID='Field' Value='Subject' />\n" +
|
||||||
|
"<Parameter ID='Field' Value='Organizer' />\n" +
|
||||||
|
"<Parameter ID='Field' Value='IsEvent' />\n" +
|
||||||
|
"<Parameter ID='Field' Value='IsPrivate' />\n" +
|
||||||
|
"<Parameter ID='Field' Value='IsExchangePrivate' />\n" +
|
||||||
|
"<Parameter ID='Field' Value='LiveMeeting' />\n" +
|
||||||
|
"<Parameter ID='Field' Value='ShareDocPath' />\n" +
|
||||||
|
"<Parameter ID='Field' Value='PhoneNo' />\n" +
|
||||||
|
"<Parameter ID='Field' Value='ParticipantCode' />\n" +
|
||||||
|
"</Parameters>\n" +
|
||||||
|
"</RequestAction>\n";
|
||||||
|
|
||||||
|
Debug.Console(2, this, "Sending Fusion ActionRequest: \n{0}", actionRequest);
|
||||||
|
|
||||||
|
FusionRoom.ExtenderFusionRoomDataReservedSigs.ActionQuery.StringValue = actionRequest;
|
||||||
|
|
||||||
|
GetCustomProperties();
|
||||||
|
|
||||||
|
// Request current Fusion Server Time
|
||||||
|
RequestLocalDateTime(null);
|
||||||
|
|
||||||
|
// Setup timer to request time daily
|
||||||
|
if (_dailyTimeRequestTimer != null && !_dailyTimeRequestTimer.Disposed)
|
||||||
|
{
|
||||||
|
_dailyTimeRequestTimer.Stop();
|
||||||
|
_dailyTimeRequestTimer.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
_dailyTimeRequestTimer = new CTimer(RequestLocalDateTime, null, 86400000, 86400000);
|
||||||
|
|
||||||
|
_dailyTimeRequestTimer.Reset(86400000, 86400000);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -641,7 +654,7 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates and Ad Hoc meeting with a duration of 1 hour, or until the next meeting if in less than 1 hour.
|
/// Creates and Ad Hoc meeting with a duration of 1 hour, or until the next meeting if in less than 1 hour.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void CreateAsHocMeeting(string command)
|
public void CreateAdHocMeeting(string command)
|
||||||
{
|
{
|
||||||
const string requestId = "CreateAdHocMeeting";
|
const string requestId = "CreateAdHocMeeting";
|
||||||
|
|
||||||
@@ -1031,9 +1044,9 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
uint i = 1;
|
uint i = 1;
|
||||||
foreach (var kvp in setTopBoxes)
|
foreach (var kvp in setTopBoxes)
|
||||||
{
|
{
|
||||||
TryAddRouteActionSigs("Display 1 - Source TV " + i, 188 + i, kvp.Key, kvp.Value.SourceDevice);
|
TryAddRouteActionSigs("Display 1 - Source TV " + i, JoinMap.Display1SetTopBoxSourceStart.JoinNumber + i, kvp.Key, kvp.Value.SourceDevice);
|
||||||
i++;
|
i++;
|
||||||
if (i > 5) // We only have five spots
|
if (i > JoinMap.Display1SetTopBoxSourceStart.JoinSpan) // We only have five spots
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1043,9 +1056,9 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
i = 1;
|
i = 1;
|
||||||
foreach (var kvp in discPlayers)
|
foreach (var kvp in discPlayers)
|
||||||
{
|
{
|
||||||
TryAddRouteActionSigs("Display 1 - Source DVD " + i, 181 + i, kvp.Key, kvp.Value.SourceDevice);
|
TryAddRouteActionSigs("Display 1 - Source DVD " + i, JoinMap.Display1DiscPlayerSourceStart.JoinNumber + i, kvp.Key, kvp.Value.SourceDevice);
|
||||||
i++;
|
i++;
|
||||||
if (i > 5) // We only have five spots
|
if (i > JoinMap.Display1DiscPlayerSourceStart.JoinSpan) // We only have five spots
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1055,9 +1068,9 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
i = 1;
|
i = 1;
|
||||||
foreach (var kvp in laptops)
|
foreach (var kvp in laptops)
|
||||||
{
|
{
|
||||||
TryAddRouteActionSigs("Display 1 - Source Laptop " + i, 166 + i, kvp.Key, kvp.Value.SourceDevice);
|
TryAddRouteActionSigs("Display 1 - Source Laptop " + i, JoinMap.Display1LaptopSourceStart.JoinNumber + i, kvp.Key, kvp.Value.SourceDevice);
|
||||||
i++;
|
i++;
|
||||||
if (i > 10) // We only have ten spots???
|
if (i > JoinMap.Display1LaptopSourceStart.JoinSpan) // We only have ten spots???
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1180,12 +1193,12 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
{
|
{
|
||||||
attrNum = attrNum + touchpanelNum;
|
attrNum = attrNum + touchpanelNum;
|
||||||
|
|
||||||
if (attrNum > 10)
|
if (attrNum > JoinMap.XpanelOnlineStart.JoinSpan)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
attrName = "Online - XPanel " + attrNum;
|
attrName = "Online - XPanel " + attrNum;
|
||||||
attrNum += 160;
|
attrNum += JoinMap.XpanelOnlineStart.JoinNumber;
|
||||||
|
|
||||||
touchpanelNum++;
|
touchpanelNum++;
|
||||||
}
|
}
|
||||||
@@ -1193,12 +1206,12 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
{
|
{
|
||||||
attrNum = attrNum + xpanelNum;
|
attrNum = attrNum + xpanelNum;
|
||||||
|
|
||||||
if (attrNum > 10)
|
if (attrNum > JoinMap.TouchpanelOnlineStart.JoinSpan)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
attrName = "Online - Touch Panel " + attrNum;
|
attrName = "Online - Touch Panel " + attrNum;
|
||||||
attrNum += 150;
|
attrNum += JoinMap.TouchpanelOnlineStart.JoinNumber;
|
||||||
|
|
||||||
xpanelNum++;
|
xpanelNum++;
|
||||||
}
|
}
|
||||||
@@ -1208,12 +1221,12 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
if (dev is DisplayBase)
|
if (dev is DisplayBase)
|
||||||
{
|
{
|
||||||
attrNum = attrNum + displayNum;
|
attrNum = attrNum + displayNum;
|
||||||
if (attrNum > 10)
|
if (attrNum > JoinMap.DisplayOnlineStart.JoinSpan)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
attrName = "Online - Display " + attrNum;
|
attrName = "Online - Display " + attrNum;
|
||||||
attrNum += 170;
|
attrNum += JoinMap.DisplayOnlineStart.JoinNumber;
|
||||||
|
|
||||||
displayNum++;
|
displayNum++;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,122 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Crestron.SimplSharp;
|
||||||
|
|
||||||
|
using PepperDash.Essentials.Core.Bridges;
|
||||||
|
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.Core.Fusion
|
||||||
|
{
|
||||||
|
public class FusionRoomJoinMap : JoinMapBaseAdvanced
|
||||||
|
{
|
||||||
|
|
||||||
|
// Processor Attributes
|
||||||
|
[JoinName("ProcessorIp1")]
|
||||||
|
public JoinDataComplete ProcessorIp1 = new JoinDataComplete(new JoinData { JoinNumber = 50, JoinSpan = 1 },
|
||||||
|
new JoinMetadata { Description = "Processor IP Address 1", JoinCapabilities = eJoinCapabilities.ToFusion, JoinType = eJoinType.Serial });
|
||||||
|
|
||||||
|
[JoinName("ProcessorIp2")]
|
||||||
|
public JoinDataComplete ProcessorIp2 = new JoinDataComplete(new JoinData { JoinNumber = 51, JoinSpan = 1 },
|
||||||
|
new JoinMetadata { Description = "Processor IP Address 2", JoinCapabilities = eJoinCapabilities.ToFusion, JoinType = eJoinType.Serial });
|
||||||
|
|
||||||
|
[JoinName("ProcessorGateway")]
|
||||||
|
public JoinDataComplete ProcessorGateway = new JoinDataComplete(new JoinData { JoinNumber = 52, JoinSpan = 1 },
|
||||||
|
new JoinMetadata { Description = "Processor Gateway Address", JoinCapabilities = eJoinCapabilities.ToFusion, JoinType = eJoinType.Serial });
|
||||||
|
|
||||||
|
[JoinName("ProcessorHostname")]
|
||||||
|
public JoinDataComplete ProcessorHostname = new JoinDataComplete(new JoinData { JoinNumber = 53, JoinSpan = 1 },
|
||||||
|
new JoinMetadata { Description = "Processor Hostname", JoinCapabilities = eJoinCapabilities.ToFusion, JoinType = eJoinType.Serial });
|
||||||
|
|
||||||
|
[JoinName("ProcessorDomain")]
|
||||||
|
public JoinDataComplete ProcessorDomain = new JoinDataComplete(new JoinData { JoinNumber = 55, JoinSpan = 1 },
|
||||||
|
new JoinMetadata { Description = "Processor Domain", JoinCapabilities = eJoinCapabilities.ToFusion, JoinType = eJoinType.Serial });
|
||||||
|
|
||||||
|
[JoinName("ProcessorDns1")]
|
||||||
|
public JoinDataComplete ProcessorDns1 = new JoinDataComplete(new JoinData { JoinNumber = 55, JoinSpan = 1 },
|
||||||
|
new JoinMetadata { Description = "Processor DNS 1", JoinCapabilities = eJoinCapabilities.ToFusion, JoinType = eJoinType.Serial });
|
||||||
|
|
||||||
|
[JoinName("ProcessorDns2")]
|
||||||
|
public JoinDataComplete ProcessorDns2 = new JoinDataComplete(new JoinData { JoinNumber = 56, JoinSpan = 1 },
|
||||||
|
new JoinMetadata { Description = "Processor DNS 2", JoinCapabilities = eJoinCapabilities.ToFusion, JoinType = eJoinType.Serial });
|
||||||
|
|
||||||
|
[JoinName("ProcessorMac1")]
|
||||||
|
public JoinDataComplete ProcessorMac1 = new JoinDataComplete(new JoinData { JoinNumber = 57, JoinSpan = 1 },
|
||||||
|
new JoinMetadata { Description = "Processor MAC Address 1", JoinCapabilities = eJoinCapabilities.ToFusion, JoinType = eJoinType.Serial });
|
||||||
|
|
||||||
|
[JoinName("ProcessorMac2")]
|
||||||
|
public JoinDataComplete ProcessorMac2 = new JoinDataComplete(new JoinData { JoinNumber = 58, JoinSpan = 1 },
|
||||||
|
new JoinMetadata { Description = "Processor MAC Address 2", JoinCapabilities = eJoinCapabilities.ToFusion, JoinType = eJoinType.Serial });
|
||||||
|
|
||||||
|
[JoinName("ProcessorNetMask1")]
|
||||||
|
public JoinDataComplete ProcessorNetMask1 = new JoinDataComplete(new JoinData { JoinNumber = 59, JoinSpan = 1 },
|
||||||
|
new JoinMetadata { Description = "Processor NetMask Address 1", JoinCapabilities = eJoinCapabilities.ToFusion, JoinType = eJoinType.Serial });
|
||||||
|
|
||||||
|
[JoinName("ProcessorNetMask2")]
|
||||||
|
public JoinDataComplete ProcessorNetMask2 = new JoinDataComplete(new JoinData { JoinNumber = 60, JoinSpan = 1 },
|
||||||
|
new JoinMetadata { Description = "Processor NetMask Address 2", JoinCapabilities = eJoinCapabilities.ToFusion, JoinType = eJoinType.Serial });
|
||||||
|
|
||||||
|
[JoinName("ProcessorFirmware")]
|
||||||
|
public JoinDataComplete ProcessorFirmware = new JoinDataComplete(new JoinData { JoinNumber = 61, JoinSpan = 1 },
|
||||||
|
new JoinMetadata { Description = "Processor Firmware Version", JoinCapabilities = eJoinCapabilities.ToFusion, JoinType = eJoinType.Serial });
|
||||||
|
|
||||||
|
[JoinName("ProgramNameStart")]
|
||||||
|
public JoinDataComplete ProgramNameStart = new JoinDataComplete(new JoinData { JoinNumber = 62, JoinSpan = 10 },
|
||||||
|
new JoinMetadata { Description = "Program Names", JoinCapabilities = eJoinCapabilities.ToFusion, JoinType = eJoinType.Serial });
|
||||||
|
|
||||||
|
[JoinName("ProcessorReboot")]
|
||||||
|
public JoinDataComplete ProcessorReboot = new JoinDataComplete(new JoinData { JoinNumber = 74, JoinSpan = 1 },
|
||||||
|
new JoinMetadata { Description = "Processor Reboot", JoinCapabilities = eJoinCapabilities.FromFusion, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
|
|
||||||
|
// Source Attributes
|
||||||
|
[JoinName("CurrentRoomSourceName")]
|
||||||
|
public JoinDataComplete CurrentRoomSourceName = new JoinDataComplete(new JoinData { JoinNumber = 84, JoinSpan = 1 },
|
||||||
|
new JoinMetadata { Description = "Current Room Source Name", JoinCapabilities = eJoinCapabilities.ToFusion, JoinType = eJoinType.Serial });
|
||||||
|
|
||||||
|
[JoinName("TouchpanelOnlineStart")]
|
||||||
|
public JoinDataComplete TouchpanelOnlineStart = new JoinDataComplete(new JoinData { JoinNumber = 150, JoinSpan = 10 },
|
||||||
|
new JoinMetadata { Description = "Touchpanel Online Start", JoinCapabilities = eJoinCapabilities.ToFusion, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
|
[JoinName("XpanelOnlineStart")]
|
||||||
|
public JoinDataComplete XpanelOnlineStart = new JoinDataComplete(new JoinData { JoinNumber = 160, JoinSpan = 10 },
|
||||||
|
new JoinMetadata { Description = "Xpanel Online Start", JoinCapabilities = eJoinCapabilities.ToFusion, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
|
[JoinName("DisplayOnlineStart")]
|
||||||
|
public JoinDataComplete DisplayOnlineStart = new JoinDataComplete(new JoinData { JoinNumber = 170, JoinSpan = 10 },
|
||||||
|
new JoinMetadata { Description = "Display Online Start", JoinCapabilities = eJoinCapabilities.ToFusion, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
|
[JoinName("Display1LaptopSourceStart")]
|
||||||
|
public JoinDataComplete Display1LaptopSourceStart = new JoinDataComplete(new JoinData { JoinNumber = 166, JoinSpan = 10 },
|
||||||
|
new JoinMetadata { Description = "Display 1 - Source Laptop Start", JoinCapabilities = eJoinCapabilities.ToFromFusion, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
|
[JoinName("Display1DiscPlayerSourceStart")]
|
||||||
|
public JoinDataComplete Display1DiscPlayerSourceStart = new JoinDataComplete(new JoinData { JoinNumber = 181, JoinSpan = 5 },
|
||||||
|
new JoinMetadata { Description = "Display 1 - Source Disc Player Start", JoinCapabilities = eJoinCapabilities.ToFromFusion, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
|
[JoinName("Display1SetTopBoxSourceStart")]
|
||||||
|
public JoinDataComplete Display1SetTopBoxSourceStart = new JoinDataComplete(new JoinData { JoinNumber = 188, JoinSpan = 5 },
|
||||||
|
new JoinMetadata { Description = "Display 1 - Source TV Start", JoinCapabilities = eJoinCapabilities.ToFromFusion, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructor to use when instantiating this Join Map without inheriting from it
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="joinStart">Join this join map will start at</param>
|
||||||
|
public FusionRoomJoinMap(uint joinStart)
|
||||||
|
: base(joinStart, typeof(FusionRoomJoinMap))
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructor to use when extending this Join map
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="joinStart">Join this join map will start at</param>
|
||||||
|
/// <param name="type">Type of the child join map</param>
|
||||||
|
public FusionRoomJoinMap(uint joinStart, Type type) : base(joinStart, type)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -327,7 +327,10 @@ namespace PepperDash.Essentials.Core
|
|||||||
None = 0,
|
None = 0,
|
||||||
ToSIMPL = 1,
|
ToSIMPL = 1,
|
||||||
FromSIMPL = 2,
|
FromSIMPL = 2,
|
||||||
ToFromSIMPL = ToSIMPL | FromSIMPL
|
ToFromSIMPL = ToSIMPL | FromSIMPL,
|
||||||
|
ToFusion = 4,
|
||||||
|
FromFusion = 8,
|
||||||
|
ToFromFusion = ToFusion | FromFusion,
|
||||||
}
|
}
|
||||||
|
|
||||||
[Flags]
|
[Flags]
|
||||||
@@ -340,7 +343,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
DigitalAnalog = Digital | Analog,
|
DigitalAnalog = Digital | Analog,
|
||||||
DigitalSerial = Digital | Serial,
|
DigitalSerial = Digital | Serial,
|
||||||
AnalogSerial = Analog | Serial,
|
AnalogSerial = Analog | Serial,
|
||||||
DigitalAnalogSerial = Digital | Analog | Serial
|
DigitalAnalogSerial = Digital | Analog | Serial,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -220,6 +220,7 @@
|
|||||||
<Compile Include="Fusion\FusionCustomPropertiesBridge.cs" />
|
<Compile Include="Fusion\FusionCustomPropertiesBridge.cs" />
|
||||||
<Compile Include="Fusion\FusionEventHandlers.cs" />
|
<Compile Include="Fusion\FusionEventHandlers.cs" />
|
||||||
<Compile Include="Fusion\FusionProcessorQueries.cs" />
|
<Compile Include="Fusion\FusionProcessorQueries.cs" />
|
||||||
|
<Compile Include="Fusion\FusionRoomJoinMap.cs" />
|
||||||
<Compile Include="Fusion\FusionRviDataClasses.cs" />
|
<Compile Include="Fusion\FusionRviDataClasses.cs" />
|
||||||
<Compile Include="Gateways\CenRfgwController.cs" />
|
<Compile Include="Gateways\CenRfgwController.cs" />
|
||||||
<Compile Include="Gateways\EssentialsRfGatewayConfig.cs" />
|
<Compile Include="Gateways\EssentialsRfGatewayConfig.cs" />
|
||||||
|
|||||||
Reference in New Issue
Block a user