moves joinMaps to Essentials Core

This commit is contained in:
Andrew Welker
2020-04-13 16:11:09 -06:00
parent cebca45877
commit 999b3903b7
21 changed files with 648 additions and 648 deletions

View File

@@ -1,43 +1,43 @@
using System.Linq; using System.Linq;
using Crestron.SimplSharp.Reflection; using Crestron.SimplSharp.Reflection;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Bridges
{ {
public class C2nRthsControllerJoinMap:JoinMapBase public class C2nRthsControllerJoinMap:JoinMapBase
{ {
public uint IsOnline { get; set; } public uint IsOnline { get; set; }
public uint Name { get; set; } public uint Name { get; set; }
public uint Temperature { get; set; } public uint Temperature { get; set; }
public uint Humidity { get; set; } public uint Humidity { get; set; }
public uint TemperatureFormat { get; set; } public uint TemperatureFormat { get; set; }
public C2nRthsControllerJoinMap() public C2nRthsControllerJoinMap()
{ {
//digital //digital
IsOnline = 1; IsOnline = 1;
TemperatureFormat = 2; TemperatureFormat = 2;
//Analog //Analog
Temperature = 2; Temperature = 2;
Humidity = 3; Humidity = 3;
//serial //serial
Name = 1; Name = 1;
} }
public override void OffsetJoinNumbers(uint joinStart) public override void OffsetJoinNumbers(uint joinStart)
{ {
var joinOffset = joinStart - 1; var joinOffset = joinStart - 1;
var properties = var properties =
GetType().GetCType().GetProperties().Where(p => p.PropertyType == typeof(uint)).ToList(); GetType().GetCType().GetProperties().Where(p => p.PropertyType == typeof(uint)).ToList();
foreach (var propertyInfo in properties) foreach (var propertyInfo in properties)
{ {
propertyInfo.SetValue(this, (uint)propertyInfo.GetValue(this, null) + joinOffset, null); propertyInfo.SetValue(this, (uint)propertyInfo.GetValue(this, null) + joinOffset, null);
} }
} }
} }
} }

View File

