From dc9eee9325ddb989588dfca7fed6e882f6bf5122 Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Thu, 13 Feb 2020 20:31:06 -0700 Subject: [PATCH 1/7] Update Readme.md Fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b8b4547b..05f0953c 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Essentials Framework is a collection of C# / Simpl# Pro libraries that can be ut ## Dependencies -The [PepperDash.Core](https://github.com/PepperDash/PepperDashCore) SIMPL# library is required. It is referenced as a submodule and will be automatically checked out when cloning this repo if set to recurse submodules. This allows different builds of the PepperDash.Core library to be reference by checking out the desired submodule commit. +The [PepperDash.Core](https://github.com/PepperDash/PepperDashCore) SIMPL# library is required. It is referenced as a submodule and will be automatically checked out when cloning this repo if set to recurse submodules. This allows different builds of the PepperDash.Core library to be referenced by checking out the desired submodule commit. ## Utilization Essentials was originally conceptualized as a standalone application for running control system logic entirely in Simpl# Pro. It is primarily designed around accomplishing this goal, but during development, it became obvious that it could easily be leveraged to also serve as a partner application to one or more SIMPL Windows programs. From 8a09ffa7e4626de59cb17ea3977751fb7f3def9a Mon Sep 17 00:00:00 2001 From: bitm0de Date: Sat, 15 Feb 2020 14:28:10 -0700 Subject: [PATCH 2/7] Updated to HDCPSupportOnFeedback from obsolete HDPCSupportOnFeedback --- .../Essentials_DM/Endpoints/Transmitters/DmTx200Controller.cs | 2 +- .../Essentials_DM/Endpoints/Transmitters/DmTx201CController.cs | 2 +- .../Essentials_DM/Endpoints/Transmitters/DmTx401CController.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx200Controller.cs b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx200Controller.cs index 2a898b19..3b48a0f5 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx200Controller.cs +++ b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx200Controller.cs @@ -115,7 +115,7 @@ namespace PepperDash.Essentials.DM HdmiInHdcpCapabilityFeedback = new IntFeedback("HdmiInHdcpCapability", () => { - if (tx.HdmiInput.HdpcSupportOnFeedback.BoolValue) + if (tx.HdmiInput.HdcpSupportOnFeedback.BoolValue) return 1; else return 0; diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx201CController.cs b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx201CController.cs index 224510aa..ba7a005d 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx201CController.cs +++ b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx201CController.cs @@ -116,7 +116,7 @@ namespace PepperDash.Essentials.DM HdmiInHdcpCapabilityFeedback = new IntFeedback("HdmiInHdcpCapability", () => { - if (tx.HdmiInput.HdpcSupportOnFeedback.BoolValue) + if (tx.HdmiInput.HdcpSupportOnFeedback.BoolValue) return 1; else return 0; diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx401CController.cs b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx401CController.cs index b0356f0d..86003aae 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx401CController.cs +++ b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx401CController.cs @@ -122,7 +122,7 @@ namespace PepperDash.Essentials.DM HdmiInHdcpCapabilityFeedback = new IntFeedback("HdmiInHdcpCapability", () => { - if (tx.HdmiInput.HdpcSupportOnFeedback.BoolValue) + if (tx.HdmiInput.HdcpSupportOnFeedback.BoolValue) return 1; else return 0; From ee26e77f15d320623e8d575feeab4d7db002a61b Mon Sep 17 00:00:00 2001 From: bitm0de Date: Sat, 15 Feb 2020 14:28:41 -0700 Subject: [PATCH 3/7] Added plugin entrypoint attribute and interface --- .../Plugins/IPluginDeviceConfig.cs | 10 ++++++++++ .../Plugins/PluginEntrypointAttribute.cs | 19 +++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 essentials-framework/Essentials Core/PepperDashEssentialsBase/Plugins/IPluginDeviceConfig.cs create mode 100644 essentials-framework/Essentials Core/PepperDashEssentialsBase/Plugins/PluginEntrypointAttribute.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Plugins/IPluginDeviceConfig.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Plugins/IPluginDeviceConfig.cs new file mode 100644 index 00000000..b131437d --- /dev/null +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Plugins/IPluginDeviceConfig.cs @@ -0,0 +1,10 @@ +using PepperDash.Core; +using PepperDash.Essentials.Core.Config; + +namespace PepperDash.Essentials.Core.Plugins +{ + public interface IPluginDeviceConfig + { + IKeyed BuildDevice(DeviceConfig dc); + } +} \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Plugins/PluginEntrypointAttribute.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Plugins/PluginEntrypointAttribute.cs new file mode 100644 index 00000000..f802211f --- /dev/null +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Plugins/PluginEntrypointAttribute.cs @@ -0,0 +1,19 @@ +using System; + +namespace PepperDash.Essentials.Core.Plugins +{ + [AttributeUsage(AttributeTargets.Class)] + public sealed class PluginEntryPointAttribute : Attribute + { + private readonly string _uniqueKey; + + public string UniqueKey { + get { return _uniqueKey; } + } + + public PluginEntryPointAttribute(string key) + { + _uniqueKey = key; + } + } +} \ No newline at end of file From 00e14b746bcfb31f472fe5baf5564e1ef4457481 Mon Sep 17 00:00:00 2001 From: bitm0de Date: Sat, 15 Feb 2020 14:32:46 -0700 Subject: [PATCH 4/7] Added floating point epsilon comparison for equality check --- .../Essentials Devices Common/Codec/iHasScheduleAwareness.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/iHasScheduleAwareness.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/iHasScheduleAwareness.cs index 5a006388..57839471 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/iHasScheduleAwareness.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/iHasScheduleAwareness.cs @@ -73,17 +73,18 @@ namespace PepperDash.Essentials.Devices.Common.Codec { // Iterate the meeting list and check if any meeting need to do anythingk + const double meetingTimeEpsilon = 0.0001; foreach (Meeting m in Meetings) { eMeetingEventChangeType changeType = eMeetingEventChangeType.Unkown; if (m.TimeToMeetingStart.TotalMinutes <= m.MeetingWarningMinutes.TotalMinutes) // Meeting is about to start changeType = eMeetingEventChangeType.MeetingStartWarning; - else if (m.TimeToMeetingStart.TotalMinutes == 0) // Meeting Start + else if (Math.Abs(m.TimeToMeetingStart.TotalMinutes) < meetingTimeEpsilon) // Meeting Start changeType = eMeetingEventChangeType.MeetingStart; else if (m.TimeToMeetingEnd.TotalMinutes <= m.MeetingWarningMinutes.TotalMinutes) // Meeting is about to end changeType = eMeetingEventChangeType.MeetingEndWarning; - else if (m.TimeToMeetingEnd.TotalMinutes == 0) // Meeting has ended + else if (Math.Abs(m.TimeToMeetingEnd.TotalMinutes) < meetingTimeEpsilon) // Meeting has ended changeType = eMeetingEventChangeType.MeetingEnd; if (changeType != eMeetingEventChangeType.Unkown) From c420e0654095e09eaf6fff7c61cb949801b462d2 Mon Sep 17 00:00:00 2001 From: bitm0de Date: Sat, 15 Feb 2020 14:43:31 -0700 Subject: [PATCH 5/7] Fixed conditional check to prevent NullReferenceException --- .../VideoCodec/CiscoCodec/BookingsDataClasses.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/BookingsDataClasses.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/BookingsDataClasses.cs index 46d171cf..cf4d8530 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/BookingsDataClasses.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/BookingsDataClasses.cs @@ -336,8 +336,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec if(b.Agenda != null) meeting.Agenda = b.Agenda.Value; if(b.Time != null) + { meeting.StartTime = b.Time.StartTime.Value; meeting.EndTime = b.Time.EndTime.Value; + } if(b.Privacy != null) meeting.Privacy = CodecCallPrivacy.ConvertToDirectionEnum(b.Privacy.Value); From 86dcd066fe573d4464d9989ede497a09565bb446 Mon Sep 17 00:00:00 2001 From: bitm0de Date: Sat, 15 Feb 2020 15:10:22 -0700 Subject: [PATCH 6/7] Added MinimumEssentialsFrameworkVersion to plugin interface --- .../PepperDashEssentialsBase/Plugins/IPluginDeviceConfig.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Plugins/IPluginDeviceConfig.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Plugins/IPluginDeviceConfig.cs index b131437d..7ac894c6 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Plugins/IPluginDeviceConfig.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Plugins/IPluginDeviceConfig.cs @@ -5,6 +5,7 @@ namespace PepperDash.Essentials.Core.Plugins { public interface IPluginDeviceConfig { + string MinimumEssentialsFrameworkVersion { get; } IKeyed BuildDevice(DeviceConfig dc); } } \ No newline at end of file From f33f42a40e1ee4d61daa50728753cfafbdba3a72 Mon Sep 17 00:00:00 2001 From: bitm0de Date: Sat, 15 Feb 2020 19:51:09 -0700 Subject: [PATCH 7/7] Fixed misspelling --- .../PepperDashEssentialsBase/Properties/AssemblyInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Properties/AssemblyInfo.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Properties/AssemblyInfo.cs index f9464b7d..5c1f9863 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Properties/AssemblyInfo.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Properties/AssemblyInfo.cs @@ -3,5 +3,5 @@ [assembly: AssemblyTitle("PepperDashEssentialsBase")] [assembly: AssemblyCompany("PepperDash Technology Corp")] [assembly: AssemblyProduct("PepperDashEssentialsBase")] -[assembly: AssemblyCopyright("Copyright © Ppperdash 2019")] +[assembly: AssemblyCopyright("Copyright © Pepperdash 2019")] [assembly: AssemblyVersion("1.4.0.*")] \ No newline at end of file