mirror of
https://github.com/PepperDash/PepperDashCore.git
synced 2026-02-16 13:14:49 +00:00
Added S+ event args classes
This commit is contained in:
110
Pepperdash Core/Pepperdash Core/EventArgs and Constants.cs
Normal file
110
Pepperdash Core/Pepperdash Core/EventArgs and Constants.cs
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Crestron.SimplSharp;
|
||||||
|
|
||||||
|
namespace PepperDash.Core
|
||||||
|
{
|
||||||
|
|
||||||
|
//**************************************************************************************************//
|
||||||
|
public delegate void SPlusValuesDelegate();
|
||||||
|
|
||||||
|
public class SPlusValueWrapper
|
||||||
|
{
|
||||||
|
public SPlusType ValueType { get; private set; }
|
||||||
|
public ushort Index { get; private set; }
|
||||||
|
public ushort BoolUShortValue { get; set; }
|
||||||
|
public string StringValue { get; set; }
|
||||||
|
|
||||||
|
public SPlusValueWrapper() { }
|
||||||
|
|
||||||
|
public SPlusValueWrapper(SPlusType type, ushort index)
|
||||||
|
{
|
||||||
|
ValueType = type;
|
||||||
|
Index = index;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum SPlusType
|
||||||
|
{
|
||||||
|
Digital, Analog, String
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//**************************************************************************************************//
|
||||||
|
public class BoolChangeEventArgs : EventArgs
|
||||||
|
{
|
||||||
|
public bool State { get; set; }
|
||||||
|
public ushort IntValue { get { return (ushort)(State ? 1 : 0); } }
|
||||||
|
public ushort Type { get; set; }
|
||||||
|
public ushort Index { get; set; }
|
||||||
|
|
||||||
|
public BoolChangeEventArgs()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public BoolChangeEventArgs(bool state, ushort type)
|
||||||
|
{
|
||||||
|
State = state;
|
||||||
|
Type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BoolChangeEventArgs(bool state, ushort type, ushort index)
|
||||||
|
{
|
||||||
|
State = state;
|
||||||
|
Type = type;
|
||||||
|
Index = index;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//**************************************************************************************************//
|
||||||
|
public class UshrtChangeEventArgs : EventArgs
|
||||||
|
{
|
||||||
|
public ushort IntValue { get; set; }
|
||||||
|
public ushort Type { get; set; }
|
||||||
|
public ushort Index { get; set; }
|
||||||
|
|
||||||
|
public UshrtChangeEventArgs()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public UshrtChangeEventArgs(ushort intValue, ushort type)
|
||||||
|
{
|
||||||
|
IntValue = intValue;
|
||||||
|
Type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public UshrtChangeEventArgs(ushort intValue, ushort type, ushort index)
|
||||||
|
{
|
||||||
|
IntValue = intValue;
|
||||||
|
Type = type;
|
||||||
|
Index = index;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//**************************************************************************************************//
|
||||||
|
public class StringChangeEventArgs : EventArgs
|
||||||
|
{
|
||||||
|
public string StringValue { get; set; }
|
||||||
|
public ushort Type { get; set; }
|
||||||
|
public ushort Index { get; set; }
|
||||||
|
|
||||||
|
public StringChangeEventArgs()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public StringChangeEventArgs(string stringValue, ushort type)
|
||||||
|
{
|
||||||
|
StringValue = stringValue;
|
||||||
|
Type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public StringChangeEventArgs(string stringValue, ushort type, ushort index)
|
||||||
|
{
|
||||||
|
StringValue = stringValue;
|
||||||
|
Type = type;
|
||||||
|
Index = index;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -72,6 +72,7 @@
|
|||||||
<Compile Include="Device.cs" />
|
<Compile Include="Device.cs" />
|
||||||
<Compile Include="EthernetHelper.cs" />
|
<Compile Include="EthernetHelper.cs" />
|
||||||
<Compile Include="Comm\GenericTcpIpClient.cs" />
|
<Compile Include="Comm\GenericTcpIpClient.cs" />
|
||||||
|
<Compile Include="EventArgs and Constants.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<None Include="Properties\ControlSystem.cfg" />
|
<None Include="Properties\ControlSystem.cfg" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
@@ -84,7 +85,7 @@
|
|||||||
<Programmer />
|
<Programmer />
|
||||||
<ArchiveFilename>C:\Users\hvolm\Desktop\working\pepperdash-simplsharp-core\Pepperdash Core\Pepperdash Core\bin\PepperDash_Core.clz</ArchiveFilename>
|
<ArchiveFilename>C:\Users\hvolm\Desktop\working\pepperdash-simplsharp-core\Pepperdash Core\Pepperdash Core\bin\PepperDash_Core.clz</ArchiveFilename>
|
||||||
<MinFirmwareVersion>1.007.0017</MinFirmwareVersion>
|
<MinFirmwareVersion>1.007.0017</MinFirmwareVersion>
|
||||||
<CompiledOn>8/15/2016 1:54:57 PM</CompiledOn>
|
<CompiledOn>9/2/2016 11:13:46 AM</CompiledOn>
|
||||||
<AdditionalInfo />
|
<AdditionalInfo />
|
||||||
<EmbedSourceArchive>False</EmbedSourceArchive>
|
<EmbedSourceArchive>False</EmbedSourceArchive>
|
||||||
<CopyTo />
|
<CopyTo />
|
||||||
|
|||||||
Binary file not shown.
@@ -10,7 +10,7 @@
|
|||||||
<ArchiveName />
|
<ArchiveName />
|
||||||
</RequiredInfo>
|
</RequiredInfo>
|
||||||
<OptionalInfo>
|
<OptionalInfo>
|
||||||
<CompiledOn>8/15/2016 1:54:57 PM</CompiledOn>
|
<CompiledOn>9/2/2016 11:13:46 AM</CompiledOn>
|
||||||
<CompilerRev>1.0.0.23247</CompilerRev>
|
<CompilerRev>1.0.0.18412</CompilerRev>
|
||||||
</OptionalInfo>
|
</OptionalInfo>
|
||||||
</ProgramInfo>
|
</ProgramInfo>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
MainAssembly=PepperDash_Core.dll:cedcf6ddcb42b121da13ff559d7178d3
|
MainAssembly=PepperDash_Core.dll:1b8fe52abb2cd78b374987bb89064191
|
||||||
MainAssemblyMinFirmwareVersion=1.007.0017
|
MainAssemblyMinFirmwareVersion=1.007.0017
|
||||||
ü
|
ü
|
||||||
DependencySource=Newtonsoft.Json.Compact.dll:ea996aa2ec65aa1878e7c9d09e37a896
|
DependencySource=Newtonsoft.Json.Compact.dll:ea996aa2ec65aa1878e7c9d09e37a896
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user