@@ -1,109 +1,109 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using Crestron.SimplSharp; using Crestron.SimplSharp;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges { namespace PepperDash.Essentials.Bridges {
public class DmBladeChassisControllerJoinMap : JoinMapBase { public class DmBladeChassisControllerJoinMap : JoinMapBase {
#region Digital/Analogs #region Digital/Analogs
#endregion #endregion
#region Digitals #region Digitals
/// <summary> /// <summary>
/// High when device is online /// High when device is online
/// </summary> /// </summary>
public uint IsOnline { get; set; } public uint IsOnline { get; set; }
/// <summary> /// <summary>
/// Range reports video sync feedback for each input /// Range reports video sync feedback for each input
/// </summary> /// </summary>
public uint VideoSyncStatus { get; set; } public uint VideoSyncStatus { get; set; }
/// <summary> /// <summary>
/// Range reports high if corresponding input's endpoint is online /// Range reports high if corresponding input's endpoint is online
/// </summary> /// </summary>
public uint InputEndpointOnline { get; set; } public uint InputEndpointOnline { get; set; }
/// <summary> /// <summary>
/// Range reports high if corresponding output's endpoint is online /// Range reports high if corresponding output's endpoint is online
/// </summary> /// </summary>
public uint OutputEndpointOnline { get; set; } public uint OutputEndpointOnline { get; set; }
/// <summary> /// <summary>
/// Range reports high if corresponding input's transmitter supports bridging as a separate device for detailed AV switching, HDCP control, etc. /// Range reports high if corresponding input's transmitter supports bridging as a separate device for detailed AV switching, HDCP control, etc.
/// </summary> /// </summary>
public uint TxAdvancedIsPresent { get; set; } // indicates that there is an attached transmitter that should be bridged to be interacted with public uint TxAdvancedIsPresent { get; set; } // indicates that there is an attached transmitter that should be bridged to be interacted with
#endregion #endregion
#region Analogs #region Analogs
/// <summary> /// <summary>
/// Range sets and reports the current video source for the corresponding output /// Range sets and reports the current video source for the corresponding output
/// </summary> /// </summary>
public uint OutputVideo { get; set; } public uint OutputVideo { get; set; }
/// <summary> /// <summary>
/// Range sets and reports the current HDCP state for the corresponding input card /// Range sets and reports the current HDCP state for the corresponding input card
/// </summary> /// </summary>
public uint HdcpSupportState { get; set; } public uint HdcpSupportState { get; set; }
/// <summary> /// <summary>
/// Range reports the highest supported HDCP state level for the corresponding input card /// Range reports the highest supported HDCP state level for the corresponding input card
/// </summary> /// </summary>
public uint HdcpSupportCapability { get; set; } public uint HdcpSupportCapability { get; set; }
#endregion #endregion
#region Serials #region Serials
/// <summary> /// <summary>
/// Range sets and reports the name for the corresponding input card /// Range sets and reports the name for the corresponding input card
/// </summary> /// </summary>
public uint InputNames { get; set; } public uint InputNames { get; set; }
/// <summary> /// <summary>
/// Range sets and reports the name for the corresponding output card /// Range sets and reports the name for the corresponding output card
/// </summary> /// </summary>
public uint OutputNames { get; set; } public uint OutputNames { get; set; }
/// <summary> /// <summary>
/// Range reports the name of the current video source for the corresponding output card /// Range reports the name of the current video source for the corresponding output card
/// </summary> /// </summary>
public uint OutputCurrentVideoInputNames { get; set; } public uint OutputCurrentVideoInputNames { get; set; }
/// <summary> /// <summary>
/// Range reports the current input resolution for each corresponding input card /// Range reports the current input resolution for each corresponding input card
/// </summary> /// </summary>
public uint InputCurrentResolution { get; set; } public uint InputCurrentResolution { get; set; }
#endregion #endregion
public DmBladeChassisControllerJoinMap() { public DmBladeChassisControllerJoinMap() {
//Digital/Analog //Digital/Analog
//Digital //Digital
IsOnline = 11; IsOnline = 11;
VideoSyncStatus = 100; //101-299 VideoSyncStatus = 100; //101-299
InputEndpointOnline = 500; //501-699 InputEndpointOnline = 500; //501-699
OutputEndpointOnline = 700; //701-899 OutputEndpointOnline = 700; //701-899
TxAdvancedIsPresent = 1000; //1001-1199 TxAdvancedIsPresent = 1000; //1001-1199
//Analog //Analog
OutputVideo = 100; //101-299 OutputVideo = 100; //101-299
HdcpSupportState = 1000; //1001-1199 HdcpSupportState = 1000; //1001-1199
HdcpSupportCapability = 1200; //1201-1399 HdcpSupportCapability = 1200; //1201-1399
//Serial //Serial
InputNames = 100; //101-299 InputNames = 100; //101-299
OutputNames = 300; //301-499 OutputNames = 300; //301-499
OutputCurrentVideoInputNames = 2000; //2001-2199 OutputCurrentVideoInputNames = 2000; //2001-2199
InputCurrentResolution = 2400; // 2401-2599 InputCurrentResolution = 2400; // 2401-2599
} }
public override void OffsetJoinNumbers(uint joinStart) { public override void OffsetJoinNumbers(uint joinStart) {
var joinOffset = joinStart - 1; var joinOffset = joinStart - 1;
IsOnline = IsOnline + joinOffset; IsOnline = IsOnline + joinOffset;
OutputVideo = OutputVideo + joinOffset; OutputVideo = OutputVideo + joinOffset;
VideoSyncStatus = VideoSyncStatus + joinOffset; VideoSyncStatus = VideoSyncStatus + joinOffset;
InputNames = InputNames + joinOffset; InputNames = InputNames + joinOffset;
OutputNames = OutputNames + joinOffset; OutputNames = OutputNames + joinOffset;
OutputCurrentVideoInputNames = OutputCurrentVideoInputNames + joinOffset; OutputCurrentVideoInputNames = OutputCurrentVideoInputNames + joinOffset;
InputCurrentResolution = InputCurrentResolution + joinOffset; InputCurrentResolution = InputCurrentResolution + joinOffset;
InputEndpointOnline = InputEndpointOnline + joinOffset; InputEndpointOnline = InputEndpointOnline + joinOffset;
OutputEndpointOnline = OutputEndpointOnline + joinOffset; OutputEndpointOnline = OutputEndpointOnline + joinOffset;
HdcpSupportState = HdcpSupportState + joinOffset; HdcpSupportState = HdcpSupportState + joinOffset;
HdcpSupportCapability = HdcpSupportCapability + joinOffset; HdcpSupportCapability = HdcpSupportCapability + joinOffset;
} }
} }
} }

View File

