init
This commit is contained in:
1
DataPRO/SLICEDBCommands/.svn/entries
Normal file
1
DataPRO/SLICEDBCommands/.svn/entries
Normal file
@@ -0,0 +1 @@
|
||||
12
|
||||
1
DataPRO/SLICEDBCommands/.svn/format
Normal file
1
DataPRO/SLICEDBCommands/.svn/format
Normal file
@@ -0,0 +1 @@
|
||||
12
|
||||
@@ -0,0 +1,438 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ClassDiagram MajorVersion="1" MinorVersion="1">
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.ArmCommands" Collapsed="true">
|
||||
<Position X="9.5" Y="2" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAABBAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>ArmCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.Arm" Collapsed="true">
|
||||
<Position X="2.75" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAABBAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>ArmCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.Disarm" Collapsed="true">
|
||||
<Position X="7.25" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAABBAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>ArmCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.EnableFaultChecking" Collapsed="true">
|
||||
<Position X="9.5" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAABBAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>ArmCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.DisableFaultChecking" Collapsed="true">
|
||||
<Position X="11.75" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAABBAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>ArmCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.SetRecordingMode" Collapsed="true">
|
||||
<Position X="14" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABBAAAAAAAAAAAAgAAAAAAA=</HashCode>
|
||||
<FileName>ArmCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.SetPostTriggerSec" Collapsed="true">
|
||||
<Position X="16.25" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABBAAAAAAAAAAAAgAAAAAAA=</HashCode>
|
||||
<FileName>ArmCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.SetONOverride" Collapsed="true">
|
||||
<Position X="18.5" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABAAAAAAAAAAAAAgAAAAAAA=</HashCode>
|
||||
<FileName>ArmCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.SetInvertTriggerPolarity" Collapsed="true">
|
||||
<Position X="0.5" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABAAAAAAAAAAAAAgAAAAAAA=</HashCode>
|
||||
<FileName>ArmCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.SetInvertStartPolarity" Collapsed="true">
|
||||
<Position X="5" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABAAAAAAAAAAAAAgAAAAAAA=</HashCode>
|
||||
<FileName>ArmCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.DiagnosticsCommands" Collapsed="true">
|
||||
<Position X="20.75" Y="2" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>CalibrationCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.CommandBase" Collapsed="true">
|
||||
<Position X="61.25" Y="0.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAA=</HashCode>
|
||||
<FileName>CommandBase.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.CommandPacket" Collapsed="true">
|
||||
<Position X="124.5" Y="0.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AIAAAAAAAAAAgAAIAAAAAAAAAAAAAAAAAgAAAAAAAAA=</HashCode>
|
||||
<FileName>CommandPacket.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.GPIOCommands" Collapsed="true">
|
||||
<Position X="47.75" Y="2" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.ReadInputRegister" Collapsed="true">
|
||||
<Position X="61.25" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABAAAACAAAAAAAAAAEAAAEA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.ReadDat0Register" Collapsed="true">
|
||||
<Position X="68" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAgAEAAAEA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.ReadDat1Register" Collapsed="true">
|
||||
<Position X="23" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAgAEAAAEA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.WriteDat0Register" Collapsed="true">
|
||||
<Position X="29.75" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABBAAAAAAAAAAAAgAAAAAAA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.WriteDat1Register" Collapsed="true">
|
||||
<Position X="36.5" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABBAAAAAAAAAAAAgAAAAAAA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.WriteToggle0Register" Collapsed="true">
|
||||
<Position X="43.25" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABBAAAAAAAAAAAAgAAAAAAA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.WriteSet0Register" Collapsed="true">
|
||||
<Position X="50" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABBAAAAAAAAAAAAgAAAAAAA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.WriteClear0Register" Collapsed="true">
|
||||
<Position X="56.75" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABBAAAAAAAAAAAAgAAAAAAA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryStatusLED" Collapsed="true">
|
||||
<Position X="63.5" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAgAEAAAEA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.SetStatusLED" Collapsed="true">
|
||||
<Position X="70.25" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABAAAAAAAAAAAAAgAAAAAAA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryOMAPEventMon" Collapsed="true">
|
||||
<Position X="25.25" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAgAEAAAEA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryOMAPExtStatMon" Collapsed="true">
|
||||
<Position X="32" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAgAEAAAEA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryOMAPnStartMon" Collapsed="true">
|
||||
<Position X="38.75" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAgAEAAAEA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryOMAPnStatusMon" Collapsed="true">
|
||||
<Position X="45.5" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAgAEAAAEA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryOMAPEventLow" Collapsed="true">
|
||||
<Position X="52.25" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAgAEAAAEA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.SetOMAPEventLow" Collapsed="true">
|
||||
<Position X="59" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABAAAAAAAAAAAAAgAAAAAAA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryOMAPStartLow" Collapsed="true">
|
||||
<Position X="65.75" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAgAEAAAEA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.SetOMAPStartLow" Collapsed="true">
|
||||
<Position X="72.5" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABAAAAAAAAAAAAAgAAAAAAA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryOMAPStatusLow" Collapsed="true">
|
||||
<Position X="27.5" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAgAEAAAEA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.SetOMAPStatusLow" Collapsed="true">
|
||||
<Position X="34.25" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABAAAAAAAAAAAAAgAAAAAAA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryOMAPRecStatExt" Collapsed="true">
|
||||
<Position X="41" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAgAEAAAEA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.SetOMAPRecStatExt" Collapsed="true">
|
||||
<Position X="47.75" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABAAAAAAAAAAAAAgAAAAAAA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryAllGPIO" Collapsed="true">
|
||||
<Position X="54.5" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABAAAAAAAAAAAAAAAEAgAEA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.InformationCommands" Collapsed="true">
|
||||
<Position X="82.5" Y="2" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAABBAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>InformationCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QuerySerialNumber" Collapsed="true">
|
||||
<Position X="88.25" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAAAAAAAAAAABAAAAEAAAAAAAAAAEAAAEA=</HashCode>
|
||||
<FileName>InformationCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.SetSerialNumber" Collapsed="true">
|
||||
<Position X="90.5" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAAAAAAAAAAABBAAAEAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>InformationCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryFirmwareVersion" Collapsed="true">
|
||||
<Position X="74.75" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAAAAAAAAAAABAAAAAAAACAAAAAAEAAAEA=</HashCode>
|
||||
<FileName>InformationCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryTime" Collapsed="true">
|
||||
<Position X="77" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAgEAAAEA=</HashCode>
|
||||
<FileName>InformationCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.SetTime" Collapsed="true">
|
||||
<Position X="79.25" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAAAAAAAAAAABBAAAAAAAAAAAAAgAAAAAA=</HashCode>
|
||||
<FileName>InformationCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryProtocolVersion" Collapsed="true">
|
||||
<Position X="81.5" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAACAEAAAEA=</HashCode>
|
||||
<FileName>InformationCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryKernelVersion" Collapsed="true">
|
||||
<Position X="83.75" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAEAAAEA=</HashCode>
|
||||
<FileName>InformationCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryMSPFirmwareVersion" Collapsed="true">
|
||||
<Position X="86" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAEAgAEA=</HashCode>
|
||||
<FileName>InformationCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.NetworkCommands" Collapsed="true">
|
||||
<Position X="100.5" Y="2" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAABBAAAAAAAAAAAAAAAAAAEA=</HashCode>
|
||||
<FileName>NetworkCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryIPAddress" Collapsed="true">
|
||||
<Position X="108.5" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABAAAAAAAAAAAAAAAEACAEA=</HashCode>
|
||||
<FileName>NetworkCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.SetIPAddress" Collapsed="true">
|
||||
<Position X="92.75" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABBAAAAAAAAAAAAAAAACAAA=</HashCode>
|
||||
<FileName>NetworkCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryNetmask" Collapsed="true">
|
||||
<Position X="95" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABAAAAAAAAAAAAAAAEBAAEA=</HashCode>
|
||||
<FileName>NetworkCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.SetNetmask" Collapsed="true">
|
||||
<Position X="97.25" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABBAAAAAAAAAAAAAAABAAAA=</HashCode>
|
||||
<FileName>NetworkCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryDefaultRoute" Collapsed="true">
|
||||
<Position X="99.5" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAEAAAAAAAAAAAgAABAAAAAAAAAAAAAAAEAAAEA=</HashCode>
|
||||
<FileName>NetworkCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.SetDefaultRoute" Collapsed="true">
|
||||
<Position X="101.75" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAEAAAAAAAAAAAgAABBAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>NetworkCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryMACAddress" Collapsed="true">
|
||||
<Position X="104" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABAAAAAAAACAAAAAAEAAAEA=</HashCode>
|
||||
<FileName>NetworkCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.SetMACAddress" Collapsed="true">
|
||||
<Position X="106.25" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABBAAAAAAACAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>NetworkCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.PowerCommands" Collapsed="true">
|
||||
<Position X="116.25" Y="2" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAABBAAAAAAAAAAAAAAAAAAEA=</HashCode>
|
||||
<FileName>PowerCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryV1VoltageMV" Collapsed="true">
|
||||
<Position X="110.75" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABAAAAAAAAAAAAAAIEAAAEA=</HashCode>
|
||||
<FileName>PowerCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryBatteryVoltageMV" Collapsed="true">
|
||||
<Position X="113" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAIAAAAAAAAAAAABAAAAAAAAAAAAAAAEAAAEA=</HashCode>
|
||||
<FileName>PowerCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryBatteryChargeCurrentMA" Collapsed="true">
|
||||
<Position X="115.25" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABAAAAAAAAAAAAAAAEAAAFA=</HashCode>
|
||||
<FileName>PowerCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QuerySliceBusInputCurrentMA" Collapsed="true">
|
||||
<Position X="117.5" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>gAAAAAAAAAAAAAAAAAgAABAAAAAAAAAAAAAAAEAAAEA=</HashCode>
|
||||
<FileName>PowerCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QuerySliceBusVoltageMV" Collapsed="true">
|
||||
<Position X="119.75" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABAAAAAAAAAAAAAAAEAACEA=</HashCode>
|
||||
<FileName>PowerCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.SetSliceBusVoltageMV" Collapsed="true">
|
||||
<Position X="122" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABBAAAAAAAAAAAAAAAAACAA=</HashCode>
|
||||
<FileName>PowerCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Font Name="Segoe UI" Size="9" />
|
||||
</ClassDiagram>
|
||||
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Reflection;
|
||||
using System.IO;
|
||||
using System.Diagnostics;
|
||||
using DTS.Common.ICommunication;
|
||||
|
||||
namespace DTS.DASLib.Command.SLICEDB
|
||||
{
|
||||
public abstract class CommandBase : SliceCommandBase
|
||||
{
|
||||
public CommandBase(DTS.Common.Interface.DASFactory.ICommunication sock) : base(sock)
|
||||
{
|
||||
command = new CommandPacket();
|
||||
}
|
||||
|
||||
public CommandBase(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec) : base(sock, TimeoutMillisec)
|
||||
{
|
||||
command = new CommandPacket();
|
||||
}
|
||||
|
||||
protected override CommandPacketBase GetCommandPacket()
|
||||
{
|
||||
return new CommandPacket();
|
||||
}
|
||||
protected override CommandPacketBase GetCommandPacket(byte[] buffer)
|
||||
{
|
||||
return new CommandPacket(buffer);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,403 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using DTS.Common.Enums.DASFactory;
|
||||
using DTS.Common.ICommunication;
|
||||
|
||||
namespace DTS.DASLib.Command.SLICEDB
|
||||
{
|
||||
public abstract class NetworkCommands : CommandBase
|
||||
{
|
||||
protected enum Commands
|
||||
{
|
||||
Reserved = 0x00,
|
||||
QueryIPAddress = 0x01,
|
||||
SetIPAddress = 0x02,
|
||||
QueryNetmask = 0x03,
|
||||
SetNetmask = 0x04,
|
||||
QueryDefaultRoute = 0x05,
|
||||
SetDefaultRoute = 0x06,
|
||||
QueryMACAddress = 0x07,
|
||||
SetMACAddress = 0x08,
|
||||
};
|
||||
protected abstract Commands _Command { get; }
|
||||
|
||||
protected NetworkCommands(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
command.Type = CommandPacket.CommandType.Network;
|
||||
command.SetCommand((byte)_Command, _Command.ToString());
|
||||
}
|
||||
|
||||
protected NetworkCommands(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
command.Type = CommandPacket.CommandType.Network;
|
||||
command.SetCommand((byte)_Command, _Command.ToString());
|
||||
}
|
||||
|
||||
public override void CommandToString(ref List<List<string>> list)
|
||||
{
|
||||
base.CommandToString(ref list);
|
||||
list[0].Add(recorder.ConnectString);
|
||||
}
|
||||
public override void ResponseToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.ResponseToString(ref lines);
|
||||
lines[0].Add(recorder.ConnectString);
|
||||
}
|
||||
}
|
||||
|
||||
public class QueryIPAddress : NetworkCommands
|
||||
{
|
||||
protected override NetworkCommands.Commands _Command
|
||||
{
|
||||
get { return Commands.QueryIPAddress; }
|
||||
}
|
||||
public QueryIPAddress(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public QueryIPAddress(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private string _val;
|
||||
|
||||
/// <summary>
|
||||
/// The current IP address of the SLICE DB
|
||||
/// </summary>
|
||||
public string IPAddress
|
||||
{
|
||||
get { return _val; }
|
||||
}
|
||||
|
||||
protected override CommandReceiveAction WholePackage()
|
||||
{
|
||||
if (response.Status == DFConstantsAndEnums.CommandStatus.StatusNoError)
|
||||
{
|
||||
response.GetParameter(0, out _val);
|
||||
}
|
||||
else
|
||||
{
|
||||
_val = string.Empty;
|
||||
}
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
}
|
||||
|
||||
public override void ResponseToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.ResponseToString(ref lines);
|
||||
lines.Add(new List<string>()
|
||||
{
|
||||
string.Format("IP Address: {0}", IPAddress)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public class SetIPAddress : NetworkCommands
|
||||
{
|
||||
protected override NetworkCommands.Commands _Command
|
||||
{
|
||||
get { return Commands.SetIPAddress; }
|
||||
}
|
||||
public SetIPAddress(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public SetIPAddress(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private string _val;
|
||||
|
||||
/// <summary>
|
||||
/// The current IP address of the SLICE DB
|
||||
/// </summary>
|
||||
public string IPAddress
|
||||
{
|
||||
get { return _val; }
|
||||
set
|
||||
{
|
||||
_val = value;
|
||||
command.Parameter = new byte[_val.Length + 1];
|
||||
command.SetParameter(0, _val);
|
||||
}
|
||||
}
|
||||
|
||||
public override void CommandToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.CommandToString(ref lines);
|
||||
lines.Add(new List<string>() { string.Format("IP Address: {0}", IPAddress) });
|
||||
}
|
||||
}
|
||||
|
||||
public class QueryNetmask : NetworkCommands
|
||||
{
|
||||
protected override NetworkCommands.Commands _Command
|
||||
{
|
||||
get { return Commands.QueryNetmask; }
|
||||
}
|
||||
public QueryNetmask(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public QueryNetmask(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private string _val;
|
||||
|
||||
/// <summary>
|
||||
/// The current netmask of the SLICE DB
|
||||
/// </summary>
|
||||
public string Netmask
|
||||
{
|
||||
get { return _val; }
|
||||
}
|
||||
|
||||
protected override CommandReceiveAction WholePackage()
|
||||
{
|
||||
if (response.Status == DFConstantsAndEnums.CommandStatus.StatusNoError)
|
||||
{
|
||||
response.GetParameter(0, out _val);
|
||||
}
|
||||
else
|
||||
{
|
||||
_val = string.Empty;
|
||||
}
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
}
|
||||
|
||||
public override void ResponseToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.ResponseToString(ref lines);
|
||||
lines.Add(new List<string>()
|
||||
{
|
||||
string.Format("Netmask: {0}", Netmask)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public class SetNetmask : NetworkCommands
|
||||
{
|
||||
protected override NetworkCommands.Commands _Command
|
||||
{
|
||||
get { return Commands.SetNetmask; }
|
||||
}
|
||||
public SetNetmask(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public SetNetmask(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private string _val;
|
||||
|
||||
/// <summary>
|
||||
/// The current netmask of the SLICE DB
|
||||
/// </summary>
|
||||
public string Netmask
|
||||
{
|
||||
get { return _val; }
|
||||
set
|
||||
{
|
||||
_val = value;
|
||||
command.Parameter = new byte[_val.Length + 1];
|
||||
command.SetParameter(0, _val);
|
||||
}
|
||||
}
|
||||
|
||||
public override void CommandToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.CommandToString(ref lines);
|
||||
lines.Add(new List<string>() { string.Format("Netmask: {0}", Netmask) });
|
||||
}
|
||||
}
|
||||
|
||||
public class QueryDefaultRoute : NetworkCommands
|
||||
{
|
||||
protected override NetworkCommands.Commands _Command
|
||||
{
|
||||
get { return Commands.QueryDefaultRoute; }
|
||||
}
|
||||
|
||||
public QueryDefaultRoute(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public QueryDefaultRoute(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private string _val;
|
||||
|
||||
/// <summary>
|
||||
/// The current default route of the SLICE DB
|
||||
/// </summary>
|
||||
public string DefaultRoute
|
||||
{
|
||||
get { return _val; }
|
||||
}
|
||||
|
||||
protected override CommandReceiveAction WholePackage()
|
||||
{
|
||||
if (response.Status == DFConstantsAndEnums.CommandStatus.StatusNoError)
|
||||
{
|
||||
response.GetParameter(0, out _val);
|
||||
}
|
||||
else
|
||||
{
|
||||
_val = string.Empty;
|
||||
}
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
}
|
||||
|
||||
public override void ResponseToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.ResponseToString(ref lines);
|
||||
lines.Add(new List<string>()
|
||||
{
|
||||
string.Format("Default route: {0}", DefaultRoute)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public class SetDefaultRoute : NetworkCommands
|
||||
{
|
||||
protected override NetworkCommands.Commands _Command
|
||||
{
|
||||
get { return Commands.SetDefaultRoute; }
|
||||
}
|
||||
public SetDefaultRoute(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public SetDefaultRoute(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private string _val;
|
||||
|
||||
/// <summary>
|
||||
/// The current default route of the SLICE DB
|
||||
/// </summary>
|
||||
public string DefaultRoute
|
||||
{
|
||||
get { return _val; }
|
||||
set
|
||||
{
|
||||
_val = value;
|
||||
command.Parameter = new byte[_val.Length + 1];
|
||||
command.SetParameter(0, _val);
|
||||
}
|
||||
}
|
||||
|
||||
public override void CommandToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.CommandToString(ref lines);
|
||||
lines.Add(new List<string>() { string.Format("Default route: {0}", DefaultRoute) });
|
||||
}
|
||||
}
|
||||
|
||||
public class QueryMACAddress : NetworkCommands
|
||||
{
|
||||
protected override NetworkCommands.Commands _Command
|
||||
{
|
||||
get { return Commands.QueryMACAddress; }
|
||||
}
|
||||
public QueryMACAddress(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public QueryMACAddress(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private string _val;
|
||||
|
||||
/// <summary>
|
||||
/// The current MAC address (Ethernet hardware address) of the SLICE DB
|
||||
/// </summary>
|
||||
public string MACAddress
|
||||
{
|
||||
get { return _val; }
|
||||
}
|
||||
|
||||
protected override CommandReceiveAction WholePackage()
|
||||
{
|
||||
if (response.Status == DFConstantsAndEnums.CommandStatus.StatusNoError)
|
||||
{
|
||||
response.GetParameter(0, out _val);
|
||||
}
|
||||
else
|
||||
{
|
||||
_val = string.Empty;
|
||||
}
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
}
|
||||
|
||||
public override void ResponseToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.ResponseToString(ref lines);
|
||||
lines.Add(new List<string>()
|
||||
{
|
||||
string.Format("MAC Address: {0}", MACAddress)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public class SetMACAddress : NetworkCommands
|
||||
{
|
||||
protected override NetworkCommands.Commands _Command
|
||||
{
|
||||
get { return Commands.SetMACAddress; }
|
||||
}
|
||||
public SetMACAddress(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public SetMACAddress(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private string _val;
|
||||
|
||||
/// <summary>
|
||||
/// The current MAC address (Ethernet hardware address) of the SLICE DB
|
||||
/// </summary>
|
||||
public string MACAddress
|
||||
{
|
||||
get { return _val; }
|
||||
set
|
||||
{
|
||||
_val = value;
|
||||
command.Parameter = new byte[_val.Length + 1];
|
||||
command.SetParameter(0, _val);
|
||||
}
|
||||
}
|
||||
|
||||
public override void CommandToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.CommandToString(ref lines);
|
||||
lines.Add(new List<string>() { string.Format("MAC Address: {0}", MACAddress) });
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,325 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using DTS.Common.Enums.DASFactory;
|
||||
using DTS.Common.ICommunication;
|
||||
|
||||
namespace DTS.DASLib.Command.SLICEDB
|
||||
{
|
||||
public abstract class PowerCommands : CommandBase
|
||||
{
|
||||
protected enum Commands
|
||||
{
|
||||
Reserved = 0x00,
|
||||
|
||||
QueryV1VoltageMV = 0x01,
|
||||
QueryBatteryVoltageMV = 0x02,
|
||||
QueryBatteryChargeCurrentMA = 0x03,
|
||||
QuerySliceBusInputCurrentMA = 0x04,
|
||||
QuerySliceBusVoltageMV = 0x05,
|
||||
|
||||
SetSliceBusVoltageMV = 0x06,
|
||||
|
||||
QueryMinimumV1MVForSliceBusEnable = 0x07,
|
||||
SetMinimumV1MVForSliceBusEnable = 0x08,
|
||||
QueryMinimumV1MVForBatteryChargeEnable = 0x09,
|
||||
SetMinimumV1MVForBatteryChargeEnable = 0x0A,
|
||||
QueryDefaultSliceBusVoltageMV = 0x0B,
|
||||
SetDefaultSliceBusVoltageMV = 0x0C,
|
||||
QueryDelayBeforeSliceBusVoltageEnableMS = 0x0D,
|
||||
SetDelayBeforeSliceBusVoltageEnableMS = 0x0E,
|
||||
|
||||
QueryV1OvervoltageLimitMV = 0x0F,
|
||||
SetV1OvervoltageLimitMV = 0x10,
|
||||
QueryV1OvervoltageCount = 0x11,
|
||||
SetV1OvervoltageCount = 0x12,
|
||||
|
||||
QueryBatteryVoltageOvervoltageLimitMV = 0x13,
|
||||
SetBattteryVoltageOvervoltageLimitMV = 0x14,
|
||||
QueryBatteryVoltageOvervoltageCount = 0x15,
|
||||
SetBatteryVoltageOvervoltageCount = 0x16,
|
||||
|
||||
QuerySliceBusInputCurrentOvercurrentLimitMA = 0x17,
|
||||
SetSliceBusInputCurrentOvercurrentLimitMA = 0x18,
|
||||
QuerySliceBusInputCurrentOvercurrentCount = 0x19,
|
||||
SetSliceBusInputCurrentOvercurrentCount = 0x1A,
|
||||
|
||||
QueryBatteryChargeCurrentOvercurrentLimitMA = 0x17,
|
||||
SetBatteryChargeCurrentOvercurrentLimitMA = 0x18,
|
||||
QueryBatteryChargeCurrentOvercurrentCount = 0x19,
|
||||
SetBatteryChargeCurrentOvercurrentCount = 0x1A,
|
||||
};
|
||||
protected abstract Commands _Command { get; }
|
||||
|
||||
protected PowerCommands(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
command.Type = CommandPacket.CommandType.Power;
|
||||
command.SetCommand((byte)_Command, _Command.ToString());
|
||||
}
|
||||
|
||||
protected PowerCommands(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
command.Type = CommandPacket.CommandType.Power;
|
||||
command.SetCommand((byte)_Command, _Command.ToString());
|
||||
}
|
||||
public override void CommandToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.CommandToString(ref lines);
|
||||
lines[0].Add(recorder.ConnectString);
|
||||
}
|
||||
public override void ResponseToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.ResponseToString(ref lines);
|
||||
lines[0].Add(recorder.ConnectString);
|
||||
}
|
||||
}
|
||||
|
||||
public class QueryV1VoltageMV : PowerCommands
|
||||
{
|
||||
protected override Commands _Command => Commands.QueryV1VoltageMV;
|
||||
|
||||
public QueryV1VoltageMV(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public QueryV1VoltageMV(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private uint _val;
|
||||
|
||||
/// <summary>
|
||||
/// The input voltage (+V1 on connector P1) in millivolts
|
||||
/// </summary>
|
||||
public uint V1VoltageMV => _val;
|
||||
|
||||
protected override CommandReceiveAction WholePackage()
|
||||
{
|
||||
_val = 0;
|
||||
if (response.Status != DFConstantsAndEnums.CommandStatus.StatusNoError)
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
response.GetParameter(0, out uint uVal);
|
||||
_val = uVal;
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
}
|
||||
|
||||
public override void ResponseToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.ResponseToString(ref lines);
|
||||
lines.Add(new List<string>
|
||||
{
|
||||
$"+V1 (mV): {V1VoltageMV}"
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public class QueryBatteryVoltageMV : PowerCommands
|
||||
{
|
||||
protected override Commands _Command => Commands.QueryBatteryVoltageMV;
|
||||
|
||||
public QueryBatteryVoltageMV(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.QueryBatteryVoltage);
|
||||
}
|
||||
|
||||
public QueryBatteryVoltageMV(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.QueryBatteryVoltage);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The battery voltage (+BAT on connector J1) in millivolts
|
||||
/// </summary>
|
||||
public uint BatteryVoltageMV { get; private set; }
|
||||
|
||||
protected override CommandReceiveAction WholePackage()
|
||||
{
|
||||
BatteryVoltageMV = 0;
|
||||
if (response.Status != DFConstantsAndEnums.CommandStatus.StatusNoError)
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
uint uVal;
|
||||
response.GetParameter(0, out uVal);
|
||||
BatteryVoltageMV = uVal;
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
}
|
||||
|
||||
public override void ResponseToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.ResponseToString(ref lines);
|
||||
lines.Add(new List<string>
|
||||
{
|
||||
$"+BAT (mV): {BatteryVoltageMV}"
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public class QueryBatteryChargeCurrentMA : PowerCommands
|
||||
{
|
||||
protected override Commands _Command => Commands.QueryBatteryChargeCurrentMA;
|
||||
|
||||
public QueryBatteryChargeCurrentMA(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public QueryBatteryChargeCurrentMA(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private uint _val;
|
||||
|
||||
/// <summary>
|
||||
/// The battery charge current in milliamps
|
||||
/// </summary>
|
||||
public uint BatteryChargeCurrentMA => _val;
|
||||
|
||||
protected override CommandReceiveAction WholePackage()
|
||||
{
|
||||
_val = 0;
|
||||
if (response.Status == DFConstantsAndEnums.CommandStatus.StatusNoError)
|
||||
{
|
||||
uint uVal;
|
||||
response.GetParameter(0, out uVal);
|
||||
_val = uVal;
|
||||
}
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
}
|
||||
|
||||
public override void ResponseToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.ResponseToString(ref lines);
|
||||
lines.Add(new List<string>
|
||||
{
|
||||
$"Battery Charge Current (mA): {BatteryChargeCurrentMA}"
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public class QuerySliceBusInputCurrentMA : PowerCommands
|
||||
{
|
||||
protected override Commands _Command => Commands.QuerySliceBusInputCurrentMA;
|
||||
|
||||
public QuerySliceBusInputCurrentMA(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public QuerySliceBusInputCurrentMA(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private uint _val;
|
||||
|
||||
/// <summary>
|
||||
/// The slice bus current in milliamps
|
||||
/// </summary>
|
||||
public uint SliceBusInputCurrentMA => _val;
|
||||
|
||||
protected override CommandReceiveAction WholePackage()
|
||||
{
|
||||
_val = 0;
|
||||
if (response.Status != DFConstantsAndEnums.CommandStatus.StatusNoError)
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
uint uVal;
|
||||
response.GetParameter(0, out uVal);
|
||||
_val = uVal;
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
}
|
||||
|
||||
public override void ResponseToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.ResponseToString(ref lines);
|
||||
lines.Add(new List<string>
|
||||
{
|
||||
$"SLICE Bus Current (mA): {SliceBusInputCurrentMA}"
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public class QuerySliceBusVoltageMV : PowerCommands
|
||||
{
|
||||
protected override Commands _Command => Commands.QuerySliceBusVoltageMV;
|
||||
|
||||
public QuerySliceBusVoltageMV(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public QuerySliceBusVoltageMV(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private uint _val;
|
||||
|
||||
/// <summary>
|
||||
/// The slice bus voltage in millivolts
|
||||
/// </summary>
|
||||
public uint SliceBusVoltageMV => _val;
|
||||
|
||||
protected override CommandReceiveAction WholePackage()
|
||||
{
|
||||
_val = 0;
|
||||
if (response.Status != DFConstantsAndEnums.CommandStatus.StatusNoError)
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
uint uVal;
|
||||
response.GetParameter(0, out uVal);
|
||||
_val = uVal;
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
}
|
||||
|
||||
public override void ResponseToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.ResponseToString(ref lines);
|
||||
lines.Add(new List<string>
|
||||
{
|
||||
$"SLICE Bus voltage (mV): {SliceBusVoltageMV}"
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public class SetSliceBusVoltageMV : PowerCommands
|
||||
{
|
||||
protected override Commands _Command => Commands.SetSliceBusVoltageMV;
|
||||
|
||||
public SetSliceBusVoltageMV(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public SetSliceBusVoltageMV(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private uint _val;
|
||||
|
||||
/// <summary>
|
||||
/// The slice bus voltage in millivolts
|
||||
/// </summary>
|
||||
public uint SliceBusVoltageMV
|
||||
{
|
||||
|
||||
set
|
||||
{
|
||||
_val = value;
|
||||
command.Parameter = new byte[sizeof(uint)];
|
||||
command.SetParameter(0, _val);
|
||||
}
|
||||
get => _val;
|
||||
}
|
||||
|
||||
public override void CommandToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.CommandToString(ref lines);
|
||||
lines.Add(new List<string> { string.Format("SLICE Bus voltage (mV): {0}", SliceBusVoltageMV) });
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("SliceDBCommands")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("SliceDBCommands")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2009")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("9138a993-9a7e-4cf7-9749-fc4d737101f7")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.06.0081")]
|
||||
[assembly: AssemblyFileVersion("1.06.0081")]
|
||||
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace DTS.DASLib.Command.SLICEDB
|
||||
{
|
||||
public class CommandPacket : SliceCommandPacketBase
|
||||
{
|
||||
public enum CommandType
|
||||
{
|
||||
Reserved = 0x00,
|
||||
Diagnostics,
|
||||
GPIO,
|
||||
Information,
|
||||
Network,
|
||||
Power,
|
||||
Arm,
|
||||
};
|
||||
|
||||
private static UInt16 GlobalSequenceNumber = 0;
|
||||
private static object GlobalSequenceNumberLock = new object();
|
||||
|
||||
public CommandPacket() { }
|
||||
|
||||
public override void GetNextSequenceNumber()
|
||||
{
|
||||
lock (GlobalSequenceNumberLock)
|
||||
{
|
||||
SequenceNumber = GlobalSequenceNumber;
|
||||
GlobalSequenceNumber++;
|
||||
}
|
||||
}
|
||||
|
||||
public CommandPacket(byte[] Bytes) : base(Bytes) { }
|
||||
|
||||
public override object ConvertByteToCommandType(byte b)
|
||||
{
|
||||
return (CommandType)b;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using DTS.Common.ICommunication;
|
||||
|
||||
namespace DTS.DASLib.Command.SLICEDB
|
||||
{
|
||||
public abstract class DiagnosticsCommands : CommandBase
|
||||
{
|
||||
public enum Measurements
|
||||
{
|
||||
V1,
|
||||
BatteryVoltage,
|
||||
BatteryChargeCurrent,
|
||||
SliceBusCurrent,
|
||||
SliceBusVoltage
|
||||
}
|
||||
|
||||
protected enum Commands
|
||||
{
|
||||
Reserved = 0x00,
|
||||
|
||||
QueryOffset = 0x01,
|
||||
SetOffset = 0x02,
|
||||
QueryMultiplier = 0x03,
|
||||
SetMultiplier = 0x04,
|
||||
};
|
||||
|
||||
protected DiagnosticsCommands(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
command.Type = CommandPacket.CommandType.Diagnostics;
|
||||
}
|
||||
|
||||
protected DiagnosticsCommands(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
command.Type = CommandPacket.CommandType.Diagnostics;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
public class QueryOffset : DiagnosticsCommands
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class SetOffset : DiagnosticsCommands
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class QueryMultiplier : DiagnosticsCommands
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class SetMultiplier : DiagnosticsCommands
|
||||
{
|
||||
|
||||
}
|
||||
*/
|
||||
}
|
||||
@@ -0,0 +1,317 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using DTS.Common.Enums.DASFactory;
|
||||
using DTS.Common.ICommunication;
|
||||
|
||||
namespace DTS.DASLib.Command.SLICEDB
|
||||
{
|
||||
public abstract class ArmCommands : CommandBase
|
||||
{
|
||||
protected enum Commands
|
||||
{
|
||||
arm_reserved = 0x00,
|
||||
arm_arm = 0x01,
|
||||
arm_disarm = 0x02,
|
||||
arm_enablefaultchecking = 0x03,
|
||||
arm_disablefaultchecking = 0x04,
|
||||
arm_setinverttriggerpolarity = 0x05,
|
||||
arm_setinvertstartpolarity = 0x06,
|
||||
arm_setrecordingmode = 0x07,
|
||||
arm_setpretriggersec = 0x08,
|
||||
arm_setposttriggersec = 0x09,
|
||||
arm_setmaxevent = 0x0A,
|
||||
arm_setonoverride = 0x0B,
|
||||
};
|
||||
|
||||
protected abstract Commands _Command { get; }
|
||||
|
||||
protected ArmCommands(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
command.Type = CommandPacket.CommandType.Arm;
|
||||
command.SetCommand((byte)_Command, _Command.ToString());
|
||||
}
|
||||
|
||||
protected ArmCommands(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
command.Type = CommandPacket.CommandType.Arm;
|
||||
command.SetCommand((byte)_Command, _Command.ToString());
|
||||
}
|
||||
|
||||
public override void CommandToString(ref List<List<string>> list)
|
||||
{
|
||||
base.CommandToString(ref list);
|
||||
if (null != recorder)
|
||||
{
|
||||
list[0].Add(recorder.SerialNumber);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public class Arm : ArmCommands
|
||||
{
|
||||
protected override Commands _Command => Commands.arm_arm;
|
||||
public Arm(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.Arm);
|
||||
}
|
||||
|
||||
public Arm(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.Arm);
|
||||
}
|
||||
|
||||
public override void CommandToString(ref List<List<string>> list)
|
||||
{
|
||||
base.CommandToString(ref list);
|
||||
list.Add(new List<string>() { string.Format("Arm") });
|
||||
}
|
||||
|
||||
}
|
||||
public class Disarm : ArmCommands
|
||||
{
|
||||
protected override Commands _Command => Commands.arm_disarm;
|
||||
public Disarm(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.Arm);
|
||||
}
|
||||
|
||||
public Disarm(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.Arm);
|
||||
}
|
||||
|
||||
public override void CommandToString(ref List<List<string>> list)
|
||||
{
|
||||
base.CommandToString(ref list);
|
||||
list.Add(new List<string>() { string.Format("Disarm") });
|
||||
}
|
||||
|
||||
}
|
||||
public class EnableFaultChecking : ArmCommands
|
||||
{
|
||||
protected override Commands _Command => Commands.arm_enablefaultchecking;
|
||||
public EnableFaultChecking(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.EnableFaultChecking);
|
||||
}
|
||||
|
||||
public EnableFaultChecking(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.EnableFaultChecking);
|
||||
}
|
||||
|
||||
public override void CommandToString(ref List<List<string>> list)
|
||||
{
|
||||
base.CommandToString(ref list);
|
||||
list.Add(new List<string>() { string.Format("EnableFaultChecking") });
|
||||
}
|
||||
|
||||
}
|
||||
public class DisableFaultChecking : ArmCommands
|
||||
{
|
||||
protected override Commands _Command => Commands.arm_disablefaultchecking;
|
||||
public DisableFaultChecking(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.EnableFaultChecking);
|
||||
}
|
||||
|
||||
public DisableFaultChecking(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.EnableFaultChecking);
|
||||
}
|
||||
|
||||
public override void CommandToString(ref List<List<string>> list)
|
||||
{
|
||||
base.CommandToString(ref list);
|
||||
list.Add(new List<string>() { string.Format("DisableFaultChecking") });
|
||||
}
|
||||
|
||||
}
|
||||
public class SetRecordingMode : ArmCommands
|
||||
{
|
||||
protected override Commands _Command => Commands.arm_setrecordingmode;
|
||||
public SetRecordingMode(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.Arm);
|
||||
}
|
||||
|
||||
public SetRecordingMode(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.Arm);
|
||||
}
|
||||
|
||||
private byte _val;
|
||||
|
||||
/// <summary>
|
||||
/// The current Dat0 reg of the SLICE DB
|
||||
/// </summary>
|
||||
public byte Value
|
||||
{
|
||||
get => _val;
|
||||
set
|
||||
{
|
||||
const int ParameterLength = 1;
|
||||
const int ValuePosition = 0;
|
||||
_val = value;
|
||||
command.Parameter = new byte[ParameterLength];
|
||||
command.SetParameter(ValuePosition, _val);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public override void CommandToString(ref List<List<string>> list)
|
||||
{
|
||||
base.CommandToString(ref list);
|
||||
list.Add(new List<string>() { string.Format("SetRecordingMode {0}", Value) });
|
||||
}
|
||||
|
||||
}
|
||||
public class SetPostTriggerSec : ArmCommands
|
||||
{
|
||||
protected override Commands _Command => Commands.arm_setposttriggersec;
|
||||
public SetPostTriggerSec(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.Arm);
|
||||
}
|
||||
|
||||
public SetPostTriggerSec(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.Arm);
|
||||
}
|
||||
|
||||
private float _val;
|
||||
|
||||
/// <summary>
|
||||
/// The current Dat0 reg of the SLICE DB
|
||||
/// </summary>
|
||||
public float Value
|
||||
{
|
||||
get => _val;
|
||||
set
|
||||
{
|
||||
_val = value;
|
||||
command.Parameter = new byte[sizeof(float)];
|
||||
command.SetParameter(0, _val);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public override void CommandToString(ref List<List<string>> list)
|
||||
{
|
||||
base.CommandToString(ref list);
|
||||
list.Add(new List<string>() { string.Format("SetPostTriggerSec {0}", _val) });
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class SetONOverride : ArmCommands
|
||||
{
|
||||
protected override Commands _Command => Commands.arm_setonoverride;
|
||||
public SetONOverride(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.OnOverride);
|
||||
}
|
||||
|
||||
public SetONOverride(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.OnOverride);
|
||||
}
|
||||
|
||||
private byte _val;
|
||||
|
||||
/// <summary>
|
||||
/// The current StatusLED reg of the SLICE DB
|
||||
/// </summary>
|
||||
public bool Value
|
||||
{
|
||||
get => Convert.ToBoolean(_val);
|
||||
set
|
||||
{
|
||||
_val = Convert.ToByte(value);
|
||||
command.Parameter = new byte[sizeof(byte)];
|
||||
command.SetParameter(0, _val);
|
||||
}
|
||||
}
|
||||
}
|
||||
public class SetInvertTriggerPolarity : ArmCommands
|
||||
{
|
||||
protected override Commands _Command => Commands.arm_setinverttriggerpolarity;
|
||||
public SetInvertTriggerPolarity(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.Arm);
|
||||
}
|
||||
|
||||
public SetInvertTriggerPolarity(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.Arm);
|
||||
}
|
||||
|
||||
private byte _val;
|
||||
|
||||
/// <summary>
|
||||
/// value for the invert trigger
|
||||
/// </summary>
|
||||
public bool Value
|
||||
{
|
||||
get => Convert.ToBoolean(_val);
|
||||
set
|
||||
{
|
||||
_val = Convert.ToByte(value);
|
||||
command.Parameter = new byte[sizeof(byte)];
|
||||
command.SetParameter(0, _val);
|
||||
}
|
||||
}
|
||||
}
|
||||
public class SetInvertStartPolarity : ArmCommands
|
||||
{
|
||||
protected override Commands _Command => Commands.arm_setinvertstartpolarity;
|
||||
public SetInvertStartPolarity(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.Arm);
|
||||
}
|
||||
|
||||
public SetInvertStartPolarity(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.Arm);
|
||||
}
|
||||
|
||||
private byte _val;
|
||||
|
||||
/// <summary>
|
||||
/// value of invert start
|
||||
/// </summary>
|
||||
public bool Value
|
||||
{
|
||||
get => Convert.ToBoolean(_val);
|
||||
set
|
||||
{
|
||||
_val = Convert.ToByte(value);
|
||||
command.Parameter = new byte[sizeof(byte)];
|
||||
command.SetParameter(0, _val);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,534 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using DTS.Common.Enums.DASFactory;
|
||||
using DTS.Common.ICommunication;
|
||||
using DTS.Common.Interface.DASFactory;
|
||||
|
||||
namespace DTS.DASLib.Command.SLICEDB
|
||||
{
|
||||
public abstract class InformationCommands : CommandBase
|
||||
{
|
||||
protected enum Commands
|
||||
{
|
||||
Reserved = 0x00,
|
||||
QuerySerialNumber = 0x01,
|
||||
SetSerialNumber = 0x02,
|
||||
QueryFirmwareVersion = 0x03,
|
||||
QueryTime = 0x04,
|
||||
SetTime = 0x05,
|
||||
QueryDebugLevel = 0x06,
|
||||
SetDebugLevel = 0x07,
|
||||
QueryKernelVersion = 0x08,
|
||||
QueryMSPFirmwareVersion = 0x09,
|
||||
QueryProtocolVersion = 0x0A,
|
||||
QueryCalibrationDaysSince1970_01_01 = 0x0F,
|
||||
SetCalibrationDaysSince1970_01_01 = 0x10,
|
||||
};
|
||||
|
||||
protected abstract Commands _Command { get; }
|
||||
|
||||
protected InformationCommands(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
command.Type = CommandPacket.CommandType.Information;
|
||||
command.SetCommand((byte)_Command, _Command.ToString());
|
||||
}
|
||||
|
||||
protected InformationCommands(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
command.Type = CommandPacket.CommandType.Information;
|
||||
command.SetCommand((byte)_Command, _Command.ToString());
|
||||
}
|
||||
|
||||
public override void CommandToString(ref List<List<string>> list)
|
||||
{
|
||||
base.CommandToString(ref list);
|
||||
if (null != recorder)
|
||||
{
|
||||
list[0].Add(recorder.SerialNumber);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class QuerySerialNumber : InformationCommands
|
||||
{
|
||||
protected override InformationCommands.Commands _Command
|
||||
{
|
||||
get { return Commands.QuerySerialNumber; }
|
||||
}
|
||||
public QuerySerialNumber(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public QuerySerialNumber(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private string _value;
|
||||
|
||||
/// <summary>
|
||||
/// The serial number of the SLICE DB
|
||||
/// </summary>
|
||||
public string SerialNumber
|
||||
{
|
||||
get { return _value; }
|
||||
}
|
||||
|
||||
protected override CommandReceiveAction WholePackage()
|
||||
{
|
||||
if (response.Status == DFConstantsAndEnums.CommandStatus.StatusNoError)
|
||||
{
|
||||
response.GetParameter(0, out _value);
|
||||
}
|
||||
else
|
||||
{
|
||||
_value = string.Empty;
|
||||
}
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
}
|
||||
|
||||
public override void ResponseToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.ResponseToString(ref lines);
|
||||
lines.Add(new List<string>()
|
||||
{
|
||||
string.Format("Serial Number: {0}", SerialNumber)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public class SetSerialNumber : InformationCommands
|
||||
{
|
||||
protected override InformationCommands.Commands _Command
|
||||
{
|
||||
get { return Commands.SetSerialNumber; }
|
||||
}
|
||||
public SetSerialNumber(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public SetSerialNumber(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private string _value;
|
||||
|
||||
/// <summary>
|
||||
/// The serial number of the SLICE DB
|
||||
/// </summary>
|
||||
public string SerialNumber
|
||||
{
|
||||
get { return _value; }
|
||||
set
|
||||
{
|
||||
_value = value;
|
||||
// Allocate parameter array (+1 for terminating null)
|
||||
command.Parameter = new byte[value.Length + 1];
|
||||
command.SetParameter(0, value);
|
||||
}
|
||||
}
|
||||
|
||||
public override void CommandToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.CommandToString(ref lines);
|
||||
lines.Add(new List<string>() { string.Format("Serial Number: {0}", SerialNumber) });
|
||||
}
|
||||
|
||||
}
|
||||
public class SetCalibrationDaysSince1970_01_01 : InformationCommands
|
||||
{
|
||||
protected override InformationCommands.Commands _Command
|
||||
{
|
||||
get { return Commands.SetCalibrationDaysSince1970_01_01; }
|
||||
}
|
||||
public SetCalibrationDaysSince1970_01_01(ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public SetCalibrationDaysSince1970_01_01(ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private string _value;
|
||||
|
||||
/// <summary>
|
||||
/// The serial number of the SLICE DB
|
||||
/// </summary>
|
||||
public string CalibrationDaysSince1970_01_01
|
||||
{
|
||||
get { return _value; }
|
||||
set
|
||||
{
|
||||
_value = value;
|
||||
// Allocate parameter array (+1 for terminating null)
|
||||
command.Parameter = new byte[value.Length + 1];
|
||||
command.SetParameter(0, value);
|
||||
}
|
||||
}
|
||||
|
||||
public override void CommandToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.CommandToString(ref lines);
|
||||
lines.Add(new List<string>() { string.Format("CalibrationDaysSince1970_01_01: {0}", CalibrationDaysSince1970_01_01) });
|
||||
}
|
||||
|
||||
}
|
||||
public class QueryFirmwareVersion : InformationCommands
|
||||
{
|
||||
protected override InformationCommands.Commands _Command
|
||||
{
|
||||
get { return Commands.QueryFirmwareVersion; }
|
||||
}
|
||||
|
||||
public QueryFirmwareVersion(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public QueryFirmwareVersion(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private string _value;
|
||||
|
||||
/// <summary>
|
||||
/// The current firmware version of the SLICE DB.
|
||||
/// </summary>
|
||||
public string FirmwareVersion
|
||||
{
|
||||
get { return _value; }
|
||||
}
|
||||
|
||||
protected override CommandReceiveAction WholePackage()
|
||||
{
|
||||
if (response.Status == DFConstantsAndEnums.CommandStatus.StatusNoError)
|
||||
{
|
||||
response.GetParameter(0, out _value);
|
||||
}
|
||||
else
|
||||
{
|
||||
_value = string.Empty;
|
||||
}
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
}
|
||||
|
||||
public override void ResponseToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.ResponseToString(ref lines);
|
||||
lines.Add(new List<string>()
|
||||
{
|
||||
string.Format("Firmware Version: {0}", FirmwareVersion)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public class QueryTime : InformationCommands
|
||||
{
|
||||
protected override InformationCommands.Commands _Command
|
||||
{
|
||||
get { return Commands.QueryTime; }
|
||||
}
|
||||
|
||||
public QueryTime(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public QueryTime(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private DateTime _value;
|
||||
|
||||
/// <summary>
|
||||
/// The current time according to the SLICE DB.
|
||||
/// </summary>
|
||||
public DateTime CurrentTime
|
||||
{
|
||||
get { return _value; }
|
||||
}
|
||||
|
||||
protected override CommandReceiveAction WholePackage()
|
||||
{
|
||||
_value = new DateTime(1970, 1, 1);
|
||||
if (response.Status == DFConstantsAndEnums.CommandStatus.StatusNoError)
|
||||
{
|
||||
const int SecondsPosition = 0;
|
||||
const int MicrosecondsPosition = 4;
|
||||
UInt32 seconds, microseconds;
|
||||
response.GetParameter(SecondsPosition, out seconds);
|
||||
response.GetParameter(MicrosecondsPosition, out microseconds);
|
||||
_value = _value.AddMilliseconds(microseconds / 1000);
|
||||
_value = _value.AddSeconds(seconds);
|
||||
}
|
||||
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
}
|
||||
|
||||
public override void ResponseToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.ResponseToString(ref lines);
|
||||
lines.Add(new List<string>()
|
||||
{
|
||||
string.Format("Current Time: {0}", CurrentTime.ToLongDateString() + " " + CurrentTime.ToLongTimeString())
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public class SetTime : InformationCommands
|
||||
{
|
||||
protected override InformationCommands.Commands _Command
|
||||
{
|
||||
get { return Commands.SetTime; }
|
||||
}
|
||||
public SetTime(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public SetTime(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private DateTime _value;
|
||||
|
||||
/// <summary>
|
||||
/// The current time according to the SLICE DB.
|
||||
/// </summary>
|
||||
public DateTime CurrentTime
|
||||
{
|
||||
get { return _value; }
|
||||
set
|
||||
{
|
||||
const int ParameterLength = 8;
|
||||
const int SecondsPosition = 0;
|
||||
const int MicrosecondsPosition = 4;
|
||||
_value = value;
|
||||
DateTime epoch = new DateTime(1970, 1, 1);
|
||||
TimeSpan sinceEpoch = _value - epoch;
|
||||
double dSecondsSinceEpoch = sinceEpoch.TotalSeconds;
|
||||
UInt32 secondsSinceEpoch = (UInt32)dSecondsSinceEpoch;
|
||||
UInt32 microsecondsSinceEpoch = (UInt32)((dSecondsSinceEpoch - secondsSinceEpoch) * 1000000.0 + 0.5);
|
||||
command.Parameter = new byte[ParameterLength];
|
||||
command.SetParameter(SecondsPosition, secondsSinceEpoch);
|
||||
command.SetParameter(MicrosecondsPosition, microsecondsSinceEpoch);
|
||||
}
|
||||
}
|
||||
|
||||
public override void CommandToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.CommandToString(ref lines);
|
||||
lines.Add(new List<string>() { string.Format("Current Time: {0}", CurrentTime.ToLongDateString() + " " + CurrentTime.ToLongTimeString()) });
|
||||
}
|
||||
}
|
||||
public class QueryProtocolVersion : InformationCommands
|
||||
{
|
||||
protected override InformationCommands.Commands _Command
|
||||
{
|
||||
get { return Commands.QueryProtocolVersion; }
|
||||
}
|
||||
|
||||
public QueryProtocolVersion(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public QueryProtocolVersion(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private byte _value;
|
||||
|
||||
/// <summary>
|
||||
/// The current protocol version of the SLICE DB.
|
||||
/// </summary>
|
||||
public byte ProtocolVersion
|
||||
{
|
||||
get { return _value; }
|
||||
}
|
||||
|
||||
protected override CommandReceiveAction WholePackage()
|
||||
{
|
||||
if (response.Status == DFConstantsAndEnums.CommandStatus.StatusNoError)
|
||||
{
|
||||
response.GetParameter(0, out _value);
|
||||
}
|
||||
else
|
||||
{
|
||||
_value = 0;
|
||||
}
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
}
|
||||
|
||||
public override void ResponseToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.ResponseToString(ref lines);
|
||||
lines.Add(new List<string>()
|
||||
{
|
||||
string.Format("Firmware Version: {0}", ProtocolVersion)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public class QueryKernelVersion : InformationCommands
|
||||
{
|
||||
protected override InformationCommands.Commands _Command
|
||||
{
|
||||
get { return Commands.QueryKernelVersion; }
|
||||
}
|
||||
|
||||
public QueryKernelVersion(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public QueryKernelVersion(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private string _value;
|
||||
|
||||
/// <summary>
|
||||
/// The current Kernel firmware version of the SLICE DB.
|
||||
/// </summary>
|
||||
public string KernelFirmwareVersion
|
||||
{
|
||||
get { return _value; }
|
||||
}
|
||||
|
||||
protected override CommandReceiveAction WholePackage()
|
||||
{
|
||||
if (response.Status == DFConstantsAndEnums.CommandStatus.StatusNoError)
|
||||
{
|
||||
response.GetParameter(0, out _value);
|
||||
}
|
||||
else
|
||||
{
|
||||
_value = string.Empty;
|
||||
}
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
}
|
||||
|
||||
public override void ResponseToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.ResponseToString(ref lines);
|
||||
lines.Add(new List<string>()
|
||||
{
|
||||
string.Format("Firmware Version: {0}", KernelFirmwareVersion)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//FB 16049 Support ECM Cal date query
|
||||
public class QueryCalibrationDaysSince1970_01_01 : InformationCommands
|
||||
{
|
||||
protected override InformationCommands.Commands _Command
|
||||
{
|
||||
get { return Commands.QueryCalibrationDaysSince1970_01_01; }
|
||||
}
|
||||
public QueryCalibrationDaysSince1970_01_01(ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public QueryCalibrationDaysSince1970_01_01(ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private string _value;
|
||||
|
||||
/// <summary>
|
||||
/// The serial number of the SLICE DB
|
||||
/// </summary>
|
||||
public string CalibrationDaysSince1970_01_01
|
||||
{
|
||||
get { return _value; }
|
||||
}
|
||||
|
||||
protected override CommandReceiveAction WholePackage()
|
||||
{
|
||||
if (response.Status == DFConstantsAndEnums.CommandStatus.StatusNoError)
|
||||
{
|
||||
response.GetParameter(0, out _value);
|
||||
}
|
||||
else
|
||||
{
|
||||
_value = string.Empty;
|
||||
}
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
}
|
||||
|
||||
public override void ResponseToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.ResponseToString(ref lines);
|
||||
lines.Add(new List<string>()
|
||||
{
|
||||
string.Format("QueryCalibrationDaysSince1970_01_01: {0}", CalibrationDaysSince1970_01_01)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public class QueryMSPFirmwareVersion : InformationCommands
|
||||
{
|
||||
protected override InformationCommands.Commands _Command
|
||||
{
|
||||
get { return Commands.QueryMSPFirmwareVersion; }
|
||||
}
|
||||
|
||||
public QueryMSPFirmwareVersion(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public QueryMSPFirmwareVersion(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private string _value;
|
||||
|
||||
/// <summary>
|
||||
/// The current MSP firmware version of the SLICE DB.
|
||||
/// </summary>
|
||||
public string MSPFirmwareVersion
|
||||
{
|
||||
get { return _value; }
|
||||
}
|
||||
|
||||
protected override CommandReceiveAction WholePackage()
|
||||
{
|
||||
if (response.Status == DFConstantsAndEnums.CommandStatus.StatusNoError)
|
||||
{
|
||||
response.GetParameter(0, out _value);
|
||||
}
|
||||
else
|
||||
{
|
||||
_value = string.Empty;
|
||||
}
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
}
|
||||
|
||||
public override void ResponseToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.ResponseToString(ref lines);
|
||||
lines.Add(new List<string>()
|
||||
{
|
||||
string.Format("Firmware Version: {0}", MSPFirmwareVersion)
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.21022</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{DEA48A0B-999E-48E8-8601-CB05B6B765DE}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>SliceDBCommands</RootNamespace>
|
||||
<AssemblyName>SliceDBCommands</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<OldToolsVersion>3.5</OldToolsVersion>
|
||||
<TargetFrameworkProfile />
|
||||
<SccProjectName>
|
||||
</SccProjectName>
|
||||
<SccLocalPath>
|
||||
</SccLocalPath>
|
||||
<SccAuxPath>
|
||||
</SccAuxPath>
|
||||
<SccProvider>
|
||||
</SccProvider>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ArmCommands.cs" />
|
||||
<Compile Include="CommandBase.cs" />
|
||||
<Compile Include="CommandPacket.cs" />
|
||||
<Compile Include="CalibrationCommands.cs" />
|
||||
<Compile Include="InformationCommands.cs" />
|
||||
<Compile Include="PowerCommands.cs" />
|
||||
<Compile Include="GPIOCommands.cs" />
|
||||
<Compile Include="NetworkCommands.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Common\DTS.Common.ICommunication\DTS.Common.ICommunication.csproj">
|
||||
<Project>{f57b954e-a49a-4110-b36c-b5abab3e230b}</Project>
|
||||
<Name>DTS.Common.ICommunication</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Common\DTS.Common\DTS.Common.csproj">
|
||||
<Project>{F7A0804F-61A4-40AE-83D0-F1137622B592}</Project>
|
||||
<Name>DTS.Common</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\ICommand\ICommand.csproj">
|
||||
<Project>{58E70872-8ACC-4957-BB8E-D3746BCC536D}</Project>
|
||||
<Name>ICommand</Name>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Design\SliceDBCommandsClassDiagram.cd" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
BIN
DataPRO/SLICEDBCommands/.svn/wc.db
Normal file
BIN
DataPRO/SLICEDBCommands/.svn/wc.db
Normal file
Binary file not shown.
0
DataPRO/SLICEDBCommands/.svn/wc.db-journal
Normal file
0
DataPRO/SLICEDBCommands/.svn/wc.db-journal
Normal file
317
DataPRO/SLICEDBCommands/ArmCommands.cs
Normal file
317
DataPRO/SLICEDBCommands/ArmCommands.cs
Normal file
@@ -0,0 +1,317 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using DTS.Common.Enums.DASFactory;
|
||||
using DTS.Common.ICommunication;
|
||||
|
||||
namespace DTS.DASLib.Command.SLICEDB
|
||||
{
|
||||
public abstract class ArmCommands : CommandBase
|
||||
{
|
||||
protected enum Commands
|
||||
{
|
||||
arm_reserved = 0x00,
|
||||
arm_arm = 0x01,
|
||||
arm_disarm = 0x02,
|
||||
arm_enablefaultchecking = 0x03,
|
||||
arm_disablefaultchecking = 0x04,
|
||||
arm_setinverttriggerpolarity = 0x05,
|
||||
arm_setinvertstartpolarity = 0x06,
|
||||
arm_setrecordingmode = 0x07,
|
||||
arm_setpretriggersec = 0x08,
|
||||
arm_setposttriggersec = 0x09,
|
||||
arm_setmaxevent = 0x0A,
|
||||
arm_setonoverride = 0x0B,
|
||||
};
|
||||
|
||||
protected abstract Commands _Command { get; }
|
||||
|
||||
protected ArmCommands(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
command.Type = CommandPacket.CommandType.Arm;
|
||||
command.SetCommand((byte)_Command, _Command.ToString());
|
||||
}
|
||||
|
||||
protected ArmCommands(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
command.Type = CommandPacket.CommandType.Arm;
|
||||
command.SetCommand((byte)_Command, _Command.ToString());
|
||||
}
|
||||
|
||||
public override void CommandToString(ref List<List<string>> list)
|
||||
{
|
||||
base.CommandToString(ref list);
|
||||
if (null != recorder)
|
||||
{
|
||||
list[0].Add(recorder.SerialNumber);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public class Arm : ArmCommands
|
||||
{
|
||||
protected override Commands _Command => Commands.arm_arm;
|
||||
public Arm(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.Arm);
|
||||
}
|
||||
|
||||
public Arm(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.Arm);
|
||||
}
|
||||
|
||||
public override void CommandToString(ref List<List<string>> list)
|
||||
{
|
||||
base.CommandToString(ref list);
|
||||
list.Add(new List<string>() { string.Format("Arm") });
|
||||
}
|
||||
|
||||
}
|
||||
public class Disarm : ArmCommands
|
||||
{
|
||||
protected override Commands _Command => Commands.arm_disarm;
|
||||
public Disarm(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.Arm);
|
||||
}
|
||||
|
||||
public Disarm(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.Arm);
|
||||
}
|
||||
|
||||
public override void CommandToString(ref List<List<string>> list)
|
||||
{
|
||||
base.CommandToString(ref list);
|
||||
list.Add(new List<string>() { string.Format("Disarm") });
|
||||
}
|
||||
|
||||
}
|
||||
public class EnableFaultChecking : ArmCommands
|
||||
{
|
||||
protected override Commands _Command => Commands.arm_enablefaultchecking;
|
||||
public EnableFaultChecking(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.EnableFaultChecking);
|
||||
}
|
||||
|
||||
public EnableFaultChecking(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.EnableFaultChecking);
|
||||
}
|
||||
|
||||
public override void CommandToString(ref List<List<string>> list)
|
||||
{
|
||||
base.CommandToString(ref list);
|
||||
list.Add(new List<string>() { string.Format("EnableFaultChecking") });
|
||||
}
|
||||
|
||||
}
|
||||
public class DisableFaultChecking : ArmCommands
|
||||
{
|
||||
protected override Commands _Command => Commands.arm_disablefaultchecking;
|
||||
public DisableFaultChecking(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.EnableFaultChecking);
|
||||
}
|
||||
|
||||
public DisableFaultChecking(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.EnableFaultChecking);
|
||||
}
|
||||
|
||||
public override void CommandToString(ref List<List<string>> list)
|
||||
{
|
||||
base.CommandToString(ref list);
|
||||
list.Add(new List<string>() { string.Format("DisableFaultChecking") });
|
||||
}
|
||||
|
||||
}
|
||||
public class SetRecordingMode : ArmCommands
|
||||
{
|
||||
protected override Commands _Command => Commands.arm_setrecordingmode;
|
||||
public SetRecordingMode(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.Arm);
|
||||
}
|
||||
|
||||
public SetRecordingMode(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.Arm);
|
||||
}
|
||||
|
||||
private byte _val;
|
||||
|
||||
/// <summary>
|
||||
/// The current Dat0 reg of the SLICE DB
|
||||
/// </summary>
|
||||
public byte Value
|
||||
{
|
||||
get => _val;
|
||||
set
|
||||
{
|
||||
const int ParameterLength = 1;
|
||||
const int ValuePosition = 0;
|
||||
_val = value;
|
||||
command.Parameter = new byte[ParameterLength];
|
||||
command.SetParameter(ValuePosition, _val);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public override void CommandToString(ref List<List<string>> list)
|
||||
{
|
||||
base.CommandToString(ref list);
|
||||
list.Add(new List<string>() { string.Format("SetRecordingMode {0}", Value) });
|
||||
}
|
||||
|
||||
}
|
||||
public class SetPostTriggerSec : ArmCommands
|
||||
{
|
||||
protected override Commands _Command => Commands.arm_setposttriggersec;
|
||||
public SetPostTriggerSec(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.Arm);
|
||||
}
|
||||
|
||||
public SetPostTriggerSec(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.Arm);
|
||||
}
|
||||
|
||||
private float _val;
|
||||
|
||||
/// <summary>
|
||||
/// The current Dat0 reg of the SLICE DB
|
||||
/// </summary>
|
||||
public float Value
|
||||
{
|
||||
get => _val;
|
||||
set
|
||||
{
|
||||
_val = value;
|
||||
command.Parameter = new byte[sizeof(float)];
|
||||
command.SetParameter(0, _val);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public override void CommandToString(ref List<List<string>> list)
|
||||
{
|
||||
base.CommandToString(ref list);
|
||||
list.Add(new List<string>() { string.Format("SetPostTriggerSec {0}", _val) });
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class SetONOverride : ArmCommands
|
||||
{
|
||||
protected override Commands _Command => Commands.arm_setonoverride;
|
||||
public SetONOverride(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.OnOverride);
|
||||
}
|
||||
|
||||
public SetONOverride(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.OnOverride);
|
||||
}
|
||||
|
||||
private byte _val;
|
||||
|
||||
/// <summary>
|
||||
/// The current StatusLED reg of the SLICE DB
|
||||
/// </summary>
|
||||
public bool Value
|
||||
{
|
||||
get => Convert.ToBoolean(_val);
|
||||
set
|
||||
{
|
||||
_val = Convert.ToByte(value);
|
||||
command.Parameter = new byte[sizeof(byte)];
|
||||
command.SetParameter(0, _val);
|
||||
}
|
||||
}
|
||||
}
|
||||
public class SetInvertTriggerPolarity : ArmCommands
|
||||
{
|
||||
protected override Commands _Command => Commands.arm_setinverttriggerpolarity;
|
||||
public SetInvertTriggerPolarity(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.Arm);
|
||||
}
|
||||
|
||||
public SetInvertTriggerPolarity(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.Arm);
|
||||
}
|
||||
|
||||
private byte _val;
|
||||
|
||||
/// <summary>
|
||||
/// value for the invert trigger
|
||||
/// </summary>
|
||||
public bool Value
|
||||
{
|
||||
get => Convert.ToBoolean(_val);
|
||||
set
|
||||
{
|
||||
_val = Convert.ToByte(value);
|
||||
command.Parameter = new byte[sizeof(byte)];
|
||||
command.SetParameter(0, _val);
|
||||
}
|
||||
}
|
||||
}
|
||||
public class SetInvertStartPolarity : ArmCommands
|
||||
{
|
||||
protected override Commands _Command => Commands.arm_setinvertstartpolarity;
|
||||
public SetInvertStartPolarity(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.Arm);
|
||||
}
|
||||
|
||||
public SetInvertStartPolarity(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.Arm);
|
||||
}
|
||||
|
||||
private byte _val;
|
||||
|
||||
/// <summary>
|
||||
/// value of invert start
|
||||
/// </summary>
|
||||
public bool Value
|
||||
{
|
||||
get => Convert.ToBoolean(_val);
|
||||
set
|
||||
{
|
||||
_val = Convert.ToByte(value);
|
||||
command.Parameter = new byte[sizeof(byte)];
|
||||
command.SetParameter(0, _val);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
63
DataPRO/SLICEDBCommands/CalibrationCommands.cs
Normal file
63
DataPRO/SLICEDBCommands/CalibrationCommands.cs
Normal file
@@ -0,0 +1,63 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using DTS.Common.ICommunication;
|
||||
|
||||
namespace DTS.DASLib.Command.SLICEDB
|
||||
{
|
||||
public abstract class DiagnosticsCommands : CommandBase
|
||||
{
|
||||
public enum Measurements
|
||||
{
|
||||
V1,
|
||||
BatteryVoltage,
|
||||
BatteryChargeCurrent,
|
||||
SliceBusCurrent,
|
||||
SliceBusVoltage
|
||||
}
|
||||
|
||||
protected enum Commands
|
||||
{
|
||||
Reserved = 0x00,
|
||||
|
||||
QueryOffset = 0x01,
|
||||
SetOffset = 0x02,
|
||||
QueryMultiplier = 0x03,
|
||||
SetMultiplier = 0x04,
|
||||
};
|
||||
|
||||
protected DiagnosticsCommands(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
command.Type = CommandPacket.CommandType.Diagnostics;
|
||||
}
|
||||
|
||||
protected DiagnosticsCommands(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
command.Type = CommandPacket.CommandType.Diagnostics;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
public class QueryOffset : DiagnosticsCommands
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class SetOffset : DiagnosticsCommands
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class QueryMultiplier : DiagnosticsCommands
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class SetMultiplier : DiagnosticsCommands
|
||||
{
|
||||
|
||||
}
|
||||
*/
|
||||
}
|
||||
34
DataPRO/SLICEDBCommands/CommandBase.cs
Normal file
34
DataPRO/SLICEDBCommands/CommandBase.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Reflection;
|
||||
using System.IO;
|
||||
using System.Diagnostics;
|
||||
using DTS.Common.ICommunication;
|
||||
|
||||
namespace DTS.DASLib.Command.SLICEDB
|
||||
{
|
||||
public abstract class CommandBase : SliceCommandBase
|
||||
{
|
||||
public CommandBase(DTS.Common.Interface.DASFactory.ICommunication sock) : base(sock)
|
||||
{
|
||||
command = new CommandPacket();
|
||||
}
|
||||
|
||||
public CommandBase(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec) : base(sock, TimeoutMillisec)
|
||||
{
|
||||
command = new CommandPacket();
|
||||
}
|
||||
|
||||
protected override CommandPacketBase GetCommandPacket()
|
||||
{
|
||||
return new CommandPacket();
|
||||
}
|
||||
protected override CommandPacketBase GetCommandPacket(byte[] buffer)
|
||||
{
|
||||
return new CommandPacket(buffer);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
41
DataPRO/SLICEDBCommands/CommandPacket.cs
Normal file
41
DataPRO/SLICEDBCommands/CommandPacket.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace DTS.DASLib.Command.SLICEDB
|
||||
{
|
||||
public class CommandPacket : SliceCommandPacketBase
|
||||
{
|
||||
public enum CommandType
|
||||
{
|
||||
Reserved = 0x00,
|
||||
Diagnostics,
|
||||
GPIO,
|
||||
Information,
|
||||
Network,
|
||||
Power,
|
||||
Arm,
|
||||
};
|
||||
|
||||
private static UInt16 GlobalSequenceNumber = 0;
|
||||
private static object GlobalSequenceNumberLock = new object();
|
||||
|
||||
public CommandPacket() { }
|
||||
|
||||
public override void GetNextSequenceNumber()
|
||||
{
|
||||
lock (GlobalSequenceNumberLock)
|
||||
{
|
||||
SequenceNumber = GlobalSequenceNumber;
|
||||
GlobalSequenceNumber++;
|
||||
}
|
||||
}
|
||||
|
||||
public CommandPacket(byte[] Bytes) : base(Bytes) { }
|
||||
|
||||
public override object ConvertByteToCommandType(byte b)
|
||||
{
|
||||
return (CommandType)b;
|
||||
}
|
||||
}
|
||||
}
|
||||
438
DataPRO/SLICEDBCommands/Design/SliceDBCommandsClassDiagram.cd
Normal file
438
DataPRO/SLICEDBCommands/Design/SliceDBCommandsClassDiagram.cd
Normal file
@@ -0,0 +1,438 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ClassDiagram MajorVersion="1" MinorVersion="1">
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.ArmCommands" Collapsed="true">
|
||||
<Position X="9.5" Y="2" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAABBAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>ArmCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.Arm" Collapsed="true">
|
||||
<Position X="2.75" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAABBAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>ArmCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.Disarm" Collapsed="true">
|
||||
<Position X="7.25" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAABBAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>ArmCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.EnableFaultChecking" Collapsed="true">
|
||||
<Position X="9.5" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAABBAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>ArmCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.DisableFaultChecking" Collapsed="true">
|
||||
<Position X="11.75" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAABBAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>ArmCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.SetRecordingMode" Collapsed="true">
|
||||
<Position X="14" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABBAAAAAAAAAAAAgAAAAAAA=</HashCode>
|
||||
<FileName>ArmCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.SetPostTriggerSec" Collapsed="true">
|
||||
<Position X="16.25" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABBAAAAAAAAAAAAgAAAAAAA=</HashCode>
|
||||
<FileName>ArmCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.SetONOverride" Collapsed="true">
|
||||
<Position X="18.5" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABAAAAAAAAAAAAAgAAAAAAA=</HashCode>
|
||||
<FileName>ArmCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.SetInvertTriggerPolarity" Collapsed="true">
|
||||
<Position X="0.5" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABAAAAAAAAAAAAAgAAAAAAA=</HashCode>
|
||||
<FileName>ArmCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.SetInvertStartPolarity" Collapsed="true">
|
||||
<Position X="5" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABAAAAAAAAAAAAAgAAAAAAA=</HashCode>
|
||||
<FileName>ArmCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.DiagnosticsCommands" Collapsed="true">
|
||||
<Position X="20.75" Y="2" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>CalibrationCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.CommandBase" Collapsed="true">
|
||||
<Position X="61.25" Y="0.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAA=</HashCode>
|
||||
<FileName>CommandBase.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.CommandPacket" Collapsed="true">
|
||||
<Position X="124.5" Y="0.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AIAAAAAAAAAAgAAIAAAAAAAAAAAAAAAAAgAAAAAAAAA=</HashCode>
|
||||
<FileName>CommandPacket.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.GPIOCommands" Collapsed="true">
|
||||
<Position X="47.75" Y="2" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.ReadInputRegister" Collapsed="true">
|
||||
<Position X="61.25" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABAAAACAAAAAAAAAAEAAAEA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.ReadDat0Register" Collapsed="true">
|
||||
<Position X="68" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAgAEAAAEA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.ReadDat1Register" Collapsed="true">
|
||||
<Position X="23" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAgAEAAAEA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.WriteDat0Register" Collapsed="true">
|
||||
<Position X="29.75" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABBAAAAAAAAAAAAgAAAAAAA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.WriteDat1Register" Collapsed="true">
|
||||
<Position X="36.5" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABBAAAAAAAAAAAAgAAAAAAA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.WriteToggle0Register" Collapsed="true">
|
||||
<Position X="43.25" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABBAAAAAAAAAAAAgAAAAAAA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.WriteSet0Register" Collapsed="true">
|
||||
<Position X="50" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABBAAAAAAAAAAAAgAAAAAAA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.WriteClear0Register" Collapsed="true">
|
||||
<Position X="56.75" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABBAAAAAAAAAAAAgAAAAAAA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryStatusLED" Collapsed="true">
|
||||
<Position X="63.5" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAgAEAAAEA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.SetStatusLED" Collapsed="true">
|
||||
<Position X="70.25" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABAAAAAAAAAAAAAgAAAAAAA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryOMAPEventMon" Collapsed="true">
|
||||
<Position X="25.25" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAgAEAAAEA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryOMAPExtStatMon" Collapsed="true">
|
||||
<Position X="32" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAgAEAAAEA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryOMAPnStartMon" Collapsed="true">
|
||||
<Position X="38.75" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAgAEAAAEA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryOMAPnStatusMon" Collapsed="true">
|
||||
<Position X="45.5" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAgAEAAAEA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryOMAPEventLow" Collapsed="true">
|
||||
<Position X="52.25" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAgAEAAAEA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.SetOMAPEventLow" Collapsed="true">
|
||||
<Position X="59" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABAAAAAAAAAAAAAgAAAAAAA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryOMAPStartLow" Collapsed="true">
|
||||
<Position X="65.75" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAgAEAAAEA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.SetOMAPStartLow" Collapsed="true">
|
||||
<Position X="72.5" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABAAAAAAAAAAAAAgAAAAAAA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryOMAPStatusLow" Collapsed="true">
|
||||
<Position X="27.5" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAgAEAAAEA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.SetOMAPStatusLow" Collapsed="true">
|
||||
<Position X="34.25" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABAAAAAAAAAAAAAgAAAAAAA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryOMAPRecStatExt" Collapsed="true">
|
||||
<Position X="41" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAgAEAAAEA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.SetOMAPRecStatExt" Collapsed="true">
|
||||
<Position X="47.75" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABAAAAAAAAAAAAAgAAAAAAA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryAllGPIO" Collapsed="true">
|
||||
<Position X="54.5" Y="3.5" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABAAAAAAAAAAAAAAAEAgAEA=</HashCode>
|
||||
<FileName>GPIOCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.InformationCommands" Collapsed="true">
|
||||
<Position X="82.5" Y="2" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAABBAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>InformationCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QuerySerialNumber" Collapsed="true">
|
||||
<Position X="88.25" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAAAAAAAAAAABAAAAEAAAAAAAAAAEAAAEA=</HashCode>
|
||||
<FileName>InformationCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.SetSerialNumber" Collapsed="true">
|
||||
<Position X="90.5" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAAAAAAAAAAABBAAAEAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>InformationCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryFirmwareVersion" Collapsed="true">
|
||||
<Position X="74.75" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAAAAAAAAAAABAAAAAAAACAAAAAAEAAAEA=</HashCode>
|
||||
<FileName>InformationCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryTime" Collapsed="true">
|
||||
<Position X="77" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAgEAAAEA=</HashCode>
|
||||
<FileName>InformationCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.SetTime" Collapsed="true">
|
||||
<Position X="79.25" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAAAAAAAAAAABBAAAAAAAAAAAAAgAAAAAA=</HashCode>
|
||||
<FileName>InformationCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryProtocolVersion" Collapsed="true">
|
||||
<Position X="81.5" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAACAEAAAEA=</HashCode>
|
||||
<FileName>InformationCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryKernelVersion" Collapsed="true">
|
||||
<Position X="83.75" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAEAAAEA=</HashCode>
|
||||
<FileName>InformationCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryMSPFirmwareVersion" Collapsed="true">
|
||||
<Position X="86" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAEAgAEA=</HashCode>
|
||||
<FileName>InformationCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.NetworkCommands" Collapsed="true">
|
||||
<Position X="100.5" Y="2" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAABBAAAAAAAAAAAAAAAAAAEA=</HashCode>
|
||||
<FileName>NetworkCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryIPAddress" Collapsed="true">
|
||||
<Position X="108.5" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABAAAAAAAAAAAAAAAEACAEA=</HashCode>
|
||||
<FileName>NetworkCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.SetIPAddress" Collapsed="true">
|
||||
<Position X="92.75" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABBAAAAAAAAAAAAAAAACAAA=</HashCode>
|
||||
<FileName>NetworkCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryNetmask" Collapsed="true">
|
||||
<Position X="95" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABAAAAAAAAAAAAAAAEBAAEA=</HashCode>
|
||||
<FileName>NetworkCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.SetNetmask" Collapsed="true">
|
||||
<Position X="97.25" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABBAAAAAAAAAAAAAAABAAAA=</HashCode>
|
||||
<FileName>NetworkCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryDefaultRoute" Collapsed="true">
|
||||
<Position X="99.5" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAEAAAAAAAAAAAgAABAAAAAAAAAAAAAAAEAAAEA=</HashCode>
|
||||
<FileName>NetworkCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.SetDefaultRoute" Collapsed="true">
|
||||
<Position X="101.75" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAEAAAAAAAAAAAgAABBAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>NetworkCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryMACAddress" Collapsed="true">
|
||||
<Position X="104" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABAAAAAAAACAAAAAAEAAAEA=</HashCode>
|
||||
<FileName>NetworkCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.SetMACAddress" Collapsed="true">
|
||||
<Position X="106.25" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABBAAAAAAACAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>NetworkCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.PowerCommands" Collapsed="true">
|
||||
<Position X="116.25" Y="2" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAABBAAAAAAAAAAAAAAAAAAEA=</HashCode>
|
||||
<FileName>PowerCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryV1VoltageMV" Collapsed="true">
|
||||
<Position X="110.75" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABAAAAAAAAAAAAAAIEAAAEA=</HashCode>
|
||||
<FileName>PowerCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryBatteryVoltageMV" Collapsed="true">
|
||||
<Position X="113" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAIAAAAAAAAAAAABAAAAAAAAAAAAAAAEAAAEA=</HashCode>
|
||||
<FileName>PowerCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QueryBatteryChargeCurrentMA" Collapsed="true">
|
||||
<Position X="115.25" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABAAAAAAAAAAAAAAAEAAAFA=</HashCode>
|
||||
<FileName>PowerCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QuerySliceBusInputCurrentMA" Collapsed="true">
|
||||
<Position X="117.5" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>gAAAAAAAAAAAAAAAAAgAABAAAAAAAAAAAAAAAEAAAEA=</HashCode>
|
||||
<FileName>PowerCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.QuerySliceBusVoltageMV" Collapsed="true">
|
||||
<Position X="119.75" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABAAAAAAAAAAAAAAAEAACEA=</HashCode>
|
||||
<FileName>PowerCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="DTS.DASLib.Command.SLICEDB.SetSliceBusVoltageMV" Collapsed="true">
|
||||
<Position X="122" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAgAABBAAAAAAAAAAAAAAAAACAA=</HashCode>
|
||||
<FileName>PowerCommands.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Font Name="Segoe UI" Size="9" />
|
||||
</ClassDiagram>
|
||||
1139
DataPRO/SLICEDBCommands/GPIOCommands.cs
Normal file
1139
DataPRO/SLICEDBCommands/GPIOCommands.cs
Normal file
File diff suppressed because it is too large
Load Diff
534
DataPRO/SLICEDBCommands/InformationCommands.cs
Normal file
534
DataPRO/SLICEDBCommands/InformationCommands.cs
Normal file
@@ -0,0 +1,534 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using DTS.Common.Enums.DASFactory;
|
||||
using DTS.Common.ICommunication;
|
||||
using DTS.Common.Interface.DASFactory;
|
||||
|
||||
namespace DTS.DASLib.Command.SLICEDB
|
||||
{
|
||||
public abstract class InformationCommands : CommandBase
|
||||
{
|
||||
protected enum Commands
|
||||
{
|
||||
Reserved = 0x00,
|
||||
QuerySerialNumber = 0x01,
|
||||
SetSerialNumber = 0x02,
|
||||
QueryFirmwareVersion = 0x03,
|
||||
QueryTime = 0x04,
|
||||
SetTime = 0x05,
|
||||
QueryDebugLevel = 0x06,
|
||||
SetDebugLevel = 0x07,
|
||||
QueryKernelVersion = 0x08,
|
||||
QueryMSPFirmwareVersion = 0x09,
|
||||
QueryProtocolVersion = 0x0A,
|
||||
QueryCalibrationDaysSince1970_01_01 = 0x0F,
|
||||
SetCalibrationDaysSince1970_01_01 = 0x10,
|
||||
};
|
||||
|
||||
protected abstract Commands _Command { get; }
|
||||
|
||||
protected InformationCommands(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
command.Type = CommandPacket.CommandType.Information;
|
||||
command.SetCommand((byte)_Command, _Command.ToString());
|
||||
}
|
||||
|
||||
protected InformationCommands(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
command.Type = CommandPacket.CommandType.Information;
|
||||
command.SetCommand((byte)_Command, _Command.ToString());
|
||||
}
|
||||
|
||||
public override void CommandToString(ref List<List<string>> list)
|
||||
{
|
||||
base.CommandToString(ref list);
|
||||
if (null != recorder)
|
||||
{
|
||||
list[0].Add(recorder.SerialNumber);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class QuerySerialNumber : InformationCommands
|
||||
{
|
||||
protected override InformationCommands.Commands _Command
|
||||
{
|
||||
get { return Commands.QuerySerialNumber; }
|
||||
}
|
||||
public QuerySerialNumber(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public QuerySerialNumber(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private string _value;
|
||||
|
||||
/// <summary>
|
||||
/// The serial number of the SLICE DB
|
||||
/// </summary>
|
||||
public string SerialNumber
|
||||
{
|
||||
get { return _value; }
|
||||
}
|
||||
|
||||
protected override CommandReceiveAction WholePackage()
|
||||
{
|
||||
if (response.Status == DFConstantsAndEnums.CommandStatus.StatusNoError)
|
||||
{
|
||||
response.GetParameter(0, out _value);
|
||||
}
|
||||
else
|
||||
{
|
||||
_value = string.Empty;
|
||||
}
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
}
|
||||
|
||||
public override void ResponseToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.ResponseToString(ref lines);
|
||||
lines.Add(new List<string>()
|
||||
{
|
||||
string.Format("Serial Number: {0}", SerialNumber)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public class SetSerialNumber : InformationCommands
|
||||
{
|
||||
protected override InformationCommands.Commands _Command
|
||||
{
|
||||
get { return Commands.SetSerialNumber; }
|
||||
}
|
||||
public SetSerialNumber(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public SetSerialNumber(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private string _value;
|
||||
|
||||
/// <summary>
|
||||
/// The serial number of the SLICE DB
|
||||
/// </summary>
|
||||
public string SerialNumber
|
||||
{
|
||||
get { return _value; }
|
||||
set
|
||||
{
|
||||
_value = value;
|
||||
// Allocate parameter array (+1 for terminating null)
|
||||
command.Parameter = new byte[value.Length + 1];
|
||||
command.SetParameter(0, value);
|
||||
}
|
||||
}
|
||||
|
||||
public override void CommandToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.CommandToString(ref lines);
|
||||
lines.Add(new List<string>() { string.Format("Serial Number: {0}", SerialNumber) });
|
||||
}
|
||||
|
||||
}
|
||||
public class SetCalibrationDaysSince1970_01_01 : InformationCommands
|
||||
{
|
||||
protected override InformationCommands.Commands _Command
|
||||
{
|
||||
get { return Commands.SetCalibrationDaysSince1970_01_01; }
|
||||
}
|
||||
public SetCalibrationDaysSince1970_01_01(ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public SetCalibrationDaysSince1970_01_01(ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private string _value;
|
||||
|
||||
/// <summary>
|
||||
/// The serial number of the SLICE DB
|
||||
/// </summary>
|
||||
public string CalibrationDaysSince1970_01_01
|
||||
{
|
||||
get { return _value; }
|
||||
set
|
||||
{
|
||||
_value = value;
|
||||
// Allocate parameter array (+1 for terminating null)
|
||||
command.Parameter = new byte[value.Length + 1];
|
||||
command.SetParameter(0, value);
|
||||
}
|
||||
}
|
||||
|
||||
public override void CommandToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.CommandToString(ref lines);
|
||||
lines.Add(new List<string>() { string.Format("CalibrationDaysSince1970_01_01: {0}", CalibrationDaysSince1970_01_01) });
|
||||
}
|
||||
|
||||
}
|
||||
public class QueryFirmwareVersion : InformationCommands
|
||||
{
|
||||
protected override InformationCommands.Commands _Command
|
||||
{
|
||||
get { return Commands.QueryFirmwareVersion; }
|
||||
}
|
||||
|
||||
public QueryFirmwareVersion(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public QueryFirmwareVersion(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private string _value;
|
||||
|
||||
/// <summary>
|
||||
/// The current firmware version of the SLICE DB.
|
||||
/// </summary>
|
||||
public string FirmwareVersion
|
||||
{
|
||||
get { return _value; }
|
||||
}
|
||||
|
||||
protected override CommandReceiveAction WholePackage()
|
||||
{
|
||||
if (response.Status == DFConstantsAndEnums.CommandStatus.StatusNoError)
|
||||
{
|
||||
response.GetParameter(0, out _value);
|
||||
}
|
||||
else
|
||||
{
|
||||
_value = string.Empty;
|
||||
}
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
}
|
||||
|
||||
public override void ResponseToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.ResponseToString(ref lines);
|
||||
lines.Add(new List<string>()
|
||||
{
|
||||
string.Format("Firmware Version: {0}", FirmwareVersion)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public class QueryTime : InformationCommands
|
||||
{
|
||||
protected override InformationCommands.Commands _Command
|
||||
{
|
||||
get { return Commands.QueryTime; }
|
||||
}
|
||||
|
||||
public QueryTime(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public QueryTime(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private DateTime _value;
|
||||
|
||||
/// <summary>
|
||||
/// The current time according to the SLICE DB.
|
||||
/// </summary>
|
||||
public DateTime CurrentTime
|
||||
{
|
||||
get { return _value; }
|
||||
}
|
||||
|
||||
protected override CommandReceiveAction WholePackage()
|
||||
{
|
||||
_value = new DateTime(1970, 1, 1);
|
||||
if (response.Status == DFConstantsAndEnums.CommandStatus.StatusNoError)
|
||||
{
|
||||
const int SecondsPosition = 0;
|
||||
const int MicrosecondsPosition = 4;
|
||||
UInt32 seconds, microseconds;
|
||||
response.GetParameter(SecondsPosition, out seconds);
|
||||
response.GetParameter(MicrosecondsPosition, out microseconds);
|
||||
_value = _value.AddMilliseconds(microseconds / 1000);
|
||||
_value = _value.AddSeconds(seconds);
|
||||
}
|
||||
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
}
|
||||
|
||||
public override void ResponseToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.ResponseToString(ref lines);
|
||||
lines.Add(new List<string>()
|
||||
{
|
||||
string.Format("Current Time: {0}", CurrentTime.ToLongDateString() + " " + CurrentTime.ToLongTimeString())
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public class SetTime : InformationCommands
|
||||
{
|
||||
protected override InformationCommands.Commands _Command
|
||||
{
|
||||
get { return Commands.SetTime; }
|
||||
}
|
||||
public SetTime(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public SetTime(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private DateTime _value;
|
||||
|
||||
/// <summary>
|
||||
/// The current time according to the SLICE DB.
|
||||
/// </summary>
|
||||
public DateTime CurrentTime
|
||||
{
|
||||
get { return _value; }
|
||||
set
|
||||
{
|
||||
const int ParameterLength = 8;
|
||||
const int SecondsPosition = 0;
|
||||
const int MicrosecondsPosition = 4;
|
||||
_value = value;
|
||||
DateTime epoch = new DateTime(1970, 1, 1);
|
||||
TimeSpan sinceEpoch = _value - epoch;
|
||||
double dSecondsSinceEpoch = sinceEpoch.TotalSeconds;
|
||||
UInt32 secondsSinceEpoch = (UInt32)dSecondsSinceEpoch;
|
||||
UInt32 microsecondsSinceEpoch = (UInt32)((dSecondsSinceEpoch - secondsSinceEpoch) * 1000000.0 + 0.5);
|
||||
command.Parameter = new byte[ParameterLength];
|
||||
command.SetParameter(SecondsPosition, secondsSinceEpoch);
|
||||
command.SetParameter(MicrosecondsPosition, microsecondsSinceEpoch);
|
||||
}
|
||||
}
|
||||
|
||||
public override void CommandToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.CommandToString(ref lines);
|
||||
lines.Add(new List<string>() { string.Format("Current Time: {0}", CurrentTime.ToLongDateString() + " " + CurrentTime.ToLongTimeString()) });
|
||||
}
|
||||
}
|
||||
public class QueryProtocolVersion : InformationCommands
|
||||
{
|
||||
protected override InformationCommands.Commands _Command
|
||||
{
|
||||
get { return Commands.QueryProtocolVersion; }
|
||||
}
|
||||
|
||||
public QueryProtocolVersion(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public QueryProtocolVersion(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private byte _value;
|
||||
|
||||
/// <summary>
|
||||
/// The current protocol version of the SLICE DB.
|
||||
/// </summary>
|
||||
public byte ProtocolVersion
|
||||
{
|
||||
get { return _value; }
|
||||
}
|
||||
|
||||
protected override CommandReceiveAction WholePackage()
|
||||
{
|
||||
if (response.Status == DFConstantsAndEnums.CommandStatus.StatusNoError)
|
||||
{
|
||||
response.GetParameter(0, out _value);
|
||||
}
|
||||
else
|
||||
{
|
||||
_value = 0;
|
||||
}
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
}
|
||||
|
||||
public override void ResponseToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.ResponseToString(ref lines);
|
||||
lines.Add(new List<string>()
|
||||
{
|
||||
string.Format("Firmware Version: {0}", ProtocolVersion)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public class QueryKernelVersion : InformationCommands
|
||||
{
|
||||
protected override InformationCommands.Commands _Command
|
||||
{
|
||||
get { return Commands.QueryKernelVersion; }
|
||||
}
|
||||
|
||||
public QueryKernelVersion(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public QueryKernelVersion(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private string _value;
|
||||
|
||||
/// <summary>
|
||||
/// The current Kernel firmware version of the SLICE DB.
|
||||
/// </summary>
|
||||
public string KernelFirmwareVersion
|
||||
{
|
||||
get { return _value; }
|
||||
}
|
||||
|
||||
protected override CommandReceiveAction WholePackage()
|
||||
{
|
||||
if (response.Status == DFConstantsAndEnums.CommandStatus.StatusNoError)
|
||||
{
|
||||
response.GetParameter(0, out _value);
|
||||
}
|
||||
else
|
||||
{
|
||||
_value = string.Empty;
|
||||
}
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
}
|
||||
|
||||
public override void ResponseToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.ResponseToString(ref lines);
|
||||
lines.Add(new List<string>()
|
||||
{
|
||||
string.Format("Firmware Version: {0}", KernelFirmwareVersion)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//FB 16049 Support ECM Cal date query
|
||||
public class QueryCalibrationDaysSince1970_01_01 : InformationCommands
|
||||
{
|
||||
protected override InformationCommands.Commands _Command
|
||||
{
|
||||
get { return Commands.QueryCalibrationDaysSince1970_01_01; }
|
||||
}
|
||||
public QueryCalibrationDaysSince1970_01_01(ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public QueryCalibrationDaysSince1970_01_01(ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private string _value;
|
||||
|
||||
/// <summary>
|
||||
/// The serial number of the SLICE DB
|
||||
/// </summary>
|
||||
public string CalibrationDaysSince1970_01_01
|
||||
{
|
||||
get { return _value; }
|
||||
}
|
||||
|
||||
protected override CommandReceiveAction WholePackage()
|
||||
{
|
||||
if (response.Status == DFConstantsAndEnums.CommandStatus.StatusNoError)
|
||||
{
|
||||
response.GetParameter(0, out _value);
|
||||
}
|
||||
else
|
||||
{
|
||||
_value = string.Empty;
|
||||
}
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
}
|
||||
|
||||
public override void ResponseToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.ResponseToString(ref lines);
|
||||
lines.Add(new List<string>()
|
||||
{
|
||||
string.Format("QueryCalibrationDaysSince1970_01_01: {0}", CalibrationDaysSince1970_01_01)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public class QueryMSPFirmwareVersion : InformationCommands
|
||||
{
|
||||
protected override InformationCommands.Commands _Command
|
||||
{
|
||||
get { return Commands.QueryMSPFirmwareVersion; }
|
||||
}
|
||||
|
||||
public QueryMSPFirmwareVersion(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public QueryMSPFirmwareVersion(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private string _value;
|
||||
|
||||
/// <summary>
|
||||
/// The current MSP firmware version of the SLICE DB.
|
||||
/// </summary>
|
||||
public string MSPFirmwareVersion
|
||||
{
|
||||
get { return _value; }
|
||||
}
|
||||
|
||||
protected override CommandReceiveAction WholePackage()
|
||||
{
|
||||
if (response.Status == DFConstantsAndEnums.CommandStatus.StatusNoError)
|
||||
{
|
||||
response.GetParameter(0, out _value);
|
||||
}
|
||||
else
|
||||
{
|
||||
_value = string.Empty;
|
||||
}
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
}
|
||||
|
||||
public override void ResponseToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.ResponseToString(ref lines);
|
||||
lines.Add(new List<string>()
|
||||
{
|
||||
string.Format("Firmware Version: {0}", MSPFirmwareVersion)
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
403
DataPRO/SLICEDBCommands/NetworkCommands.cs
Normal file
403
DataPRO/SLICEDBCommands/NetworkCommands.cs
Normal file
@@ -0,0 +1,403 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using DTS.Common.Enums.DASFactory;
|
||||
using DTS.Common.ICommunication;
|
||||
|
||||
namespace DTS.DASLib.Command.SLICEDB
|
||||
{
|
||||
public abstract class NetworkCommands : CommandBase
|
||||
{
|
||||
protected enum Commands
|
||||
{
|
||||
Reserved = 0x00,
|
||||
QueryIPAddress = 0x01,
|
||||
SetIPAddress = 0x02,
|
||||
QueryNetmask = 0x03,
|
||||
SetNetmask = 0x04,
|
||||
QueryDefaultRoute = 0x05,
|
||||
SetDefaultRoute = 0x06,
|
||||
QueryMACAddress = 0x07,
|
||||
SetMACAddress = 0x08,
|
||||
};
|
||||
protected abstract Commands _Command { get; }
|
||||
|
||||
protected NetworkCommands(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
command.Type = CommandPacket.CommandType.Network;
|
||||
command.SetCommand((byte)_Command, _Command.ToString());
|
||||
}
|
||||
|
||||
protected NetworkCommands(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
command.Type = CommandPacket.CommandType.Network;
|
||||
command.SetCommand((byte)_Command, _Command.ToString());
|
||||
}
|
||||
|
||||
public override void CommandToString(ref List<List<string>> list)
|
||||
{
|
||||
base.CommandToString(ref list);
|
||||
list[0].Add(recorder.ConnectString);
|
||||
}
|
||||
public override void ResponseToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.ResponseToString(ref lines);
|
||||
lines[0].Add(recorder.ConnectString);
|
||||
}
|
||||
}
|
||||
|
||||
public class QueryIPAddress : NetworkCommands
|
||||
{
|
||||
protected override NetworkCommands.Commands _Command
|
||||
{
|
||||
get { return Commands.QueryIPAddress; }
|
||||
}
|
||||
public QueryIPAddress(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public QueryIPAddress(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private string _val;
|
||||
|
||||
/// <summary>
|
||||
/// The current IP address of the SLICE DB
|
||||
/// </summary>
|
||||
public string IPAddress
|
||||
{
|
||||
get { return _val; }
|
||||
}
|
||||
|
||||
protected override CommandReceiveAction WholePackage()
|
||||
{
|
||||
if (response.Status == DFConstantsAndEnums.CommandStatus.StatusNoError)
|
||||
{
|
||||
response.GetParameter(0, out _val);
|
||||
}
|
||||
else
|
||||
{
|
||||
_val = string.Empty;
|
||||
}
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
}
|
||||
|
||||
public override void ResponseToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.ResponseToString(ref lines);
|
||||
lines.Add(new List<string>()
|
||||
{
|
||||
string.Format("IP Address: {0}", IPAddress)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public class SetIPAddress : NetworkCommands
|
||||
{
|
||||
protected override NetworkCommands.Commands _Command
|
||||
{
|
||||
get { return Commands.SetIPAddress; }
|
||||
}
|
||||
public SetIPAddress(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public SetIPAddress(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private string _val;
|
||||
|
||||
/// <summary>
|
||||
/// The current IP address of the SLICE DB
|
||||
/// </summary>
|
||||
public string IPAddress
|
||||
{
|
||||
get { return _val; }
|
||||
set
|
||||
{
|
||||
_val = value;
|
||||
command.Parameter = new byte[_val.Length + 1];
|
||||
command.SetParameter(0, _val);
|
||||
}
|
||||
}
|
||||
|
||||
public override void CommandToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.CommandToString(ref lines);
|
||||
lines.Add(new List<string>() { string.Format("IP Address: {0}", IPAddress) });
|
||||
}
|
||||
}
|
||||
|
||||
public class QueryNetmask : NetworkCommands
|
||||
{
|
||||
protected override NetworkCommands.Commands _Command
|
||||
{
|
||||
get { return Commands.QueryNetmask; }
|
||||
}
|
||||
public QueryNetmask(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public QueryNetmask(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private string _val;
|
||||
|
||||
/// <summary>
|
||||
/// The current netmask of the SLICE DB
|
||||
/// </summary>
|
||||
public string Netmask
|
||||
{
|
||||
get { return _val; }
|
||||
}
|
||||
|
||||
protected override CommandReceiveAction WholePackage()
|
||||
{
|
||||
if (response.Status == DFConstantsAndEnums.CommandStatus.StatusNoError)
|
||||
{
|
||||
response.GetParameter(0, out _val);
|
||||
}
|
||||
else
|
||||
{
|
||||
_val = string.Empty;
|
||||
}
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
}
|
||||
|
||||
public override void ResponseToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.ResponseToString(ref lines);
|
||||
lines.Add(new List<string>()
|
||||
{
|
||||
string.Format("Netmask: {0}", Netmask)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public class SetNetmask : NetworkCommands
|
||||
{
|
||||
protected override NetworkCommands.Commands _Command
|
||||
{
|
||||
get { return Commands.SetNetmask; }
|
||||
}
|
||||
public SetNetmask(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public SetNetmask(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private string _val;
|
||||
|
||||
/// <summary>
|
||||
/// The current netmask of the SLICE DB
|
||||
/// </summary>
|
||||
public string Netmask
|
||||
{
|
||||
get { return _val; }
|
||||
set
|
||||
{
|
||||
_val = value;
|
||||
command.Parameter = new byte[_val.Length + 1];
|
||||
command.SetParameter(0, _val);
|
||||
}
|
||||
}
|
||||
|
||||
public override void CommandToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.CommandToString(ref lines);
|
||||
lines.Add(new List<string>() { string.Format("Netmask: {0}", Netmask) });
|
||||
}
|
||||
}
|
||||
|
||||
public class QueryDefaultRoute : NetworkCommands
|
||||
{
|
||||
protected override NetworkCommands.Commands _Command
|
||||
{
|
||||
get { return Commands.QueryDefaultRoute; }
|
||||
}
|
||||
|
||||
public QueryDefaultRoute(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public QueryDefaultRoute(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private string _val;
|
||||
|
||||
/// <summary>
|
||||
/// The current default route of the SLICE DB
|
||||
/// </summary>
|
||||
public string DefaultRoute
|
||||
{
|
||||
get { return _val; }
|
||||
}
|
||||
|
||||
protected override CommandReceiveAction WholePackage()
|
||||
{
|
||||
if (response.Status == DFConstantsAndEnums.CommandStatus.StatusNoError)
|
||||
{
|
||||
response.GetParameter(0, out _val);
|
||||
}
|
||||
else
|
||||
{
|
||||
_val = string.Empty;
|
||||
}
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
}
|
||||
|
||||
public override void ResponseToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.ResponseToString(ref lines);
|
||||
lines.Add(new List<string>()
|
||||
{
|
||||
string.Format("Default route: {0}", DefaultRoute)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public class SetDefaultRoute : NetworkCommands
|
||||
{
|
||||
protected override NetworkCommands.Commands _Command
|
||||
{
|
||||
get { return Commands.SetDefaultRoute; }
|
||||
}
|
||||
public SetDefaultRoute(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public SetDefaultRoute(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private string _val;
|
||||
|
||||
/// <summary>
|
||||
/// The current default route of the SLICE DB
|
||||
/// </summary>
|
||||
public string DefaultRoute
|
||||
{
|
||||
get { return _val; }
|
||||
set
|
||||
{
|
||||
_val = value;
|
||||
command.Parameter = new byte[_val.Length + 1];
|
||||
command.SetParameter(0, _val);
|
||||
}
|
||||
}
|
||||
|
||||
public override void CommandToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.CommandToString(ref lines);
|
||||
lines.Add(new List<string>() { string.Format("Default route: {0}", DefaultRoute) });
|
||||
}
|
||||
}
|
||||
|
||||
public class QueryMACAddress : NetworkCommands
|
||||
{
|
||||
protected override NetworkCommands.Commands _Command
|
||||
{
|
||||
get { return Commands.QueryMACAddress; }
|
||||
}
|
||||
public QueryMACAddress(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public QueryMACAddress(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private string _val;
|
||||
|
||||
/// <summary>
|
||||
/// The current MAC address (Ethernet hardware address) of the SLICE DB
|
||||
/// </summary>
|
||||
public string MACAddress
|
||||
{
|
||||
get { return _val; }
|
||||
}
|
||||
|
||||
protected override CommandReceiveAction WholePackage()
|
||||
{
|
||||
if (response.Status == DFConstantsAndEnums.CommandStatus.StatusNoError)
|
||||
{
|
||||
response.GetParameter(0, out _val);
|
||||
}
|
||||
else
|
||||
{
|
||||
_val = string.Empty;
|
||||
}
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
}
|
||||
|
||||
public override void ResponseToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.ResponseToString(ref lines);
|
||||
lines.Add(new List<string>()
|
||||
{
|
||||
string.Format("MAC Address: {0}", MACAddress)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public class SetMACAddress : NetworkCommands
|
||||
{
|
||||
protected override NetworkCommands.Commands _Command
|
||||
{
|
||||
get { return Commands.SetMACAddress; }
|
||||
}
|
||||
public SetMACAddress(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public SetMACAddress(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private string _val;
|
||||
|
||||
/// <summary>
|
||||
/// The current MAC address (Ethernet hardware address) of the SLICE DB
|
||||
/// </summary>
|
||||
public string MACAddress
|
||||
{
|
||||
get { return _val; }
|
||||
set
|
||||
{
|
||||
_val = value;
|
||||
command.Parameter = new byte[_val.Length + 1];
|
||||
command.SetParameter(0, _val);
|
||||
}
|
||||
}
|
||||
|
||||
public override void CommandToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.CommandToString(ref lines);
|
||||
lines.Add(new List<string>() { string.Format("MAC Address: {0}", MACAddress) });
|
||||
}
|
||||
}
|
||||
}
|
||||
325
DataPRO/SLICEDBCommands/PowerCommands.cs
Normal file
325
DataPRO/SLICEDBCommands/PowerCommands.cs
Normal file
@@ -0,0 +1,325 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using DTS.Common.Enums.DASFactory;
|
||||
using DTS.Common.ICommunication;
|
||||
|
||||
namespace DTS.DASLib.Command.SLICEDB
|
||||
{
|
||||
public abstract class PowerCommands : CommandBase
|
||||
{
|
||||
protected enum Commands
|
||||
{
|
||||
Reserved = 0x00,
|
||||
|
||||
QueryV1VoltageMV = 0x01,
|
||||
QueryBatteryVoltageMV = 0x02,
|
||||
QueryBatteryChargeCurrentMA = 0x03,
|
||||
QuerySliceBusInputCurrentMA = 0x04,
|
||||
QuerySliceBusVoltageMV = 0x05,
|
||||
|
||||
SetSliceBusVoltageMV = 0x06,
|
||||
|
||||
QueryMinimumV1MVForSliceBusEnable = 0x07,
|
||||
SetMinimumV1MVForSliceBusEnable = 0x08,
|
||||
QueryMinimumV1MVForBatteryChargeEnable = 0x09,
|
||||
SetMinimumV1MVForBatteryChargeEnable = 0x0A,
|
||||
QueryDefaultSliceBusVoltageMV = 0x0B,
|
||||
SetDefaultSliceBusVoltageMV = 0x0C,
|
||||
QueryDelayBeforeSliceBusVoltageEnableMS = 0x0D,
|
||||
SetDelayBeforeSliceBusVoltageEnableMS = 0x0E,
|
||||
|
||||
QueryV1OvervoltageLimitMV = 0x0F,
|
||||
SetV1OvervoltageLimitMV = 0x10,
|
||||
QueryV1OvervoltageCount = 0x11,
|
||||
SetV1OvervoltageCount = 0x12,
|
||||
|
||||
QueryBatteryVoltageOvervoltageLimitMV = 0x13,
|
||||
SetBattteryVoltageOvervoltageLimitMV = 0x14,
|
||||
QueryBatteryVoltageOvervoltageCount = 0x15,
|
||||
SetBatteryVoltageOvervoltageCount = 0x16,
|
||||
|
||||
QuerySliceBusInputCurrentOvercurrentLimitMA = 0x17,
|
||||
SetSliceBusInputCurrentOvercurrentLimitMA = 0x18,
|
||||
QuerySliceBusInputCurrentOvercurrentCount = 0x19,
|
||||
SetSliceBusInputCurrentOvercurrentCount = 0x1A,
|
||||
|
||||
QueryBatteryChargeCurrentOvercurrentLimitMA = 0x17,
|
||||
SetBatteryChargeCurrentOvercurrentLimitMA = 0x18,
|
||||
QueryBatteryChargeCurrentOvercurrentCount = 0x19,
|
||||
SetBatteryChargeCurrentOvercurrentCount = 0x1A,
|
||||
};
|
||||
protected abstract Commands _Command { get; }
|
||||
|
||||
protected PowerCommands(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
command.Type = CommandPacket.CommandType.Power;
|
||||
command.SetCommand((byte)_Command, _Command.ToString());
|
||||
}
|
||||
|
||||
protected PowerCommands(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
command.Type = CommandPacket.CommandType.Power;
|
||||
command.SetCommand((byte)_Command, _Command.ToString());
|
||||
}
|
||||
public override void CommandToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.CommandToString(ref lines);
|
||||
lines[0].Add(recorder.ConnectString);
|
||||
}
|
||||
public override void ResponseToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.ResponseToString(ref lines);
|
||||
lines[0].Add(recorder.ConnectString);
|
||||
}
|
||||
}
|
||||
|
||||
public class QueryV1VoltageMV : PowerCommands
|
||||
{
|
||||
protected override Commands _Command => Commands.QueryV1VoltageMV;
|
||||
|
||||
public QueryV1VoltageMV(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public QueryV1VoltageMV(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private uint _val;
|
||||
|
||||
/// <summary>
|
||||
/// The input voltage (+V1 on connector P1) in millivolts
|
||||
/// </summary>
|
||||
public uint V1VoltageMV => _val;
|
||||
|
||||
protected override CommandReceiveAction WholePackage()
|
||||
{
|
||||
_val = 0;
|
||||
if (response.Status != DFConstantsAndEnums.CommandStatus.StatusNoError)
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
response.GetParameter(0, out uint uVal);
|
||||
_val = uVal;
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
}
|
||||
|
||||
public override void ResponseToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.ResponseToString(ref lines);
|
||||
lines.Add(new List<string>
|
||||
{
|
||||
$"+V1 (mV): {V1VoltageMV}"
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public class QueryBatteryVoltageMV : PowerCommands
|
||||
{
|
||||
protected override Commands _Command => Commands.QueryBatteryVoltageMV;
|
||||
|
||||
public QueryBatteryVoltageMV(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.QueryBatteryVoltage);
|
||||
}
|
||||
|
||||
public QueryBatteryVoltageMV(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands.QueryBatteryVoltage);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The battery voltage (+BAT on connector J1) in millivolts
|
||||
/// </summary>
|
||||
public uint BatteryVoltageMV { get; private set; }
|
||||
|
||||
protected override CommandReceiveAction WholePackage()
|
||||
{
|
||||
BatteryVoltageMV = 0;
|
||||
if (response.Status != DFConstantsAndEnums.CommandStatus.StatusNoError)
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
uint uVal;
|
||||
response.GetParameter(0, out uVal);
|
||||
BatteryVoltageMV = uVal;
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
}
|
||||
|
||||
public override void ResponseToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.ResponseToString(ref lines);
|
||||
lines.Add(new List<string>
|
||||
{
|
||||
$"+BAT (mV): {BatteryVoltageMV}"
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public class QueryBatteryChargeCurrentMA : PowerCommands
|
||||
{
|
||||
protected override Commands _Command => Commands.QueryBatteryChargeCurrentMA;
|
||||
|
||||
public QueryBatteryChargeCurrentMA(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public QueryBatteryChargeCurrentMA(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private uint _val;
|
||||
|
||||
/// <summary>
|
||||
/// The battery charge current in milliamps
|
||||
/// </summary>
|
||||
public uint BatteryChargeCurrentMA => _val;
|
||||
|
||||
protected override CommandReceiveAction WholePackage()
|
||||
{
|
||||
_val = 0;
|
||||
if (response.Status == DFConstantsAndEnums.CommandStatus.StatusNoError)
|
||||
{
|
||||
uint uVal;
|
||||
response.GetParameter(0, out uVal);
|
||||
_val = uVal;
|
||||
}
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
}
|
||||
|
||||
public override void ResponseToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.ResponseToString(ref lines);
|
||||
lines.Add(new List<string>
|
||||
{
|
||||
$"Battery Charge Current (mA): {BatteryChargeCurrentMA}"
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public class QuerySliceBusInputCurrentMA : PowerCommands
|
||||
{
|
||||
protected override Commands _Command => Commands.QuerySliceBusInputCurrentMA;
|
||||
|
||||
public QuerySliceBusInputCurrentMA(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public QuerySliceBusInputCurrentMA(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private uint _val;
|
||||
|
||||
/// <summary>
|
||||
/// The slice bus current in milliamps
|
||||
/// </summary>
|
||||
public uint SliceBusInputCurrentMA => _val;
|
||||
|
||||
protected override CommandReceiveAction WholePackage()
|
||||
{
|
||||
_val = 0;
|
||||
if (response.Status != DFConstantsAndEnums.CommandStatus.StatusNoError)
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
uint uVal;
|
||||
response.GetParameter(0, out uVal);
|
||||
_val = uVal;
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
}
|
||||
|
||||
public override void ResponseToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.ResponseToString(ref lines);
|
||||
lines.Add(new List<string>
|
||||
{
|
||||
$"SLICE Bus Current (mA): {SliceBusInputCurrentMA}"
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public class QuerySliceBusVoltageMV : PowerCommands
|
||||
{
|
||||
protected override Commands _Command => Commands.QuerySliceBusVoltageMV;
|
||||
|
||||
public QuerySliceBusVoltageMV(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public QuerySliceBusVoltageMV(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private uint _val;
|
||||
|
||||
/// <summary>
|
||||
/// The slice bus voltage in millivolts
|
||||
/// </summary>
|
||||
public uint SliceBusVoltageMV => _val;
|
||||
|
||||
protected override CommandReceiveAction WholePackage()
|
||||
{
|
||||
_val = 0;
|
||||
if (response.Status != DFConstantsAndEnums.CommandStatus.StatusNoError)
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
uint uVal;
|
||||
response.GetParameter(0, out uVal);
|
||||
_val = uVal;
|
||||
return CommandReceiveAction.StopReceiving;
|
||||
}
|
||||
|
||||
public override void ResponseToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.ResponseToString(ref lines);
|
||||
lines.Add(new List<string>
|
||||
{
|
||||
$"SLICE Bus voltage (mV): {SliceBusVoltageMV}"
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public class SetSliceBusVoltageMV : PowerCommands
|
||||
{
|
||||
protected override Commands _Command => Commands.SetSliceBusVoltageMV;
|
||||
|
||||
public SetSliceBusVoltageMV(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
}
|
||||
|
||||
public SetSliceBusVoltageMV(DTS.Common.Interface.DASFactory.ICommunication sock, int TimeoutMillisec)
|
||||
: base(sock, TimeoutMillisec)
|
||||
{
|
||||
}
|
||||
|
||||
private uint _val;
|
||||
|
||||
/// <summary>
|
||||
/// The slice bus voltage in millivolts
|
||||
/// </summary>
|
||||
public uint SliceBusVoltageMV
|
||||
{
|
||||
|
||||
set
|
||||
{
|
||||
_val = value;
|
||||
command.Parameter = new byte[sizeof(uint)];
|
||||
command.SetParameter(0, _val);
|
||||
}
|
||||
get => _val;
|
||||
}
|
||||
|
||||
public override void CommandToString(ref List<List<string>> lines)
|
||||
{
|
||||
base.CommandToString(ref lines);
|
||||
lines.Add(new List<string> { string.Format("SLICE Bus voltage (mV): {0}", SliceBusVoltageMV) });
|
||||
}
|
||||
}
|
||||
}
|
||||
35
DataPRO/SLICEDBCommands/Properties/AssemblyInfo.cs
Normal file
35
DataPRO/SLICEDBCommands/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("SliceDBCommands")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("SliceDBCommands")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2009")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("9138a993-9a7e-4cf7-9749-fc4d737101f7")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.06.0081")]
|
||||
[assembly: AssemblyFileVersion("1.06.0081")]
|
||||
109
DataPRO/SLICEDBCommands/SliceDBCommands.csproj
Normal file
109
DataPRO/SLICEDBCommands/SliceDBCommands.csproj
Normal file
@@ -0,0 +1,109 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.21022</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{DEA48A0B-999E-48E8-8601-CB05B6B765DE}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>SliceDBCommands</RootNamespace>
|
||||
<AssemblyName>SliceDBCommands</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<OldToolsVersion>3.5</OldToolsVersion>
|
||||
<TargetFrameworkProfile />
|
||||
<SccProjectName>
|
||||
</SccProjectName>
|
||||
<SccLocalPath>
|
||||
</SccLocalPath>
|
||||
<SccAuxPath>
|
||||
</SccAuxPath>
|
||||
<SccProvider>
|
||||
</SccProvider>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ArmCommands.cs" />
|
||||
<Compile Include="CommandBase.cs" />
|
||||
<Compile Include="CommandPacket.cs" />
|
||||
<Compile Include="CalibrationCommands.cs" />
|
||||
<Compile Include="InformationCommands.cs" />
|
||||
<Compile Include="PowerCommands.cs" />
|
||||
<Compile Include="GPIOCommands.cs" />
|
||||
<Compile Include="NetworkCommands.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Common\DTS.Common.ICommunication\DTS.Common.ICommunication.csproj">
|
||||
<Project>{f57b954e-a49a-4110-b36c-b5abab3e230b}</Project>
|
||||
<Name>DTS.Common.ICommunication</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Common\DTS.Common\DTS.Common.csproj">
|
||||
<Project>{F7A0804F-61A4-40AE-83D0-F1137622B592}</Project>
|
||||
<Name>DTS.Common</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\ICommand\ICommand.csproj">
|
||||
<Project>{58E70872-8ACC-4957-BB8E-D3746BCC536D}</Project>
|
||||
<Name>ICommand</Name>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Design\SliceDBCommandsClassDiagram.cd" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = "")]
|
||||
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user