diff --git a/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/IPower.cs b/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/IPower.cs
index c8750610..863e138d 100644
--- a/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/IPower.cs
+++ b/Essentials Core/PepperDashEssentialsBase/DeviceTypeInterfaces/IPower.cs
@@ -1,46 +1,68 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Crestron.SimplSharp;
-using Crestron.SimplSharpPro;
-using Crestron.SimplSharpPro.DeviceSupport;
-
-using PepperDash.Essentials.Core;
-using PepperDash.Essentials.Core.SmartObjects;
-
-namespace PepperDash.Essentials.Core
-{
- ///
- ///
- ///
- public interface IPower
- {
- void PowerOn();
- void PowerOff();
- void PowerToggle();
- BoolFeedback PowerIsOnFeedback { get; }
- }
-
- ///
- ///
- ///
- public static class IPowerExtensions
- {
- public static void LinkButtons(this IPower dev, BasicTriList triList)
- {
- triList.SetSigFalseAction(101, dev.PowerOn);
- triList.SetSigFalseAction(102, dev.PowerOff);
- triList.SetSigFalseAction(103, dev.PowerToggle);
- dev.PowerIsOnFeedback.LinkInputSig(triList.BooleanInput[101]);
- }
-
- public static void UnlinkButtons(this IPower dev, BasicTriList triList)
- {
- triList.ClearBoolSigAction(101);
- triList.ClearBoolSigAction(102);
- triList.ClearBoolSigAction(103);
- dev.PowerIsOnFeedback.UnlinkInputSig(triList.BooleanInput[101]);
- }
- }
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Crestron.SimplSharp;
+using Crestron.SimplSharpPro;
+using Crestron.SimplSharpPro.DeviceSupport;
+using Crestron.SimplSharpPro.Fusion;
+
+using PepperDash.Essentials.Core;
+using PepperDash.Essentials.Core.SmartObjects;
+
+
+namespace PepperDash.Essentials.Core
+{
+ ///
+ ///
+ ///
+ public interface IPower
+ {
+ void PowerOn();
+ void PowerOff();
+ void PowerToggle();
+ BoolFeedback PowerIsOnFeedback { get; }
+ }
+
+ ///
+ ///
+ ///
+ public static class IPowerExtensions
+ {
+ public static void LinkButtons(this IPower dev, BasicTriList triList)
+ {
+ triList.SetSigFalseAction(101, dev.PowerOn);
+ triList.SetSigFalseAction(102, dev.PowerOff);
+ triList.SetSigFalseAction(103, dev.PowerToggle);
+ dev.PowerIsOnFeedback.LinkInputSig(triList.BooleanInput[101]);
+ }
+
+ public static void UnlinkButtons(this IPower dev, BasicTriList triList)
+ {
+ triList.ClearBoolSigAction(101);
+ triList.ClearBoolSigAction(102);
+ triList.ClearBoolSigAction(103);
+ dev.PowerIsOnFeedback.UnlinkInputSig(triList.BooleanInput[101]);
+ }
+ }
+/*
+ public static class IFusionPowerExtensions
+ {
+ public static void LinkAttributes(this IPower dev, FusionRoom room)
+ {
+ dev.PowerIsOnFeedback.LinkInputSig(room.DisplayPowerOn.InputSig);
+
+ room.DisplayPowerOn.OutputSig.SetSigFalseAction(dev.PowerOn);
+ room.DisplayPowerOff.OutputSig.SetSigFalseAction(dev.PowerOff);
+ }
+
+ public static void UnlinkAttributes(this IPower dev, FusionRoom room)
+ {
+ dev.PowerIsOnFeedback.UnlinkInputSig(room.DisplayPowerOn.InputSig);
+
+ room.DisplayPowerOn.OutputSig.SetSigFalseAction(null);
+ room.DisplayPowerOff.OutputSig.SetSigFalseAction(null);
+ }
+ }
+*/
}
\ No newline at end of file
diff --git a/Essentials Core/PepperDashEssentialsBase/Devices/IHasFeedbacks.cs b/Essentials Core/PepperDashEssentialsBase/Devices/IHasFeedbacks.cs
index 446577f6..8ccffa8d 100644
--- a/Essentials Core/PepperDashEssentialsBase/Devices/IHasFeedbacks.cs
+++ b/Essentials Core/PepperDashEssentialsBase/Devices/IHasFeedbacks.cs
@@ -1,63 +1,68 @@
-using System.Collections.Generic;
-using System.Linq;
-using Crestron.SimplSharpPro.DeviceSupport;
-
-using PepperDash.Core;
-
-namespace PepperDash.Essentials.Core
-{
- public interface IHasFeedback : IKeyed
- {
- ///
- /// This method shall return a list of all Output objects on a device,
- /// including all "aggregate" devices.
- ///
- List Feedbacks { get; }
-
- }
-
-
- public static class IHasFeedbackExtensions
- {
- public static void DumpFeedbacksToConsole(this IHasFeedback source, bool getCurrentStates)
- {
- var feedbacks = source.Feedbacks.OrderBy(x => x.Type);
- if (feedbacks != null)
- {
- Debug.Console(0, source, "\n\nAvailable feedbacks:");
- foreach (var f in feedbacks)
- {
- string val = "";
- if (getCurrentStates)
- {
- if (f is BoolFeedback)
- val = " = " + f.BoolValue;
- else if(f is IntFeedback)
- val = " = " + f.IntValue;
- else if(f is StringFeedback)
- val = " = " + f.StringValue;
-
- //switch (f.Type)
- //{
- // case eCueType.Bool:
- // val = " = " + f.BoolValue;
- // break;
- // case eCueType.Int:
- // val = " = " + f.IntValue;
- // break;
- // case eCueType.String:
- // val = " = " + f.StringValue;
- // break;
- // //case eOutputType.Other:
- // // break;
- //}
- }
- Debug.Console(0, "{0,-8} {1}{2}", f.GetType(),
- (string.IsNullOrEmpty(f.Cue.Name) ? "-none-" : f.Cue.Name), val);
- }
- }
- else
- Debug.Console(0, source, "No available outputs:");
- }
- }
+using System.Collections.Generic;
+using System.Linq;
+using Crestron.SimplSharpPro.DeviceSupport;
+
+using PepperDash.Core;
+
+namespace PepperDash.Essentials.Core
+{
+ public interface IHasFeedback : IKeyed
+ {
+ ///
+ /// This method shall return a list of all Output objects on a device,
+ /// including all "aggregate" devices.
+ ///
+ List Feedbacks { get; }
+
+ }
+
+
+ public static class IHasFeedbackExtensions
+ {
+ public static void DumpFeedbacksToConsole(this IHasFeedback source, bool getCurrentStates)
+ {
+ var feedbacks = source.Feedbacks.OrderBy(x => x.Type);
+ if (feedbacks != null)
+ {
+ Debug.Console(0, source, "\n\nAvailable feedbacks:");
+ foreach (var f in feedbacks)
+ {
+ string val = "";
+ if (getCurrentStates)
+ {
+ if (f is BoolFeedback)
+ val = " = " + f.BoolValue;
+ else if(f is IntFeedback)
+ val = " = " + f.IntValue;
+ else if(f is StringFeedback)
+ val = " = " + f.StringValue;
+
+ //switch (f.Type)
+ //{
+ // case eCueType.Bool:
+ // val = " = " + f.BoolValue;
+ // break;
+ // case eCueType.Int:
+ // val = " = " + f.IntValue;
+ // break;
+ // case eCueType.String:
+ // val = " = " + f.StringValue;
+ // break;
+ // //case eOutputType.Other:
+ // // break;
+ //}
+ }
+ Debug.Console(0, "{0,-8} {1}{2}", f.GetType(),
+ (string.IsNullOrEmpty(f.Cue.Name) ? "-none-" : f.Cue.Name), val);
+ }
+ }
+ else
+ Debug.Console(0, source, "No available outputs:");
+ }
+ }
+
+ public static class IHasFeedbackFusionExtensions
+ {
+
+ }
}
\ No newline at end of file
diff --git a/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj b/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj
index 684cfafd..47d70573 100644
--- a/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj
+++ b/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj
@@ -58,6 +58,10 @@
False
..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.EthernetCommunications.dll
+
+ False
+ ..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Fusion.dll
+
False
..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Remotes.dll
diff --git a/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.projectinfo b/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.projectinfo
index 5732d214..8f2921c8 100644
Binary files a/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.projectinfo and b/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.projectinfo differ
diff --git a/Essentials DM/Essentials_DM/Essentials_DM.projectinfo b/Essentials DM/Essentials_DM/Essentials_DM.projectinfo
index ee60b69e..bbe91f60 100644
Binary files a/Essentials DM/Essentials_DM/Essentials_DM.projectinfo and b/Essentials DM/Essentials_DM/Essentials_DM.projectinfo differ
diff --git a/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.projectinfo b/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.projectinfo
index ef956e6d..40c03dba 100644
Binary files a/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.projectinfo and b/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.projectinfo differ
diff --git a/Essentials/PepperDashEssentials/ControlSystem.cs b/Essentials/PepperDashEssentials/ControlSystem.cs
index 6cba22e5..70844526 100644
--- a/Essentials/PepperDashEssentials/ControlSystem.cs
+++ b/Essentials/PepperDashEssentials/ControlSystem.cs
@@ -62,11 +62,6 @@ namespace PepperDash.Essentials
LoadDevices();
LoadTieLines();
LoadRooms();
- // FUSION - should go per room I believe. See CreateSystems in original Configuration.cs
- // ???
-
- //Temp Cotija testing
- //CotijaSystemController CotijaInterface = new CotijaSystemController("WebClient1");
DeviceManager.ActivateAll();
Debug.Console(0, "Essentials load complete\r" +
diff --git a/Essentials/PepperDashEssentials/Fusion/FusionRviDataClasses.cs b/Essentials/PepperDashEssentials/Fusion/FusionRviDataClasses.cs
new file mode 100644
index 00000000..eaaff2f5
--- /dev/null
+++ b/Essentials/PepperDashEssentials/Fusion/FusionRviDataClasses.cs
@@ -0,0 +1,391 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Crestron.SimplSharp;
+
+namespace PepperDash.Essentials.Fusion
+{
+ // Helper Classes for GUIDs
+
+ ///
+ /// Stores GUIDs to be written to a file in NVRAM
+ ///
+ public class FusionRoomGuids
+ {
+ public string RoomName { get; set; }
+ public uint IpId { get; set; }
+ public string RoomGuid { get; set; }
+ public List StaticAssets { get; set; }
+
+ public FusionRoomGuids()
+ {
+ StaticAssets = new List();
+ }
+
+ public FusionRoomGuids(string roomName, uint ipId, string roomGuid, List staticAssets)
+ {
+ RoomName = roomName;
+ IpId = ipId;
+ RoomGuid = roomGuid;
+
+ StaticAssets = new List(staticAssets);
+ }
+ }
+
+ public class StaticAsset
+ {
+ public uint Number { get; set; }
+ public string Name { get; set; }
+ public string Type { get; set; }
+ public string InstanceID { get; set; }
+
+ public StaticAsset()
+ {
+
+ }
+
+ public StaticAsset(uint slotNum, string assetName, string type, string instanceID)
+ {
+ Number = slotNum;
+ Name = assetName;
+ Type = type;
+ if (string.IsNullOrEmpty(instanceID))
+ {
+ InstanceID = Guid.NewGuid().ToString();
+ }
+ else
+ {
+ InstanceID = instanceID;
+ }
+ }
+ }
+
+ //***************************************************************************************************
+
+ public class RoomSchedule
+ {
+ public List Meetings { get; set; }
+
+ public RoomSchedule()
+ {
+ Meetings = new List();
+ }
+ }
+
+ //****************************************************************************************************
+ // Helper Classes for XML API
+
+ ///
+ /// All the data needed for a full schedule request in a room
+ ///
+ /// //[XmlRoot(ElementName = "RequestSchedule")]
+ public class RequestSchedule
+ {
+ //[XmlElement(ElementName = "RequestID")]
+ public string RequestID { get; set; }
+ //[XmlElement(ElementName = "RoomID")]
+ public string RoomID { get; set; }
+ //[XmlElement(ElementName = "Start")]
+ public DateTime Start { get; set; }
+ //[XmlElement(ElementName = "HourSpan")]
+ public double HourSpan { get; set; }
+
+ public RequestSchedule(string requestID, string roomID)
+ {
+ RequestID = requestID;
+ RoomID = roomID;
+ Start = DateTime.Now;
+ HourSpan = 24;
+ }
+ }
+
+
+ //[XmlRoot(ElementName = "RequestAction")]
+ public class RequestAction
+ {
+ //[XmlElement(ElementName = "RequestID")]
+ public string RequestID { get; set; }
+ //[XmlElement(ElementName = "RoomID")]
+ public string RoomID { get; set; }
+ //[XmlElement(ElementName = "ActionID")]
+ public string ActionID { get; set; }
+ //[XmlElement(ElementName = "Parameters")]
+ public List Parameters { get; set; }
+
+ public RequestAction(string roomID, string actionID, List parameters)
+ {
+ RoomID = roomID;
+ ActionID = actionID;
+ Parameters = parameters;
+ }
+ }
+
+ //[XmlRoot(ElementName = "ActionResponse")]
+ public class ActionResponse
+ {
+ //[XmlElement(ElementName = "RequestID")]
+ public string RequestID { get; set; }
+ //[XmlElement(ElementName = "ActionID")]
+ public string ActionID { get; set; }
+ //[XmlElement(ElementName = "Parameters")]
+ public List Parameters { get; set; }
+ }
+
+ //[XmlRoot(ElementName = "Parameter")]
+ public class Parameter
+ {
+ //[XmlAttribute(AttributeName = "ID")]
+ public string ID { get; set; }
+ //[XmlAttribute(AttributeName = "Value")]
+ public string Value { get; set; }
+ }
+
+ ////[XmlRoot(ElementName = "Parameters")]
+ //public class Parameters
+ //{
+ // //[XmlElement(ElementName = "Parameter")]
+ // public List Parameter { get; set; }
+ //}
+
+ ///
+ /// Data structure for a ScheduleResponse from Fusion
+ ///
+ /// //[XmlRoot(ElementName = "ScheduleResponse")]
+ public class ScheduleResponse
+ {
+ //[XmlElement(ElementName = "RequestID")]
+ public string RequestID { get; set; }
+ //[XmlElement(ElementName = "RoomID")]
+ public string RoomID { get; set; }
+ //[XmlElement(ElementName = "RoomName")]
+ public string RoomName { get; set; }
+ //[XmlElement("Event")]
+ public List Events { get; set; }
+
+ public ScheduleResponse()
+ {
+ Events = new List();
+ }
+ }
+
+ //[XmlRoot(ElementName = "Event")]
+ public class Event
+ {
+ //[XmlElement(ElementName = "MeetingID")]
+ public string MeetingID { get; set; }
+ //[XmlElement(ElementName = "RVMeetingID")]
+ public string RVMeetingID { get; set; }
+ //[XmlElement(ElementName = "Recurring")]
+ public string Recurring { get; set; }
+ //[XmlElement(ElementName = "InstanceID")]
+ public string InstanceID { get; set; }
+ //[XmlElement(ElementName = "dtStart")]
+ public DateTime dtStart { get; set; }
+ //[XmlElement(ElementName = "dtEnd")]
+ public DateTime dtEnd { get; set; }
+ //[XmlElement(ElementName = "Organizer")]
+ public string Organizer { get; set; }
+ //[XmlElement(ElementName = "Attendees")]
+ public Attendees Attendees { get; set; }
+ //[XmlElement(ElementName = "Resources")]
+ public Resources Resources { get; set; }
+ //[XmlElement(ElementName = "IsEvent")]
+ public string IsEvent { get; set; }
+ //[XmlElement(ElementName = "IsRoomViewMeeting")]
+ public string IsRoomViewMeeting { get; set; }
+ //[XmlElement(ElementName = "IsPrivate")]
+ public string IsPrivate { get; set; }
+ //[XmlElement(ElementName = "IsExchangePrivate")]
+ public string IsExchangePrivate { get; set; }
+ //[XmlElement(ElementName = "MeetingTypes")]
+ public MeetingTypes MeetingTypes { get; set; }
+ //[XmlElement(ElementName = "ParticipantCode")]
+ public string ParticipantCode { get; set; }
+ //[XmlElement(ElementName = "PhoneNo")]
+ public string PhoneNo { get; set; }
+ //[XmlElement(ElementName = "WelcomeMsg")]
+ public string WelcomeMsg { get; set; }
+ //[XmlElement(ElementName = "Subject")]
+ public string Subject { get; set; }
+ //[XmlElement(ElementName = "LiveMeeting")]
+ public LiveMeeting LiveMeeting { get; set; }
+ //[XmlElement(ElementName = "ShareDocPath")]
+ public string ShareDocPath { get; set; }
+ //[XmlElement(ElementName = "HaveAttendees")]
+ public string HaveAttendees { get; set; }
+ //[XmlElement(ElementName = "HaveResources")]
+ public string HaveResources { get; set; }
+
+ ///
+ /// Gets the duration of the meeting
+ ///
+ public string DurationInMinutes
+ {
+ get
+ {
+ string duration;
+
+ var timeSpan = dtEnd.Subtract(dtStart);
+ int hours = timeSpan.Hours;
+ double minutes = timeSpan.Minutes;
+ double roundedMinutes = Math.Round(minutes);
+ if (hours > 0)
+ {
+ duration = string.Format("{0} hours {1} minutes", hours, roundedMinutes);
+ }
+ else
+ {
+ duration = string.Format("{0} minutes", roundedMinutes);
+ }
+
+ return duration;
+ }
+ }
+
+ ///
+ /// Gets the remaining time in the meeting. Returns null if the meeting is not currently in progress.
+ ///
+ public string RemainingTime
+ {
+ get
+ {
+ var now = DateTime.Now;
+
+ string remainingTime;
+
+ if (GetInProgress())
+ {
+ var timeSpan = dtEnd.Subtract(now);
+ int hours = timeSpan.Hours;
+ double minutes = timeSpan.Minutes;
+ double roundedMinutes = Math.Round(minutes);
+ if (hours > 0)
+ {
+ remainingTime = string.Format("{0} hours {1} minutes", hours, roundedMinutes);
+ }
+ else
+ {
+ remainingTime = string.Format("{0} minutes", roundedMinutes);
+ }
+
+ return remainingTime;
+ }
+ else
+ return null;
+ }
+
+ }
+
+ ///
+ /// Indicates that the meeting is in progress
+ ///
+ public bool isInProgress
+ {
+ get
+ {
+ return GetInProgress();
+ }
+ }
+
+ ///
+ /// Determines if the meeting is in progress
+ ///
+ /// Returns true if in progress
+ bool GetInProgress()
+ {
+ var now = DateTime.Now;
+
+ if (now > dtStart && now < dtEnd)
+ {
+ return true;
+ }
+ else
+ return false;
+ }
+ }
+
+ //[XmlRoot(ElementName = "Resources")]
+ public class Resources
+ {
+ //[XmlElement(ElementName = "Rooms")]
+ public Rooms Rooms { get; set; }
+ }
+
+ //[XmlRoot(ElementName = "Rooms")]
+ public class Rooms
+ {
+ //[XmlElement(ElementName = "Room")]
+ public List Room { get; set; }
+ }
+
+ //[XmlRoot(ElementName = "Room")]
+ public class Room
+ {
+ //[XmlElement(ElementName = "Name")]
+ public string Name { get; set; }
+ //[XmlElement(ElementName = "ID")]
+ public string ID { get; set; }
+ //[XmlElement(ElementName = "MPType")]
+ public string MPType { get; set; }
+ }
+
+ //[XmlRoot(ElementName = "Attendees")]
+ public class Attendees
+ {
+ //[XmlElement(ElementName = "Required")]
+ public Required Required { get; set; }
+ //[XmlElement(ElementName = "Optional")]
+ public Optional Optional { get; set; }
+ }
+
+ //[XmlRoot(ElementName = "Required")]
+ public class Required
+ {
+ //[XmlElement(ElementName = "Attendee")]
+ public List Attendee { get; set; }
+ }
+
+ //[XmlRoot(ElementName = "Optional")]
+ public class Optional
+ {
+ //[XmlElement(ElementName = "Attendee")]
+ public List Attendee { get; set; }
+ }
+
+ //[XmlRoot(ElementName = "MeetingType")]
+ public class MeetingType
+ {
+ //[XmlAttribute(AttributeName = "ID")]
+ public string ID { get; set; }
+ //[XmlAttribute(AttributeName = "Value")]
+ public string Value { get; set; }
+ }
+
+ //[XmlRoot(ElementName = "MeetingTypes")]
+ public class MeetingTypes
+ {
+ //[XmlElement(ElementName = "MeetingType")]
+ public List MeetingType { get; set; }
+ }
+
+ //[XmlRoot(ElementName = "LiveMeeting")]
+ public class LiveMeeting
+ {
+ //[XmlElement(ElementName = "URL")]
+ public string URL { get; set; }
+ //[XmlElement(ElementName = "ID")]
+ public string ID { get; set; }
+ //[XmlElement(ElementName = "Key")]
+ public string Key { get; set; }
+ //[XmlElement(ElementName = "Subject")]
+ public string Subject { get; set; }
+ }
+
+ //[XmlRoot(ElementName = "LiveMeetingURL")]
+ public class LiveMeetingURL
+ {
+ //[XmlElement(ElementName = "LiveMeeting")]
+ public LiveMeeting LiveMeeting { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Essentials/PepperDashEssentials/Fusion/FusionSystemController.cs b/Essentials/PepperDashEssentials/Fusion/FusionSystemController.cs
index 03f41cb3..4ebccb2d 100644
--- a/Essentials/PepperDashEssentials/Fusion/FusionSystemController.cs
+++ b/Essentials/PepperDashEssentials/Fusion/FusionSystemController.cs
@@ -39,6 +39,21 @@ namespace PepperDash.Essentials.Fusion
StringSigData SourceNameSig;
+ //ProcessorEthernet Info
+#region
+ StringSigData Ip1;
+ StringSigData Ip2;
+ StringSigData Gateway;
+ StringSigData Hostname;
+ StringSigData Domain;
+ StringSigData Dns1;
+ StringSigData Dns2;
+ StringSigData Mac1;
+ StringSigData Mac2;
+ StringSigData NetMask1;
+ StringSigData NetMask2;
+#endregion
+
RoomSchedule CurrentSchedule;
Event NextMeeting;
@@ -270,7 +285,7 @@ namespace PepperDash.Essentials.Fusion
// Room to fusion room
Room.OnFeedback.LinkInputSig(FusionRoom.SystemPowerOn.InputSig);
- SourceNameSig = FusionRoom.CreateOffsetStringSig(50, "Source - Name", eSigIoMask.InputSigOnly);
+ SourceNameSig = FusionRoom.CreateOffsetStringSig(84, "Source - Name", eSigIoMask.InputSigOnly);
// Don't think we need to get current status of this as nothing should be alive yet.
Room.CurrentSingleSourceChange += new SourceInfoChangeHandler(Room_CurrentSourceInfoChange);
@@ -281,8 +296,54 @@ namespace PepperDash.Essentials.Fusion
FusionRoom.ErrorMessage.InputSig.StringValue =
"3: 7 Errors: This is a really long error message;This is a really long error message;This is a really long error message;This is a really long error message;This is a really long error message;This is a really long error message;This is a really long error message;";
+ // Processor Info
- }
+ FusionRoom.CreateOffsetStringSig(50, "Info - Processor - System Name", eSigIoMask.InputSigOnly);
+ FusionRoom.CreateOffsetStringSig(51, "Info - Processor - Model", eSigIoMask.InputSigOnly);
+ FusionRoom.CreateOffsetStringSig(52, "Info - Processor - Serial Number", eSigIoMask.InputSigOnly);
+ FusionRoom.CreateOffsetStringSig(53, "Info - Processor - Uptime", eSigIoMask.InputSigOnly);
+ Ip1 = FusionRoom.CreateOffsetStringSig(54, "Info - Processor - IP 1", eSigIoMask.InputSigOnly);
+ Ip2 = FusionRoom.CreateOffsetStringSig(55, "Info - Processor - IP 2", eSigIoMask.InputSigOnly);
+ Gateway = FusionRoom.CreateOffsetStringSig(56, "Info - Processor - Gateway", eSigIoMask.InputSigOnly);
+ Hostname = FusionRoom.CreateOffsetStringSig(57, "Info - Processor - Hostname", eSigIoMask.InputSigOnly);
+ Domain = FusionRoom.CreateOffsetStringSig(58, "Info - Processor - Domain", eSigIoMask.InputSigOnly);
+ Dns1 = FusionRoom.CreateOffsetStringSig(59, "Info - Processor - DNS 1", eSigIoMask.InputSigOnly);
+ Dns2 = FusionRoom.CreateOffsetStringSig(60, "Info - Processor - DNS 2", eSigIoMask.InputSigOnly);
+ Mac1 = FusionRoom.CreateOffsetStringSig(61, "Info - Processor - MAC 1", eSigIoMask.InputSigOnly);
+ Mac2 = FusionRoom.CreateOffsetStringSig(62, "Info - Processor - MAC 2", eSigIoMask.InputSigOnly);
+ NetMask1 = FusionRoom.CreateOffsetStringSig(63, "Info - Processor - Net Mask 1", eSigIoMask.InputSigOnly);
+ NetMask2 = FusionRoom.CreateOffsetStringSig(64, "Info - Processor - Net Mask 2", eSigIoMask.InputSigOnly);
+
+
+ CrestronEnvironment.EthernetEventHandler += new EthernetEventHandler(CrestronEnvironment_EthernetEventHandler);
+ }
+
+ void CrestronEnvironment_EthernetEventHandler(EthernetEventArgs ethernetEventArgs)
+ {
+ if (ethernetEventArgs.EthernetEventType == eEthernetEventType.LinkUp)
+ {
+ SetProcessorEthernetValues();
+ }
+ }
+
+ void SetProcessorEthernetValues()
+ {
+ Ip1.InputSig.StringValue = CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 0);
+ Ip2.InputSig.StringValue = CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 1);
+ Gateway.InputSig.StringValue = CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_ROUTER, 0);
+ Hostname.InputSig.StringValue = CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_HOSTNAME, 0);
+ Domain.InputSig.StringValue = CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_DOMAIN_NAME, 0);
+
+ var dnsServers = CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_DNS_SERVER, 0).Split(',');
+ Dns1.InputSig.StringValue = dnsServers[0];
+ if (dnsServers.Length > 1)
+ Dns2.InputSig.StringValue = dnsServers[1];
+
+ Mac1.InputSig.StringValue = CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_MAC_ADDRESS, 0);
+ Mac2.InputSig.StringValue = CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_MAC_ADDRESS, 1);
+ NetMask1.InputSig.StringValue = CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_MASK, 0);
+ NetMask2.InputSig.StringValue = CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_MASK, 1);
+ }
void FusionRoom_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args)
{
@@ -306,7 +367,6 @@ namespace PepperDash.Essentials.Fusion
"\n" +
"\n" +
"\n" +
- //"\n" +
"\n" +
"\n" +
"\n" +
@@ -777,22 +837,35 @@ namespace PepperDash.Essentials.Fusion
string attrName = null;
uint attrNum = Convert.ToUInt32(keyNum);
- //if (dev is SmartGraphicsTouchpanelControllerBase)
- //{
- // if (attrNum > 10)
- // continue;
- // attrName = "Device Ok - Touch Panel " + attrNum;
- // attrNum += 200;
- //}
- //// add xpanel here
+
+
+ if (dev is BasicTriListWithSmartObject)
+ {
+ if (attrNum > 10)
+ continue;
+ attrName = "Online - Touch Panel " + attrNum;
+ attrNum += 200;
+#warning should this be 150
+ }
+ // add xpanel here
+
+ if (dev is Crestron.SimplSharpPro.UI.XpanelForSmartGraphics)
+ {
+ if (attrNum > 10)
+ continue;
+ attrName = "Online - Touch Panel " + attrNum;
+ attrNum += 160;
+#warning should this be 160
+ }
//else
if (dev is DisplayBase)
{
if (attrNum > 10)
continue;
- attrName = "Device Ok - Display " + attrNum;
+ attrName = "Online - Display " + attrNum;
attrNum += 240;
+#warning should this be 170
}
//else if (dev is DvdDeviceBase)
//{
@@ -1063,386 +1136,5 @@ namespace PepperDash.Essentials.Fusion
}
}
- // Helper Classes for GUIDs
-
- ///
- /// Stores GUIDs to be written to a file in NVRAM
- ///
- public class FusionRoomGuids
- {
- public string RoomName { get; set; }
- public uint IpId { get; set; }
- public string RoomGuid { get; set; }
- public List StaticAssets { get; set; }
-
- public FusionRoomGuids()
- {
- StaticAssets = new List();
- }
-
- public FusionRoomGuids(string roomName, uint ipId, string roomGuid, List staticAssets)
- {
- RoomName = roomName;
- IpId = ipId;
- RoomGuid = roomGuid;
-
- StaticAssets = new List(staticAssets);
- }
- }
-
- public class StaticAsset
- {
- public uint Number { get; set; }
- public string Name { get; set; }
- public string Type { get; set; }
- public string InstanceID { get; set; }
-
- public StaticAsset()
- {
-
- }
-
- public StaticAsset(uint slotNum, string assetName, string type, string instanceID)
- {
- Number = slotNum;
- Name = assetName;
- Type = type;
- if(string.IsNullOrEmpty(instanceID))
- {
- InstanceID = Guid.NewGuid().ToString();
- }
- else
- {
- InstanceID = instanceID;
- }
- }
- }
-
- //***************************************************************************************************
-
- public class RoomSchedule
- {
- public List Meetings { get; set; }
-
- public RoomSchedule()
- {
- Meetings = new List();
- }
- }
-
- //****************************************************************************************************
- // Helper Classes for XML API
-
- ///
- /// All the data needed for a full schedule request in a room
- ///
- /// //[XmlRoot(ElementName = "RequestSchedule")]
- public class RequestSchedule
- {
- //[XmlElement(ElementName = "RequestID")]
- public string RequestID { get; set; }
- //[XmlElement(ElementName = "RoomID")]
- public string RoomID { get; set; }
- //[XmlElement(ElementName = "Start")]
- public DateTime Start { get; set; }
- //[XmlElement(ElementName = "HourSpan")]
- public double HourSpan { get; set; }
-
- public RequestSchedule(string requestID, string roomID)
- {
- RequestID = requestID;
- RoomID = roomID;
- Start = DateTime.Now;
- HourSpan = 24;
- }
- }
-
-
- //[XmlRoot(ElementName = "RequestAction")]
- public class RequestAction
- {
- //[XmlElement(ElementName = "RequestID")]
- public string RequestID { get; set; }
- //[XmlElement(ElementName = "RoomID")]
- public string RoomID { get; set; }
- //[XmlElement(ElementName = "ActionID")]
- public string ActionID { get; set; }
- //[XmlElement(ElementName = "Parameters")]
- public List Parameters { get; set; }
-
- public RequestAction(string roomID, string actionID, List parameters)
- {
- RoomID = roomID;
- ActionID = actionID;
- Parameters = parameters;
- }
- }
-
- //[XmlRoot(ElementName = "ActionResponse")]
- public class ActionResponse
- {
- //[XmlElement(ElementName = "RequestID")]
- public string RequestID { get; set; }
- //[XmlElement(ElementName = "ActionID")]
- public string ActionID { get; set; }
- //[XmlElement(ElementName = "Parameters")]
- public List Parameters { get; set; }
- }
-
- //[XmlRoot(ElementName = "Parameter")]
- public class Parameter
- {
- //[XmlAttribute(AttributeName = "ID")]
- public string ID { get; set; }
- //[XmlAttribute(AttributeName = "Value")]
- public string Value { get; set; }
- }
-
- ////[XmlRoot(ElementName = "Parameters")]
- //public class Parameters
- //{
- // //[XmlElement(ElementName = "Parameter")]
- // public List Parameter { get; set; }
- //}
-
- ///
- /// Data structure for a ScheduleResponse from Fusion
- ///
- /// //[XmlRoot(ElementName = "ScheduleResponse")]
- public class ScheduleResponse
- {
- //[XmlElement(ElementName = "RequestID")]
- public string RequestID { get; set; }
- //[XmlElement(ElementName = "RoomID")]
- public string RoomID { get; set; }
- //[XmlElement(ElementName = "RoomName")]
- public string RoomName { get; set; }
- //[XmlElement("Event")]
- public List Events { get; set; }
-
- public ScheduleResponse()
- {
- Events = new List();
- }
- }
-
- //[XmlRoot(ElementName = "Event")]
- public class Event
- {
- //[XmlElement(ElementName = "MeetingID")]
- public string MeetingID { get; set; }
- //[XmlElement(ElementName = "RVMeetingID")]
- public string RVMeetingID { get; set; }
- //[XmlElement(ElementName = "Recurring")]
- public string Recurring { get; set; }
- //[XmlElement(ElementName = "InstanceID")]
- public string InstanceID { get; set; }
- //[XmlElement(ElementName = "dtStart")]
- public DateTime dtStart { get; set; }
- //[XmlElement(ElementName = "dtEnd")]
- public DateTime dtEnd { get; set; }
- //[XmlElement(ElementName = "Organizer")]
- public string Organizer { get; set; }
- //[XmlElement(ElementName = "Attendees")]
- public Attendees Attendees { get; set; }
- //[XmlElement(ElementName = "Resources")]
- public Resources Resources { get; set; }
- //[XmlElement(ElementName = "IsEvent")]
- public string IsEvent { get; set; }
- //[XmlElement(ElementName = "IsRoomViewMeeting")]
- public string IsRoomViewMeeting { get; set; }
- //[XmlElement(ElementName = "IsPrivate")]
- public string IsPrivate { get; set; }
- //[XmlElement(ElementName = "IsExchangePrivate")]
- public string IsExchangePrivate { get; set; }
- //[XmlElement(ElementName = "MeetingTypes")]
- public MeetingTypes MeetingTypes { get; set; }
- //[XmlElement(ElementName = "ParticipantCode")]
- public string ParticipantCode { get; set; }
- //[XmlElement(ElementName = "PhoneNo")]
- public string PhoneNo { get; set; }
- //[XmlElement(ElementName = "WelcomeMsg")]
- public string WelcomeMsg { get; set; }
- //[XmlElement(ElementName = "Subject")]
- public string Subject { get; set; }
- //[XmlElement(ElementName = "LiveMeeting")]
- public LiveMeeting LiveMeeting { get; set; }
- //[XmlElement(ElementName = "ShareDocPath")]
- public string ShareDocPath { get; set; }
- //[XmlElement(ElementName = "HaveAttendees")]
- public string HaveAttendees { get; set; }
- //[XmlElement(ElementName = "HaveResources")]
- public string HaveResources { get; set; }
-
- ///
- /// Gets the duration of the meeting
- ///
- public string DurationInMinutes
- {
- get
- {
- string duration;
-
- var timeSpan = dtEnd.Subtract(dtStart);
- int hours = timeSpan.Hours;
- double minutes = timeSpan.Minutes;
- double roundedMinutes = Math.Round(minutes);
- if(hours > 0)
- {
- duration = string.Format("{0} hours {1} minutes", hours, roundedMinutes);
- }
- else
- {
- duration = string.Format("{0} minutes", roundedMinutes);
- }
-
- return duration;
- }
- }
-
- ///
- /// Gets the remaining time in the meeting. Returns null if the meeting is not currently in progress.
- ///
- public string RemainingTime
- {
- get
- {
- var now = DateTime.Now;
-
- string remainingTime;
-
- if (GetInProgress())
- {
- var timeSpan = dtEnd.Subtract(now);
- int hours = timeSpan.Hours;
- double minutes = timeSpan.Minutes;
- double roundedMinutes = Math.Round(minutes);
- if (hours > 0)
- {
- remainingTime = string.Format("{0} hours {1} minutes", hours, roundedMinutes);
- }
- else
- {
- remainingTime = string.Format("{0} minutes", roundedMinutes);
- }
-
- return remainingTime;
- }
- else
- return null;
- }
-
- }
-
- ///
- /// Indicates that the meeting is in progress
- ///
- public bool isInProgress
- {
- get
- {
- return GetInProgress();
- }
- }
-
- ///
- /// Determines if the meeting is in progress
- ///
- /// Returns true if in progress
- bool GetInProgress()
- {
- var now = DateTime.Now;
-
- if (now > dtStart && now < dtEnd)
- {
- return true;
- }
- else
- return false;
- }
- }
-
- //[XmlRoot(ElementName = "Resources")]
- public class Resources
- {
- //[XmlElement(ElementName = "Rooms")]
- public Rooms Rooms { get; set; }
- }
-
- //[XmlRoot(ElementName = "Rooms")]
- public class Rooms
- {
- //[XmlElement(ElementName = "Room")]
- public List Room { get; set; }
- }
-
- //[XmlRoot(ElementName = "Room")]
- public class Room
- {
- //[XmlElement(ElementName = "Name")]
- public string Name { get; set; }
- //[XmlElement(ElementName = "ID")]
- public string ID { get; set; }
- //[XmlElement(ElementName = "MPType")]
- public string MPType { get; set; }
- }
-
- //[XmlRoot(ElementName = "Attendees")]
- public class Attendees
- {
- //[XmlElement(ElementName = "Required")]
- public Required Required { get; set; }
- //[XmlElement(ElementName = "Optional")]
- public Optional Optional { get; set; }
- }
-
- //[XmlRoot(ElementName = "Required")]
- public class Required
- {
- //[XmlElement(ElementName = "Attendee")]
- public List Attendee { get; set; }
- }
-
- //[XmlRoot(ElementName = "Optional")]
- public class Optional
- {
- //[XmlElement(ElementName = "Attendee")]
- public List Attendee { get; set; }
- }
-
- //[XmlRoot(ElementName = "MeetingType")]
- public class MeetingType
- {
- //[XmlAttribute(AttributeName = "ID")]
- public string ID { get; set; }
- //[XmlAttribute(AttributeName = "Value")]
- public string Value { get; set; }
- }
-
- //[XmlRoot(ElementName = "MeetingTypes")]
- public class MeetingTypes
- {
- //[XmlElement(ElementName = "MeetingType")]
- public List MeetingType { get; set; }
- }
-
- //[XmlRoot(ElementName = "LiveMeeting")]
- public class LiveMeeting
- {
- //[XmlElement(ElementName = "URL")]
- public string URL { get; set; }
- //[XmlElement(ElementName = "ID")]
- public string ID { get; set; }
- //[XmlElement(ElementName = "Key")]
- public string Key { get; set; }
- //[XmlElement(ElementName = "Subject")]
- public string Subject { get; set; }
- }
-
- //[XmlRoot(ElementName = "LiveMeetingURL")]
- public class LiveMeetingURL
- {
- //[XmlElement(ElementName = "LiveMeeting")]
- public LiveMeeting LiveMeeting { get; set; }
- }
+
}
\ No newline at end of file
diff --git a/Essentials/PepperDashEssentials/PepperDashEssentials.csproj b/Essentials/PepperDashEssentials/PepperDashEssentials.csproj
index b4205def..ff171731 100644
--- a/Essentials/PepperDashEssentials/PepperDashEssentials.csproj
+++ b/Essentials/PepperDashEssentials/PepperDashEssentials.csproj
@@ -135,6 +135,7 @@
+
diff --git a/Essentials/PepperDashEssentials/PepperDashEssentials.projectinfo b/Essentials/PepperDashEssentials/PepperDashEssentials.projectinfo
index 426da96b..5564a0e1 100644
Binary files a/Essentials/PepperDashEssentials/PepperDashEssentials.projectinfo and b/Essentials/PepperDashEssentials/PepperDashEssentials.projectinfo differ
diff --git a/Release Package/PepperDashEssentials.cpz b/Release Package/PepperDashEssentials.cpz
index 99a6f532..ab54e804 100644
Binary files a/Release Package/PepperDashEssentials.cpz and b/Release Package/PepperDashEssentials.cpz differ
diff --git a/Release Package/PepperDashEssentials.dll b/Release Package/PepperDashEssentials.dll
index db53b9f0..b2a0709b 100644
Binary files a/Release Package/PepperDashEssentials.dll and b/Release Package/PepperDashEssentials.dll differ