@@ -1,238 +1,238 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using Crestron.SimplSharp; using Crestron.SimplSharp;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Bridges
{ {
public class GlsOccupancySensorBaseJoinMap : JoinMapBase public class GlsOccupancySensorBaseJoinMap : JoinMapBase
{ {
#region Digitals #region Digitals
/// <summary> /// <summary>
/// High when device is online /// High when device is online
/// </summary> /// </summary>
public uint IsOnline { get; set; } public uint IsOnline { get; set; }
/// <summary> /// <summary>
/// Forces the device to report occupied status /// Forces the device to report occupied status
/// </summary> /// </summary>
public uint ForceOccupied { get; set; } public uint ForceOccupied { get; set; }
/// <summary> /// <summary>
/// Forces the device to report vacant status /// Forces the device to report vacant status
/// </summary> /// </summary>
public uint ForceVacant { get; set; } public uint ForceVacant { get; set; }
/// <summary> /// <summary>
/// Enables raw status reporting /// Enables raw status reporting
/// </summary> /// </summary>
public uint EnableRawStates { get; set; } public uint EnableRawStates { get; set; }
/// <summary> /// <summary>
/// High when raw occupancy is detected /// High when raw occupancy is detected
/// </summary> /// </summary>
public uint RawOccupancyFeedback { get; set; } public uint RawOccupancyFeedback { get; set; }
/// <summary> /// <summary>
/// High when PIR sensor detects motion /// High when PIR sensor detects motion
/// </summary> /// </summary>
public uint RawOccupancyPirFeedback { get; set; } public uint RawOccupancyPirFeedback { get; set; }
/// <summary> /// <summary>
/// High when US sensor detects motion /// High when US sensor detects motion
/// </summary> /// </summary>
public uint RawOccupancyUsFeedback { get; set; } public uint RawOccupancyUsFeedback { get; set; }
/// <summary> /// <summary>
/// High when occupancy is detected /// High when occupancy is detected
/// </summary> /// </summary>
public uint RoomOccupiedFeedback { get; set; } public uint RoomOccupiedFeedback { get; set; }
/// <summary> /// <summary>
/// Hich when occupancy is detected in the grace period /// Hich when occupancy is detected in the grace period
/// </summary> /// </summary>
public uint GraceOccupancyDetectedFeedback { get; set; } public uint GraceOccupancyDetectedFeedback { get; set; }
/// <summary> /// <summary>
/// High when vacancy is detected /// High when vacancy is detected
/// </summary> /// </summary>
public uint RoomVacantFeedback { get; set; } public uint RoomVacantFeedback { get; set; }
/// <summary> /// <summary>
/// Enables the LED Flash when set high /// Enables the LED Flash when set high
/// </summary> /// </summary>
public uint EnableLedFlash { get; set; } public uint EnableLedFlash { get; set; }
/// <summary> /// <summary>
/// Disables the LED flash when set high /// Disables the LED flash when set high
/// </summary> /// </summary>
public uint DisableLedFlash { get; set; } public uint DisableLedFlash { get; set; }
/// <summary> /// <summary>
/// Enables the Short Timeout /// Enables the Short Timeout
/// </summary> /// </summary>
public uint EnableShortTimeout { get; set; } public uint EnableShortTimeout { get; set; }
/// <summary> /// <summary>
/// Disables the Short Timout /// Disables the Short Timout
/// </summary> /// </summary>
public uint DisableShortTimeout { get; set; } public uint DisableShortTimeout { get; set; }
/// <summary> /// <summary>
/// Set high to enable one technology to trigger occupancy /// Set high to enable one technology to trigger occupancy
/// </summary> /// </summary>
public uint OrWhenVacated { get; set; } public uint OrWhenVacated { get; set; }
/// <summary> /// <summary>
/// Set high to require both technologies to trigger occupancy /// Set high to require both technologies to trigger occupancy
/// </summary> /// </summary>
public uint AndWhenVacated { get; set; } public uint AndWhenVacated { get; set; }
/// <summary> /// <summary>
/// Enables Ultrasonic Sensor A /// Enables Ultrasonic Sensor A
/// </summary> /// </summary>
public uint EnableUsA { get; set; } public uint EnableUsA { get; set; }
/// <summary> /// <summary>
/// Disables Ultrasonic Sensor A /// Disables Ultrasonic Sensor A
/// </summary> /// </summary>
public uint DisableUsA { get; set; } public uint DisableUsA { get; set; }
/// <summary> /// <summary>
/// Enables Ultrasonic Sensor B /// Enables Ultrasonic Sensor B
/// </summary> /// </summary>
public uint EnableUsB { get; set; } public uint EnableUsB { get; set; }
/// <summary> /// <summary>
/// Disables Ultrasonic Sensor B /// Disables Ultrasonic Sensor B
/// </summary> /// </summary>
public uint DisableUsB { get; set; } public uint DisableUsB { get; set; }
/// <summary> /// <summary>
/// Enables Pir /// Enables Pir
/// </summary> /// </summary>
public uint EnablePir { get; set; } public uint EnablePir { get; set; }
/// <summary> /// <summary>
/// Disables Pir /// Disables Pir
/// </summary> /// </summary>
public uint DisablePir { get; set; } public uint DisablePir { get; set; }
public uint IncrementUsInOccupiedState { get; set; } public uint IncrementUsInOccupiedState { get; set; }
public uint DecrementUsInOccupiedState { get; set; } public uint DecrementUsInOccupiedState { get; set; }
public uint IncrementUsInVacantState { get; set; } public uint IncrementUsInVacantState { get; set; }
public uint DecrementUsInVacantState { get; set; } public uint DecrementUsInVacantState { get; set; }
public uint IncrementPirInOccupiedState { get; set; } public uint IncrementPirInOccupiedState { get; set; }
public uint DecrementPirInOccupiedState { get; set; } public uint DecrementPirInOccupiedState { get; set; }
public uint IncrementPirInVacantState { get; set; } public uint IncrementPirInVacantState { get; set; }
public uint DecrementPirInVacantState { get; set; } public uint DecrementPirInVacantState { get; set; }
#endregion #endregion
#region Analogs #region Analogs
/// <summary> /// <summary>
/// Sets adn reports the remote timeout value /// Sets adn reports the remote timeout value
/// </summary> /// </summary>
public uint Timeout { get; set; } public uint Timeout { get; set; }
/// <summary> /// <summary>
/// Reports the local timeout value /// Reports the local timeout value
/// </summary> /// </summary>
public uint TimeoutLocalFeedback { get; set; } public uint TimeoutLocalFeedback { get; set; }
/// <summary> /// <summary>
/// Sets the minimum internal photo sensor value and reports the current level /// Sets the minimum internal photo sensor value and reports the current level
/// </summary> /// </summary>
public uint InternalPhotoSensorValue { get; set; } public uint InternalPhotoSensorValue { get; set; }
/// <summary> /// <summary>
/// Sets the minimum external photo sensor value and reports the current level /// Sets the minimum external photo sensor value and reports the current level
/// </summary> /// </summary>
public uint ExternalPhotoSensorValue { get; set; } public uint ExternalPhotoSensorValue { get; set; }
public uint UsSensitivityInOccupiedState { get; set; } public uint UsSensitivityInOccupiedState { get; set; }
public uint UsSensitivityInVacantState { get; set; } public uint UsSensitivityInVacantState { get; set; }
public uint PirSensitivityInOccupiedState { get; set; } public uint PirSensitivityInOccupiedState { get; set; }
public uint PirSensitivityInVacantState { get; set; } public uint PirSensitivityInVacantState { get; set; }
#endregion #endregion
#region Serial #region Serial
public uint Name { get; set; } public uint Name { get; set; }
#endregion #endregion
public GlsOccupancySensorBaseJoinMap() public GlsOccupancySensorBaseJoinMap()
{ {
IsOnline = 1; IsOnline = 1;
ForceOccupied = 2; ForceOccupied = 2;
ForceVacant = 3; ForceVacant = 3;
EnableRawStates = 4; EnableRawStates = 4;
RoomOccupiedFeedback = 2; RoomOccupiedFeedback = 2;
GraceOccupancyDetectedFeedback = 3; GraceOccupancyDetectedFeedback = 3;
RoomVacantFeedback = 4; RoomVacantFeedback = 4;
RawOccupancyFeedback = 5; RawOccupancyFeedback = 5;
RawOccupancyPirFeedback = 6; RawOccupancyPirFeedback = 6;
RawOccupancyUsFeedback = 7; RawOccupancyUsFeedback = 7;
EnableLedFlash = 11; EnableLedFlash = 11;
DisableLedFlash = 12; DisableLedFlash = 12;
EnableShortTimeout = 13; EnableShortTimeout = 13;
DisableShortTimeout = 14; DisableShortTimeout = 14;
OrWhenVacated = 15; OrWhenVacated = 15;
AndWhenVacated = 16; AndWhenVacated = 16;
EnableUsA = 17; EnableUsA = 17;
DisableUsA = 18; DisableUsA = 18;
EnableUsB = 19; EnableUsB = 19;
DisableUsB = 20; DisableUsB = 20;
EnablePir = 21; EnablePir = 21;
DisablePir = 22; DisablePir = 22;
IncrementUsInOccupiedState = 23; IncrementUsInOccupiedState = 23;
DecrementUsInOccupiedState = 24; DecrementUsInOccupiedState = 24;
IncrementUsInVacantState = 25; IncrementUsInVacantState = 25;
DecrementUsInVacantState = 26; DecrementUsInVacantState = 26;
IncrementPirInOccupiedState = 27; IncrementPirInOccupiedState = 27;
DecrementPirInOccupiedState = 28; DecrementPirInOccupiedState = 28;
IncrementPirInVacantState = 29; IncrementPirInVacantState = 29;
DecrementPirInVacantState = 30; DecrementPirInVacantState = 30;
Timeout = 1; Timeout = 1;
TimeoutLocalFeedback = 2; TimeoutLocalFeedback = 2;
InternalPhotoSensorValue = 3; InternalPhotoSensorValue = 3;
ExternalPhotoSensorValue = 4; ExternalPhotoSensorValue = 4;
UsSensitivityInOccupiedState = 5; UsSensitivityInOccupiedState = 5;
UsSensitivityInVacantState = 6; UsSensitivityInVacantState = 6;
PirSensitivityInOccupiedState = 7; PirSensitivityInOccupiedState = 7;
PirSensitivityInVacantState = 8; PirSensitivityInVacantState = 8;
Name = 1; Name = 1;
} }
public override void OffsetJoinNumbers(uint joinStart) public override void OffsetJoinNumbers(uint joinStart)
{ {
var joinOffset = joinStart - 1; var joinOffset = joinStart - 1;
IsOnline = IsOnline + joinOffset; IsOnline = IsOnline + joinOffset;
ForceOccupied = ForceOccupied + joinOffset; ForceOccupied = ForceOccupied + joinOffset;
ForceVacant = ForceVacant + joinOffset; ForceVacant = ForceVacant + joinOffset;
EnableRawStates = EnableRawStates + joinOffset; EnableRawStates = EnableRawStates + joinOffset;
RoomOccupiedFeedback = RoomOccupiedFeedback + joinOffset; RoomOccupiedFeedback = RoomOccupiedFeedback + joinOffset;
GraceOccupancyDetectedFeedback = GraceOccupancyDetectedFeedback + joinOffset; GraceOccupancyDetectedFeedback = GraceOccupancyDetectedFeedback + joinOffset;
RoomVacantFeedback = RoomVacantFeedback + joinOffset; RoomVacantFeedback = RoomVacantFeedback + joinOffset;
RawOccupancyFeedback = RawOccupancyFeedback + joinOffset; RawOccupancyFeedback = RawOccupancyFeedback + joinOffset;
RawOccupancyPirFeedback = RawOccupancyPirFeedback + joinOffset; RawOccupancyPirFeedback = RawOccupancyPirFeedback + joinOffset;
RawOccupancyUsFeedback = RawOccupancyUsFeedback + joinOffset; RawOccupancyUsFeedback = RawOccupancyUsFeedback + joinOffset;
EnableLedFlash = EnableLedFlash + joinOffset; EnableLedFlash = EnableLedFlash + joinOffset;
DisableLedFlash = DisableLedFlash + joinOffset; DisableLedFlash = DisableLedFlash + joinOffset;
EnableShortTimeout = EnableShortTimeout + joinOffset; EnableShortTimeout = EnableShortTimeout + joinOffset;
DisableShortTimeout = DisableShortTimeout + joinOffset; DisableShortTimeout = DisableShortTimeout + joinOffset;
OrWhenVacated = OrWhenVacated + joinOffset; OrWhenVacated = OrWhenVacated + joinOffset;
AndWhenVacated = AndWhenVacated + joinOffset; AndWhenVacated = AndWhenVacated + joinOffset;
EnableUsA = EnableUsA + joinOffset; EnableUsA = EnableUsA + joinOffset;
DisableUsA = DisableUsA + joinOffset; DisableUsA = DisableUsA + joinOffset;
EnableUsB = EnableUsB + joinOffset; EnableUsB = EnableUsB + joinOffset;
DisableUsB = DisableUsB + joinOffset; DisableUsB = DisableUsB + joinOffset;
EnablePir = EnablePir + joinOffset; EnablePir = EnablePir + joinOffset;
DisablePir = DisablePir + joinOffset; DisablePir = DisablePir + joinOffset;
IncrementUsInOccupiedState = IncrementUsInOccupiedState + joinOffset; IncrementUsInOccupiedState = IncrementUsInOccupiedState + joinOffset;
DecrementUsInOccupiedState = DecrementUsInOccupiedState + joinOffset; DecrementUsInOccupiedState = DecrementUsInOccupiedState + joinOffset;
IncrementUsInVacantState = IncrementUsInVacantState + joinOffset; IncrementUsInVacantState = IncrementUsInVacantState + joinOffset;
DecrementUsInVacantState = DecrementUsInVacantState + joinOffset; DecrementUsInVacantState = DecrementUsInVacantState + joinOffset;
IncrementPirInOccupiedState = IncrementPirInOccupiedState + joinOffset; IncrementPirInOccupiedState = IncrementPirInOccupiedState + joinOffset;
DecrementPirInOccupiedState = DecrementPirInOccupiedState + joinOffset; DecrementPirInOccupiedState = DecrementPirInOccupiedState + joinOffset;
IncrementPirInVacantState = IncrementPirInVacantState + joinOffset; IncrementPirInVacantState = IncrementPirInVacantState + joinOffset;
DecrementPirInVacantState = DecrementPirInVacantState + joinOffset; DecrementPirInVacantState = DecrementPirInVacantState + joinOffset;
Timeout = Timeout + joinOffset; Timeout = Timeout + joinOffset;
TimeoutLocalFeedback = TimeoutLocalFeedback + joinOffset; TimeoutLocalFeedback = TimeoutLocalFeedback + joinOffset;
InternalPhotoSensorValue = InternalPhotoSensorValue + joinOffset; InternalPhotoSensorValue = InternalPhotoSensorValue + joinOffset;
ExternalPhotoSensorValue = ExternalPhotoSensorValue + joinOffset; ExternalPhotoSensorValue = ExternalPhotoSensorValue + joinOffset;
UsSensitivityInOccupiedState = UsSensitivityInOccupiedState + joinOffset; UsSensitivityInOccupiedState = UsSensitivityInOccupiedState + joinOffset;
UsSensitivityInVacantState = UsSensitivityInVacantState + joinOffset; UsSensitivityInVacantState = UsSensitivityInVacantState + joinOffset;
PirSensitivityInOccupiedState = PirSensitivityInOccupiedState + joinOffset; PirSensitivityInOccupiedState = PirSensitivityInOccupiedState + joinOffset;
PirSensitivityInVacantState = PirSensitivityInVacantState + joinOffset; PirSensitivityInVacantState = PirSensitivityInVacantState + joinOffset;
Name = Name + joinOffset; Name = Name + joinOffset;
} }
} }
} }

