CLOSES 92 Adds CEN-ODT-C-POE

This commit is contained in:
Trevor Payne
2020-04-07 16:56:32 -05:00
parent da50272980
commit a3cc3221b0
10 changed files with 939 additions and 164 deletions

View File

@@ -37,13 +37,19 @@ namespace PepperDash.Essentials.Bridges
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
var properties =
GetType().GetCType().GetProperties().Where(p => p.PropertyType == typeof (uint)).ToList();
//digital
IsOnline += joinOffset;
RedControl += joinOffset;
GreenControl += joinOffset;
BlueControl += joinOffset;
foreach (var propertyInfo in properties)
{
propertyInfo.SetValue(this, (uint) propertyInfo.GetValue(this, null) + joinOffset, null);
}
//Analog
RedLed += joinOffset;
GreenLed += joinOffset;
BlueLed += joinOffset;
//string
Name += joinOffset;
}
}
}