74 lines
2.1 KiB
C#
74 lines
2.1 KiB
C#
namespace ProtosXdigitalDemo
|
|
{
|
|
public static class Data
|
|
{
|
|
public static class MachineState
|
|
{
|
|
|
|
public static bool[] digitalInputChannels { get; } = new bool[16];
|
|
public static bool[] digitalOutputChannels { get; } = new bool[16];
|
|
|
|
|
|
public static double[] analogInputChannels { get; } = new double[8];
|
|
|
|
|
|
public static byte[] failureCode { get; } = new byte[256];
|
|
|
|
|
|
public static ushort digitalInputCount { get; private set; }
|
|
public static ushort digitalOutputCount { get; private set; }
|
|
public static ushort analogInputCount { get; private set; }
|
|
|
|
public static void InitializeCounts()
|
|
{
|
|
digitalInputCount = (ushort)digitalInputChannels.Length;
|
|
digitalOutputCount = (ushort)digitalOutputChannels.Length;
|
|
analogInputCount = (ushort)analogInputChannels.Length;
|
|
}
|
|
}
|
|
internal enum digitalInputChannels
|
|
{
|
|
DigitalInput0,
|
|
DigitalInput1,
|
|
DigitalInput2,
|
|
DigitalInput3,
|
|
DigitalInput4,
|
|
DigitalInput5,
|
|
DigitalInput6,
|
|
DigitalInput7,
|
|
DigitalInput8,
|
|
DigitalInput9,
|
|
DigitalInput10,
|
|
DigitalInput11,
|
|
DigitalInput12,
|
|
DigitalInput13,
|
|
DigitalInput14,
|
|
DigitalInput15
|
|
}
|
|
internal enum digitalOutputChannels
|
|
{
|
|
KitchenLight1,
|
|
KitchenLight2,
|
|
KitchenLight3,
|
|
PorchLight1,
|
|
Porchlight2,
|
|
OutsideFloodlight1,
|
|
OutsideFloodlight2,
|
|
PantryLight1,
|
|
FrontRoomLight1,
|
|
FrontRoomLight2,
|
|
FrontRoomLight3,
|
|
Radio,
|
|
LandingLight1,
|
|
ServerRoomLights,
|
|
HallLight1,
|
|
HallLight2
|
|
}
|
|
internal enum analogInputChannels
|
|
{
|
|
TemperatureSensor1,
|
|
TemperatureSensor2
|
|
}
|
|
}
|
|
}
|