-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from PepperDash/feature/updates
Update to new JoinMap and plugin loading mechanisms
- Loading branch information
Showing
12 changed files
with
112 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -355,3 +355,5 @@ MigrationBackup/ | |
# Crestron Zip Files | ||
*.cplz | ||
*.clz | ||
*.projectinfo | ||
*.suo |
Submodule EssentialsBuilds
updated
47 files
52 changes: 0 additions & 52 deletions
52
PDT.EssentialsPluginTemplate.EPI/EssentailsPluginTemplate.cs
This file was deleted.
Oops, something went wrong.
57 changes: 0 additions & 57 deletions
57
PDT.EssentialsPluginTemplate.EPI/EssentialsPluginTemplateBridge.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
PDT.EssentialsPluginTemplate.EPI/EssentialsPluginTemplateFactory.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using Crestron.SimplSharp; // For Basic SIMPL# Classes | ||
using Crestron.SimplSharpPro; // For Basic SIMPL#Pro classes | ||
|
||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Linq; | ||
|
||
using PepperDash.Essentials; | ||
using PepperDash.Essentials.Core; | ||
using PepperDash.Essentials.Core.Config; | ||
using PepperDash.Core; | ||
|
||
namespace EssentialsPluginTemplateEPI | ||
{ | ||
/// <summary> | ||
/// This class contains the necessary properties and methods required to function as an Essentials Plugin | ||
/// </summary> | ||
public class EssentialsPluginFactory:EssentialsPluginDeviceFactory<EssentialsPluginTemplateDevice> | ||
{ | ||
public EssentialsPluginFactory() | ||
{ | ||
// This string is used to define the minimum version of the | ||
// Essentials Framework required for this plugin | ||
MinimumEssentialsFrameworkVersion = "1.6.1"; | ||
|
||
//The strings defined in this list will be used in the configuration file to build the device in this plugin. | ||
TypeNames = new List<string> {"essentialsPluginTemplateDevice"}; | ||
} | ||
|
||
#region Overrides of EssentialsDeviceFactory<EssentialsPluginTemplateDevice> | ||
|
||
public override EssentialsDevice BuildDevice(DeviceConfig dc) | ||
{ | ||
var config = dc.Properties.ToObject<EssentialsPluginTemplatePropertiesConfig>(); | ||
var newDevice = new EssentialsPluginTemplateDevice(dc.Key, dc.Name, config); | ||
return newDevice; | ||
} | ||
|
||
#endregion | ||
} | ||
} | ||
|
27 changes: 27 additions & 0 deletions
27
PDT.EssentialsPluginTemplate.EPI/EssentialsPluginTemplateJoinMap.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using Crestron.SimplSharp; | ||
using PepperDash.Essentials.Core; | ||
|
||
namespace PDT.EssentialsPluginTemplate.EPI | ||
{ | ||
public class EssentialsPluginTemplateBridgeJoinMap : JoinMapBaseAdvanced | ||
{ | ||
[JoinName("IsOnline")] | ||
public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData {JoinNumber = 1, JoinSpan = 1}, | ||
new JoinMetadata | ||
{ | ||
Description = "Device is Online", | ||
JoinType = eJoinType.Digital, | ||
JoinCapabilities = eJoinCapabilities.ToSIMPL | ||
}); | ||
|
||
|
||
public EssentialsPluginTemplateBridgeJoinMap(uint joinStart):base(joinStart, typeof(EssentialsPluginTemplateBridgeJoinMap)) | ||
{ | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file removed
BIN
-22 KB
PDT.EssentialsPluginTemplate.EPI/PDT.EssentialsPluginTemplate.EPI.suo
Binary file not shown.
Binary file removed
BIN
-1.85 KB
PDT.EssentialsPluginTemplate.EPI/PDT.EssentialsPluginTemplate.projectinfo
Binary file not shown.