View File

@@ -1,212 +1,212 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using Crestron.SimplSharp; using Crestron.SimplSharp;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
using Crestron.SimplSharp.Reflection; using Crestron.SimplSharp.Reflection;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Bridges
{ {
public class SetTopBoxControllerJoinMap : JoinMapBase public class SetTopBoxControllerJoinMap : JoinMapBase
{ {
#region Digitals #region Digitals
public uint DvrList { get; set; } // public uint DvrList { get; set; } //
public uint Replay { get; set; } public uint Replay { get; set; }
public uint Up { get; set; } // public uint Up { get; set; } //
public uint Down { get; set; } // public uint Down { get; set; } //
public uint Left { get; set; } // public uint Left { get; set; } //
public uint Right { get; set; } // public uint Right { get; set; } //
public uint Select { get; set; } // public uint Select { get; set; } //
public uint Menu { get; set; } // public uint Menu { get; set; } //
public uint Exit { get; set; } // public uint Exit { get; set; } //
public uint Digit0 { get; set; } // public uint Digit0 { get; set; } //
public uint Digit1 { get; set; } // public uint Digit1 { get; set; } //
public uint Digit2 { get; set; } // public uint Digit2 { get; set; } //
public uint Digit3 { get; set; } // public uint Digit3 { get; set; } //
public uint Digit4 { get; set; } // public uint Digit4 { get; set; } //
public uint Digit5 { get; set; } // public uint Digit5 { get; set; } //
public uint Digit6 { get; set; } // public uint Digit6 { get; set; } //
public uint Digit7 { get; set; } // public uint Digit7 { get; set; } //
public uint Digit8 { get; set; } // public uint Digit8 { get; set; } //
public uint Digit9 { get; set; } // public uint Digit9 { get; set; } //
public uint Dash { get; set; } // public uint Dash { get; set; } //
public uint KeypadEnter { get; set; } // public uint KeypadEnter { get; set; } //
public uint ChannelUp { get; set; } // public uint ChannelUp { get; set; } //
public uint ChannelDown { get; set; } // public uint ChannelDown { get; set; } //
public uint LastChannel { get; set; } // public uint LastChannel { get; set; } //
public uint Guide { get; set; } // public uint Guide { get; set; } //
public uint Info { get; set; } // public uint Info { get; set; } //
public uint Red { get; set; } // public uint Red { get; set; } //
public uint Green { get; set; } // public uint Green { get; set; } //
public uint Yellow { get; set; } // public uint Yellow { get; set; } //
public uint Blue { get; set; } // public uint Blue { get; set; } //
public uint ChapMinus { get; set; } public uint ChapMinus { get; set; }
public uint ChapPlus { get; set; } public uint ChapPlus { get; set; }
public uint FFwd { get; set; } // public uint FFwd { get; set; } //
public uint Pause { get; set; } // public uint Pause { get; set; } //
public uint Play { get; set; } // public uint Play { get; set; } //
public uint Record { get; set; } public uint Record { get; set; }
public uint Rewind { get; set; } // public uint Rewind { get; set; } //
public uint Stop { get; set; } // public uint Stop { get; set; } //
public uint PowerOn { get; set; } // public uint PowerOn { get; set; } //
public uint PowerOff { get; set; } // public uint PowerOff { get; set; } //
public uint PowerToggle { get; set; } // public uint PowerToggle { get; set; } //
public uint HasKeypadAccessoryButton1 { get; set; } public uint HasKeypadAccessoryButton1 { get; set; }
public uint HasKeypadAccessoryButton2 { get; set; } public uint HasKeypadAccessoryButton2 { get; set; }
public uint KeypadAccessoryButton1Press { get; set; } public uint KeypadAccessoryButton1Press { get; set; }
public uint KeypadAccessoryButton2Press { get; set; } public uint KeypadAccessoryButton2Press { get; set; }
public uint HasDvr { get; set; } public uint HasDvr { get; set; }
public uint HasPresets { get; set; } public uint HasPresets { get; set; }
public uint HasNumeric { get; set; } public uint HasNumeric { get; set; }
public uint HasDpad { get; set; } public uint HasDpad { get; set; }
#endregion #endregion
#region Analogs #region Analogs
#endregion #endregion
#region Strings #region Strings
public uint Name { get; set; } public uint Name { get; set; }
public uint LoadPresets { get; set; } public uint LoadPresets { get; set; }
public uint KeypadAccessoryButton1Label { get; set; } public uint KeypadAccessoryButton1Label { get; set; }
public uint KeypadAccessoryButton2Label { get; set; } public uint KeypadAccessoryButton2Label { get; set; }
#endregion #endregion
public SetTopBoxControllerJoinMap() public SetTopBoxControllerJoinMap()
{ {
PowerOn = 1; PowerOn = 1;
PowerOff = 2; PowerOff = 2;
PowerToggle = 3; PowerToggle = 3;
HasDpad = 4; HasDpad = 4;
Up = 4; Up = 4;
Down = 5; Down = 5;
Left = 6; Left = 6;
Right = 7; Right = 7;
Select = 8; Select = 8;
Menu = 9; Menu = 9;
Exit = 10; Exit = 10;
HasNumeric = 11; HasNumeric = 11;
Digit0 = 11; Digit0 = 11;
Digit1 = 12; Digit1 = 12;
Digit2 = 13; Digit2 = 13;
Digit3 = 14; Digit3 = 14;
Digit4 = 15; Digit4 = 15;
Digit5 = 16; Digit5 = 16;
Digit6 = 17; Digit6 = 17;
Digit7 = 18; Digit7 = 18;
Digit8 = 19; Digit8 = 19;
Digit9 = 20; Digit9 = 20;
Dash = 21; Dash = 21;
KeypadEnter = 22; KeypadEnter = 22;
ChannelUp = 23; ChannelUp = 23;
ChannelDown = 24; ChannelDown = 24;
LastChannel = 25; LastChannel = 25;
Guide = 26; Guide = 26;
Info = 27; Info = 27;
Red = 28; Red = 28;
Green = 29; Green = 29;
Yellow = 30; Yellow = 30;
Blue = 31; Blue = 31;
HasDvr = 32; HasDvr = 32;
DvrList = 32; DvrList = 32;
Play = 33; Play = 33;
Pause = 34; Pause = 34;
Stop = 35; Stop = 35;
FFwd = 36; FFwd = 36;
Rewind = 37; Rewind = 37;
ChapPlus = 38; ChapPlus = 38;
ChapMinus = 39; ChapMinus = 39;
Replay = 40; Replay = 40;
Record = 41; Record = 41;
HasKeypadAccessoryButton1 = 42; HasKeypadAccessoryButton1 = 42;
KeypadAccessoryButton1Press = 42; KeypadAccessoryButton1Press = 42;
HasKeypadAccessoryButton2 = 43; HasKeypadAccessoryButton2 = 43;
KeypadAccessoryButton2Press = 43; KeypadAccessoryButton2Press = 43;
Name = 1; Name = 1;
KeypadAccessoryButton1Label = 42; KeypadAccessoryButton1Label = 42;
KeypadAccessoryButton2Label = 43; KeypadAccessoryButton2Label = 43;
LoadPresets = 50; LoadPresets = 50;
} }
public override void OffsetJoinNumbers(uint joinStart) public override void OffsetJoinNumbers(uint joinStart)
{ {
var joinOffset = joinStart - 1; var joinOffset = joinStart - 1;
PowerOn += joinOffset; PowerOn += joinOffset;
PowerOff += joinOffset; PowerOff += joinOffset;
PowerToggle += joinOffset; PowerToggle += joinOffset;
HasDpad += joinOffset; HasDpad += joinOffset;
Up += joinOffset; Up += joinOffset;
Down += joinOffset; Down += joinOffset;
Left += joinOffset; Left += joinOffset;
Right += joinOffset; Right += joinOffset;
Select += joinOffset; Select += joinOffset;
Menu += joinOffset; Menu += joinOffset;
Exit += joinOffset; Exit += joinOffset;
HasNumeric += joinOffset; HasNumeric += joinOffset;
Digit0 += joinOffset; Digit0 += joinOffset;
Digit1 += joinOffset; Digit1 += joinOffset;
Digit2 += joinOffset; Digit2 += joinOffset;
Digit3 += joinOffset; Digit3 += joinOffset;
Digit4 += joinOffset; Digit4 += joinOffset;
Digit5 += joinOffset; Digit5 += joinOffset;
Digit6 += joinOffset; Digit6 += joinOffset;
Digit7 += joinOffset; Digit7 += joinOffset;
Digit8 += joinOffset; Digit8 += joinOffset;
Digit9 += joinOffset; Digit9 += joinOffset;
Dash += joinOffset; Dash += joinOffset;
KeypadEnter += joinOffset; KeypadEnter += joinOffset;
ChannelUp += joinOffset; ChannelUp += joinOffset;
ChannelDown += joinOffset; ChannelDown += joinOffset;
LastChannel += joinOffset; LastChannel += joinOffset;
Guide += joinOffset; Guide += joinOffset;
Info += joinOffset; Info += joinOffset;
Red += joinOffset; Red += joinOffset;
Green += joinOffset; Green += joinOffset;
Yellow += joinOffset; Yellow += joinOffset;
Blue += joinOffset; Blue += joinOffset;
HasDvr += joinOffset; HasDvr += joinOffset;
DvrList += joinOffset; DvrList += joinOffset;
Play += joinOffset; Play += joinOffset;
Pause += joinOffset; Pause += joinOffset;
Stop += joinOffset; Stop += joinOffset;
FFwd += joinOffset; FFwd += joinOffset;
Rewind += joinOffset; Rewind += joinOffset;
ChapPlus += joinOffset; ChapPlus += joinOffset;
ChapMinus += joinOffset; ChapMinus += joinOffset;
Replay += joinOffset; Replay += joinOffset;
Record += joinOffset; Record += joinOffset;
HasKeypadAccessoryButton1 += joinOffset; HasKeypadAccessoryButton1 += joinOffset;
KeypadAccessoryButton1Press += joinOffset; KeypadAccessoryButton1Press += joinOffset;
HasKeypadAccessoryButton2 += joinOffset; HasKeypadAccessoryButton2 += joinOffset;
KeypadAccessoryButton2Press += joinOffset; KeypadAccessoryButton2Press += joinOffset;
Name += joinOffset; Name += joinOffset;
KeypadAccessoryButton1Label += joinOffset; KeypadAccessoryButton1Label += joinOffset;
KeypadAccessoryButton2Label += joinOffset; KeypadAccessoryButton2Label += joinOffset;
LoadPresets += joinOffset; LoadPresets += joinOffset;
} }
} }
} }

