mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 20:54:55 +00:00
Changes to Code Block Decorators
@@ -129,7 +129,7 @@ This ordering ensures that all devices are at least present before building tie
|
|||||||
|
|
||||||
In each device/room step, a device factory process is called. We call subsequent device factory methods in the various libraries that make up Essentials until one of them returns a functional device. This allows us to break up the factory process into individual libraries, and not have a huge master list of types and build procedures. Here's part of the code:
|
In each device/room step, a device factory process is called. We call subsequent device factory methods in the various libraries that make up Essentials until one of them returns a functional device. This allows us to break up the factory process into individual libraries, and not have a huge master list of types and build procedures. Here's part of the code:
|
||||||
|
|
||||||
```csharp
|
```cs
|
||||||
// Try local factories first
|
// Try local factories first
|
||||||
var newDev = DeviceFactory.GetDevice(devConf);
|
var newDev = DeviceFactory.GetDevice(devConf);
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ If the attribute is present, the join data is added to the publically available
|
|||||||
|
|
||||||
### JoinData
|
### JoinData
|
||||||
|
|
||||||
```csharp
|
```cs
|
||||||
JoinData() { JoinNumber = 1, JoinSpan = 1 };
|
JoinData() { JoinNumber = 1, JoinSpan = 1 };
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ JoinMetadata() { Label = "Reports Online Status", JoinCapabilities = eJoinCapabi
|
|||||||
|
|
||||||
```JoinCapabilities``` is represented by an enum defining the direction that the data is flowing for this join. Appropriate values are:
|
```JoinCapabilities``` is represented by an enum defining the direction that the data is flowing for this join. Appropriate values are:
|
||||||
|
|
||||||
```csharp
|
```cs
|
||||||
public enum eJoinCapabilities
|
public enum eJoinCapabilities
|
||||||
{
|
{
|
||||||
None = 0,
|
None = 0,
|
||||||
@@ -66,7 +66,7 @@ public enum eJoinCapabilities
|
|||||||
|
|
||||||
```JoinType``` is represented by an enum defining the data type in SIMPL. Appropriate values are:
|
```JoinType``` is represented by an enum defining the data type in SIMPL. Appropriate values are:
|
||||||
|
|
||||||
```csharp
|
```cs
|
||||||
public enum eJoinType
|
public enum eJoinType
|
||||||
{
|
{
|
||||||
None = 0,
|
None = 0,
|
||||||
@@ -92,7 +92,7 @@ JoinDataComplete(JoinData data, JoinMetadata metadata);
|
|||||||
|
|
||||||
This is the join map for ```IBasicCommunication``` Devices
|
This is the join map for ```IBasicCommunication``` Devices
|
||||||
|
|
||||||
```csharp
|
```cs
|
||||||
namespace PepperDash.Essentials.Core.Bridges
|
namespace PepperDash.Essentials.Core.Bridges
|
||||||
{
|
{
|
||||||
public class IBasicCommunicationJoinMap : JoinMapBaseAdvanced
|
public class IBasicCommunicationJoinMap : JoinMapBaseAdvanced
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ for instantiating each class as defined by type.
|
|||||||
|
|
||||||
Note that multiple types can be loaded from the same plugin.
|
Note that multiple types can be loaded from the same plugin.
|
||||||
|
|
||||||
```csharp
|
```cs
|
||||||
using System;
|
using System;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharpPro;
|
using Crestron.SimplSharpPro;
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ One or more plugins can be loaded to the /user/ProgramX/plugins as .dlls or .cpl
|
|||||||
|
|
||||||
All plugin assemblies must contain a static method called LoadPlugin():
|
All plugin assemblies must contain a static method called LoadPlugin():
|
||||||
|
|
||||||
```csharp
|
```cs
|
||||||
public class SomeDevice : Device , IBridge //IBridge only needs to be implemented if using a bridge
|
public class SomeDevice : Device , IBridge //IBridge only needs to be implemented if using a bridge
|
||||||
{
|
{
|
||||||
// This string is used to define the minimum version of the
|
// This string is used to define the minimum version of the
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ Now that our devices have been built, we can refer to the device join maps to se
|
|||||||
|
|
||||||
See below:
|
See below:
|
||||||
|
|
||||||
```csharp
|
```cs
|
||||||
namespace PepperDash.Essentials.Core.Bridges
|
namespace PepperDash.Essentials.Core.Bridges
|
||||||
{
|
{
|
||||||
public class DisplayControllerJoinMap : JoinMapBaseAdvanced
|
public class DisplayControllerJoinMap : JoinMapBaseAdvanced
|
||||||
@@ -228,7 +228,7 @@ VolumeUp = 5
|
|||||||
VolumeDown = 6
|
VolumeDown = 6
|
||||||
VolumeMute = 7
|
VolumeMute = 7
|
||||||
|
|
||||||
```csharp
|
```cs
|
||||||
namespace PepperDash.Essentials.Core.Bridges
|
namespace PepperDash.Essentials.Core.Bridges
|
||||||
{
|
{
|
||||||
public class IBasicCommunicationJoinMap : JoinMapBaseAdvanced
|
public class IBasicCommunicationJoinMap : JoinMapBaseAdvanced
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ Now that our devices have been built, we can refer to the device join maps to se
|
|||||||
|
|
||||||
See below:
|
See below:
|
||||||
|
|
||||||
```csharp
|
```cs
|
||||||
namespace PepperDash.Essentials.Bridges
|
namespace PepperDash.Essentials.Bridges
|
||||||
{
|
{
|
||||||
public class DisplayControllerJoinMap : JoinMapBase
|
public class DisplayControllerJoinMap : JoinMapBase
|
||||||
@@ -270,7 +270,7 @@ VolumeUp = 5
|
|||||||
VolumeDown = 6
|
VolumeDown = 6
|
||||||
VolumeMute = 7
|
VolumeMute = 7
|
||||||
|
|
||||||
```csharp
|
```cs
|
||||||
namespace PepperDash.Essentials.Bridges
|
namespace PepperDash.Essentials.Bridges
|
||||||
{
|
{
|
||||||
public class IBasicCommunicationJoinMap : JoinMapBase
|
public class IBasicCommunicationJoinMap : JoinMapBase
|
||||||
|
|||||||
Reference in New Issue
Block a user