mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-23 01:15:03 +00:00
51 lines
1.4 KiB
C#
51 lines
1.4 KiB
C#
using System;
|
|
using System.Linq;
|
|
using Crestron.SimplSharp.Reflection;
|
|
using PepperDash.Essentials.Core;
|
|
|
|
namespace PepperDash.Essentials.Bridges
|
|
{
|
|
[Obsolete("Please use version PepperDash.Essentials.Core.Bridges")]
|
|
public class StatusSignControllerJoinMap:JoinMapBase
|
|
{
|
|
public uint IsOnline { get; set; }
|
|
public uint Name { get; set; }
|
|
public uint RedLed { get; set; }
|
|
public uint GreenLed { get; set; }
|
|
public uint BlueLed { get; set; }
|
|
public uint RedControl { get; set; }
|
|
public uint GreenControl { get; set; }
|
|
public uint BlueControl { get; set; }
|
|
|
|
public StatusSignControllerJoinMap()
|
|
{
|
|
//digital
|
|
IsOnline = 1;
|
|
RedControl = 2;
|
|
GreenControl = 3;
|
|
BlueControl = 4;
|
|
|
|
//Analog
|
|
RedLed = 2;
|
|
GreenLed = 3;
|
|
BlueLed = 4;
|
|
|
|
//string
|
|
Name = 1;
|
|
|
|
|
|
}
|
|
|
|
public override void OffsetJoinNumbers(uint joinStart)
|
|
{
|
|
var joinOffset = joinStart - 1;
|
|
var properties =
|
|
GetType().GetCType().GetProperties().Where(p => p.PropertyType == typeof (uint)).ToList();
|
|
|
|
foreach (var propertyInfo in properties)
|
|
{
|
|
propertyInfo.SetValue(this, (uint) propertyInfo.GetValue(this, null) + joinOffset, null);
|
|
}
|
|
}
|
|
}
|
|
} |