View File

@@ -1,49 +1,49 @@
using System.Linq; using System.Linq;
using Crestron.SimplSharp.Reflection; using Crestron.SimplSharp.Reflection;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Bridges
{ {
public class StatusSignControllerJoinMap:JoinMapBase public class StatusSignControllerJoinMap:JoinMapBase
{ {
public uint IsOnline { get; set; } public uint IsOnline { get; set; }
public uint Name { get; set; } public uint Name { get; set; }
public uint RedLed { get; set; } public uint RedLed { get; set; }
public uint GreenLed { get; set; } public uint GreenLed { get; set; }
public uint BlueLed { get; set; } public uint BlueLed { get; set; }
public uint RedControl { get; set; } public uint RedControl { get; set; }
public uint GreenControl { get; set; } public uint GreenControl { get; set; }
public uint BlueControl { get; set; } public uint BlueControl { get; set; }
public StatusSignControllerJoinMap() public StatusSignControllerJoinMap()
{ {
//digital //digital
IsOnline = 1; IsOnline = 1;
RedControl = 2; RedControl = 2;
GreenControl = 3; GreenControl = 3;
BlueControl = 4; BlueControl = 4;
//Analog //Analog
RedLed = 2; RedLed = 2;
GreenLed = 3; GreenLed = 3;
BlueLed = 4; BlueLed = 4;
//string //string
Name = 1; Name = 1;
} }
public override void OffsetJoinNumbers(uint joinStart) public override void OffsetJoinNumbers(uint joinStart)
{ {
var joinOffset = joinStart - 1; var joinOffset = joinStart - 1;
var properties = var properties =
GetType().GetCType().GetProperties().Where(p => p.PropertyType == typeof (uint)).ToList(); GetType().GetCType().GetProperties().Where(p => p.PropertyType == typeof (uint)).ToList();
foreach (var propertyInfo in properties) foreach (var propertyInfo in properties)
{ {
propertyInfo.SetValue(this, (uint) propertyInfo.GetValue(this, null) + joinOffset, null); propertyInfo.SetValue(this, (uint) propertyInfo.GetValue(this, null) + joinOffset, null);
} }
} }
} }
} }