mirror of
https://github.com/PepperDash/EssentialsPluginTemplate.git
synced 2026-01-11 19:44:38 +00:00
Comment updates and License added.
This commit is contained in:
7
LICENSE.md
Normal file
7
LICENSE.md
Normal file
@@ -0,0 +1,7 @@
|
||||
Copyright (c) <2020> PepperDash Technology Corporation
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -12,13 +12,16 @@ using PepperDash.Core;
|
||||
|
||||
namespace EssentialsPluginTemplateEPI
|
||||
{
|
||||
public class EssentialsPluginTemplate
|
||||
/// <summary>
|
||||
/// This class contains the necessary properties and static methods required to function as an Essentials Plugin
|
||||
/// </summary>
|
||||
public class EssentialsPluginFactory
|
||||
{
|
||||
/// <summary>
|
||||
/// This string is used to define the minimum version of the
|
||||
/// Essentials Framework required for this plugin
|
||||
/// </summary>
|
||||
public static string MinimumEssentialsFrameworkVersion = "1.4.23";
|
||||
public static string MinimumEssentialsFrameworkVersion = "1.4.31";
|
||||
|
||||
/// <summary>
|
||||
/// This method will get called by Essentials when this plugin is loaded.
|
||||
@@ -26,11 +29,14 @@ namespace EssentialsPluginTemplateEPI
|
||||
/// </summary>
|
||||
public static void LoadPlugin()
|
||||
{
|
||||
PepperDash.Essentials.Core.DeviceFactory.AddFactoryForType("EssentialsPluginTemplate", EssentialsPluginTemplate.BuildDevice);
|
||||
PepperDash.Essentials.Core.DeviceFactory.AddFactoryForType("EssentialsPluginTemplate", EssentialsPluginFactory.BuildDevice);
|
||||
|
||||
// Add additional factories for each type here
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Builds an instance of the device type
|
||||
/// Builds an instance of the device type. There should be method like this defined for each device type your plugin needs
|
||||
/// to be able to build
|
||||
/// </summary>
|
||||
/// <param name="dc">The device configuration</param>
|
||||
/// <returns>The device</returns>
|
||||
|
||||
@@ -10,27 +10,48 @@ using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Bridges;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace EssentialsPluginTemplateEPI
|
||||
{
|
||||
public static class EssentialsPluginTemplateBridge
|
||||
{
|
||||
public static void LinkToApiExt(this EssentialsPluginTemplate DspDevice, BasicTriList trilist, uint joinStart, string joinMapKey)
|
||||
public static void LinkToApiExt(this EssentialsPluginFactory DspDevice, BasicTriList trilist, uint joinStart, string joinMapKey)
|
||||
{
|
||||
var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as EssentialsPluginTemplateBridgeJoinMap;
|
||||
// Construct the default join map
|
||||
EssentialsPluginTemplateBridgeJoinMap joinMap = new EssentialsPluginTemplateBridgeJoinMap();
|
||||
|
||||
if (joinMap == null)
|
||||
joinMap = new EssentialsPluginTemplateBridgeJoinMap();
|
||||
// Attempt to get a custom join map if specified in config
|
||||
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
|
||||
|
||||
// If we find a custom join map, deserialize it
|
||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||
joinMap = JsonConvert.DeserializeObject<EssentialsPluginTemplateBridgeJoinMap>(joinMapSerialized);
|
||||
|
||||
// Offset the joins based on the join start
|
||||
joinMap.OffsetJoinNumbers(joinStart);
|
||||
|
||||
|
||||
// Set all your join actions here
|
||||
|
||||
|
||||
// Link all your feedbacks to joins here
|
||||
|
||||
}
|
||||
}
|
||||
public class EssentialsPluginTemplateBridgeJoinMap : JoinMapBase
|
||||
{
|
||||
// Specify your joins here
|
||||
|
||||
|
||||
public EssentialsPluginTemplateBridgeJoinMap()
|
||||
{
|
||||
// Set the values of your joins here
|
||||
}
|
||||
|
||||
public override void OffsetJoinNumbers(uint joinStart)
|
||||
{
|
||||
// Offset the joins from joinStart as applicable
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,16 +11,27 @@ using Newtonsoft.Json;
|
||||
namespace EssentialsPluginTemplateEPI
|
||||
{
|
||||
/// <summary>
|
||||
/// Example of a config class that represents the structure of the Properties object of a DeviceConfig
|
||||
/// Example of a config class that represents the structure of the Properties object of a DeviceConfig.
|
||||
/// The BuildDevice method will attempt to deserialize the Properties object into this class.
|
||||
/// Populate with any necssary properties for your device
|
||||
/// </summary>
|
||||
public class EssentialsPluginTemplatePropertiesConfig
|
||||
{
|
||||
// Below are some example properties
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Control properties if needed to communicate with device
|
||||
/// Control properties if needed to communicate with device.
|
||||
/// The JsonProperty attribute has been added to specify the name
|
||||
/// of the object and that it is required
|
||||
/// </summary>
|
||||
[JsonProperty("control")]
|
||||
[JsonProperty("control", Required = Required.Always)]
|
||||
ControlPropertiesConfig Control { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Add custom properties here
|
||||
/// </summary>
|
||||
[JsonProperty("myDeviceProperty")]
|
||||
string MyDeviceProperty { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@ using PepperDash.Essentials;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.Config;
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Bridges;
|
||||
|
||||
namespace EssentialsPluginTemplateEPI
|
||||
{
|
||||
@@ -18,7 +19,7 @@ namespace EssentialsPluginTemplateEPI
|
||||
public class EssentialsPluginTemplateDevice : Device, IBridge
|
||||
{
|
||||
/// <summary>
|
||||
/// Device Constructor. Called by
|
||||
/// Device Constructor. Called by BuildDevice
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
/// <param name="name"></param>
|
||||
@@ -29,10 +30,25 @@ namespace EssentialsPluginTemplateEPI
|
||||
|
||||
}
|
||||
|
||||
public void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey)
|
||||
/// <summary>
|
||||
/// Add items to be executed during the Activaction phase
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override bool CustomActivate()
|
||||
{
|
||||
|
||||
return base.CustomActivate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method gets called by the EiscApi bridge and calls your bridge extension method
|
||||
/// </summary>
|
||||
/// <param name="trilist"></param>
|
||||
/// <param name="joinStart"></param>
|
||||
/// <param name="joinMapKey"></param>
|
||||
public void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey)
|
||||
{
|
||||
this.LinkToApi(trilist, joinStart, joinMapKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
<ProgramInfo>
|
||||
<RequiredInfo>
|
||||
<FriendlyName>NvxUrlRoutingClientE</FriendlyName>
|
||||
<SystemName>NvxUrlRoutingClientEpi</SystemName>
|
||||
<FriendlyName>PDTEssentialsPluginT</FriendlyName>
|
||||
<SystemName>PDT.EssentialsPluginTemplate.EPI</SystemName>
|
||||
<EntryPoint>PDT.EssentialsPluginTemplate.EPI</EntryPoint>
|
||||
<MinFirmwareVersion>1.009.0029</MinFirmwareVersion>
|
||||
<ProgramTool>SIMPL# Plugin</ProgramTool>
|
||||
@@ -10,11 +10,11 @@
|
||||
<ArchiveName />
|
||||
</RequiredInfo>
|
||||
<OptionalInfo>
|
||||
<CompiledOn>9/4/2019 10:03:47 AM</CompiledOn>
|
||||
<CompilerRev>1.0.0.16312</CompilerRev>
|
||||
<CompiledOn>2020-02-13 3:58:57 PM</CompiledOn>
|
||||
<CompilerRev>1.0.0.28767</CompilerRev>
|
||||
</OptionalInfo>
|
||||
<Plugin>
|
||||
<Version>Crestron.SIMPLSharp, Version=2.0.52.0, Culture=neutral, PublicKeyToken=812d080f93e2de10</Version>
|
||||
<Include4.dat />
|
||||
<Version>Crestron.SIMPLSharp, Version=2.0.58.0, Culture=neutral, PublicKeyToken=812d080f93e2de10</Version>
|
||||
<Include4.dat>2.11.030</Include4.dat>
|
||||
</Plugin>
|
||||
</ProgramInfo>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,7 +1,9 @@
|
||||
MainAssembly=PDT.EssentialsPluginTemplate.EPI.dll:329b94ea1ddd95643a7554b8dcfed670
|
||||
MainAssembly=PDT.EssentialsPluginTemplate.EPI.dll:6808b45c8c5d7c4d3852fe284ea334cf
|
||||
MainAssemblyMinFirmwareVersion=1.009.0029
|
||||
MainAssemblyResource=SimplSharpData.dat:820b61c48c8a2cace82957eed4cc377c
|
||||
MainAssemblyResource=SimplSharpData.dat.der:bf862965c00f3e6ec535e4e00e82d30c
|
||||
MainAssemblyResource=SimplSharpData.dat:820b61c48c8a2cace82957eed4cc377c
|
||||
MainAssemblyResource=SimplSharpData.dat.der:bf862965c00f3e6ec535e4e00e82d30c
|
||||
ü
|
||||
DependencySource=Crestron.SimplSharpPro.DeviceSupport.dll:caae4b4259aaf619059f0ae34473bfd2
|
||||
DependencyPath=PDT.EssentialsPluginTemplate.EPI.cplz:Crestron.SimplSharpPro.DeviceSupport.dll
|
||||
@@ -39,25 +41,25 @@ DependencySource=Crestron.SimplSharpPro.UI.dll:089312a0cb0b4537072d4eb234e71e0e
|
||||
DependencyPath=PDT.EssentialsPluginTemplate.EPI.cplz:Crestron.SimplSharpPro.UI.dll
|
||||
DependencyMainAssembly=Crestron.SimplSharpPro.UI.dll:089312a0cb0b4537072d4eb234e71e0e
|
||||
ü
|
||||
DependencySource=Essentials Devices Common.dll:54aa6be05cd9b8a99659f02b58fc2ea1
|
||||
DependencySource=Essentials Devices Common.dll:2a3e604271af752bcc3d44a88c413a04
|
||||
DependencyPath=PDT.EssentialsPluginTemplate.EPI.cplz:Essentials Devices Common.dll
|
||||
DependencyMainAssembly=Essentials Devices Common.dll:54aa6be05cd9b8a99659f02b58fc2ea1
|
||||
DependencyMainAssembly=Essentials Devices Common.dll:2a3e604271af752bcc3d44a88c413a04
|
||||
ü
|
||||
DependencySource=PepperDashEssentials.dll:fde748012e69bb0f6358777e571aeb74
|
||||
DependencySource=PepperDashEssentials.dll:5f8619a0a04001da41c15402c0865638
|
||||
DependencyPath=PDT.EssentialsPluginTemplate.EPI.cplz:PepperDashEssentials.dll
|
||||
DependencyMainAssembly=PepperDashEssentials.dll:fde748012e69bb0f6358777e571aeb74
|
||||
DependencyMainAssembly=PepperDashEssentials.dll:5f8619a0a04001da41c15402c0865638
|
||||
ü
|
||||
DependencySource=PepperDash_Core.dll:6cc8f9e7eeb0027d3e2f114cd55f0ca2
|
||||
DependencySource=PepperDash_Core.dll:70f5a232b163f80b5d9f30b499a6eb18
|
||||
DependencyPath=PDT.EssentialsPluginTemplate.EPI.cplz:PepperDash_Core.dll
|
||||
DependencyMainAssembly=PepperDash_Core.dll:6cc8f9e7eeb0027d3e2f114cd55f0ca2
|
||||
DependencyMainAssembly=PepperDash_Core.dll:70f5a232b163f80b5d9f30b499a6eb18
|
||||
ü
|
||||
DependencySource=PepperDash_Essentials_Core.dll:b3b5a041f51c8534978c524aa3bbba6f
|
||||
DependencySource=PepperDash_Essentials_Core.dll:96e019f9a7bee024e462a74c0594fc6f
|
||||
DependencyPath=PDT.EssentialsPluginTemplate.EPI.cplz:PepperDash_Essentials_Core.dll
|
||||
DependencyMainAssembly=PepperDash_Essentials_Core.dll:b3b5a041f51c8534978c524aa3bbba6f
|
||||
DependencyMainAssembly=PepperDash_Essentials_Core.dll:96e019f9a7bee024e462a74c0594fc6f
|
||||
ü
|
||||
DependencySource=PepperDash_Essentials_DM.dll:15e560dbb7ee48429e58771d2c0f8a42
|
||||
DependencySource=PepperDash_Essentials_DM.dll:80c9770b1f20885ea340683270b90501
|
||||
DependencyPath=PDT.EssentialsPluginTemplate.EPI.cplz:PepperDash_Essentials_DM.dll
|
||||
DependencyMainAssembly=PepperDash_Essentials_DM.dll:15e560dbb7ee48429e58771d2c0f8a42
|
||||
DependencyMainAssembly=PepperDash_Essentials_DM.dll:80c9770b1f20885ea340683270b90501
|
||||
ü
|
||||
DependencySource=SimplSharpNewtonsoft.dll:9c09c5d30daedddf895c36acbface0d5
|
||||
DependencyPath=PDT.EssentialsPluginTemplate.EPI.cplz:SimplSharpNewtonsoft.dll
|
||||
|
||||
Binary file not shown.
@@ -21,3 +21,26 @@ C:\Users\JTA\Documents\Stash Folder\Frameworks\PDT.EssentialsPluginTemplate.EPI\
|
||||
C:\Users\JTA\Documents\Stash Folder\Frameworks\PDT.EssentialsPluginTemplate.EPI\PDT.EssentialsPluginTemplate.EPI\bin\Debug\Crestron.SimplSharpPro.DM.dll
|
||||
C:\Users\JTA\Documents\Stash Folder\Frameworks\PDT.EssentialsPluginTemplate.EPI\PDT.EssentialsPluginTemplate.EPI\obj\Debug\PDT.EssentialsPluginTemplate.EPI.dll
|
||||
C:\Users\JTA\Documents\Stash Folder\Frameworks\PDT.EssentialsPluginTemplate.EPI\PDT.EssentialsPluginTemplate.EPI\obj\Debug\PDT.EssentialsPluginTemplate.EPI.pdb
|
||||
C:\Working Directories\PD\EssentialsPluginTemplate\PDT.EssentialsPluginTemplate.EPI\obj\Debug\ResolveAssemblyReference.cache
|
||||
C:\Working Directories\PD\EssentialsPluginTemplate\PDT.EssentialsPluginTemplate.EPI\obj\Debug\PDT.EssentialsPluginTemplate.EPI.dll
|
||||
C:\Working Directories\PD\EssentialsPluginTemplate\PDT.EssentialsPluginTemplate.EPI\obj\Debug\PDT.EssentialsPluginTemplate.EPI.pdb
|
||||
C:\Working Directories\PD\EssentialsPluginTemplate\PDT.EssentialsPluginTemplate.EPI\bin\Debug\PDT.EssentialsPluginTemplate.EPI.dll
|
||||
C:\Working Directories\PD\EssentialsPluginTemplate\PDT.EssentialsPluginTemplate.EPI\bin\Debug\PDT.EssentialsPluginTemplate.EPI.pdb
|
||||
C:\Working Directories\PD\EssentialsPluginTemplate\PDT.EssentialsPluginTemplate.EPI\bin\Debug\PepperDash_Core.dll
|
||||
C:\Working Directories\PD\EssentialsPluginTemplate\PDT.EssentialsPluginTemplate.EPI\bin\Debug\PepperDash_Essentials_Core.dll
|
||||
C:\Working Directories\PD\EssentialsPluginTemplate\PDT.EssentialsPluginTemplate.EPI\bin\Debug\PepperDash_Essentials_DM.dll
|
||||
C:\Working Directories\PD\EssentialsPluginTemplate\PDT.EssentialsPluginTemplate.EPI\bin\Debug\PepperDashEssentials.dll
|
||||
C:\Working Directories\PD\EssentialsPluginTemplate\PDT.EssentialsPluginTemplate.EPI\bin\Debug\SimplSharpNewtonsoft.dll
|
||||
C:\Working Directories\PD\EssentialsPluginTemplate\PDT.EssentialsPluginTemplate.EPI\bin\Debug\SimplSharpReflectionInterface.dll
|
||||
C:\Working Directories\PD\EssentialsPluginTemplate\PDT.EssentialsPluginTemplate.EPI\bin\Debug\Crestron.SimplSharpPro.Lighting.dll
|
||||
C:\Working Directories\PD\EssentialsPluginTemplate\PDT.EssentialsPluginTemplate.EPI\bin\Debug\Crestron.SimplSharpPro.Gateways.dll
|
||||
C:\Working Directories\PD\EssentialsPluginTemplate\PDT.EssentialsPluginTemplate.EPI\bin\Debug\SimplSharpSQLHelperInterface.dll
|
||||
C:\Working Directories\PD\EssentialsPluginTemplate\PDT.EssentialsPluginTemplate.EPI\bin\Debug\Crestron.SimplSharpPro.Fusion.dll
|
||||
C:\Working Directories\PD\EssentialsPluginTemplate\PDT.EssentialsPluginTemplate.EPI\bin\Debug\Crestron.SimplSharpPro.Shades.dll
|
||||
C:\Working Directories\PD\EssentialsPluginTemplate\PDT.EssentialsPluginTemplate.EPI\bin\Debug\Crestron.SimplSharpPro.EthernetCommunications.dll
|
||||
C:\Working Directories\PD\EssentialsPluginTemplate\PDT.EssentialsPluginTemplate.EPI\bin\Debug\Crestron.SimplSharpPro.DeviceSupport.dll
|
||||
C:\Working Directories\PD\EssentialsPluginTemplate\PDT.EssentialsPluginTemplate.EPI\bin\Debug\Crestron.SimplSharpPro.UI.dll
|
||||
C:\Working Directories\PD\EssentialsPluginTemplate\PDT.EssentialsPluginTemplate.EPI\bin\Debug\SimplSharpTimerEventInterface.dll
|
||||
C:\Working Directories\PD\EssentialsPluginTemplate\PDT.EssentialsPluginTemplate.EPI\bin\Debug\Essentials Devices Common.dll
|
||||
C:\Working Directories\PD\EssentialsPluginTemplate\PDT.EssentialsPluginTemplate.EPI\bin\Debug\Crestron.SimplSharpPro.GeneralIO.dll
|
||||
C:\Working Directories\PD\EssentialsPluginTemplate\PDT.EssentialsPluginTemplate.EPI\bin\Debug\Crestron.SimplSharpPro.DM.dll
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user