├── .github └── workflows │ ├── dotnetcore.yml │ ├── net-standard.yml │ └── release.yml ├── .gitignore ├── LICENSE ├── OpenProtocolInterpreter.sln ├── README.md ├── dist └── lib │ ├── net6 │ ├── OpenProtocolInterpreter.dll │ └── OpenProtocolInterpreter.xml │ ├── net8 │ ├── OpenProtocolInterpreter.dll │ └── OpenProtocolInterpreter.xml │ └── netstandard2.0 │ ├── OpenProtocolInterpreter.dll │ └── OpenProtocolInterpreter.xml ├── docs ├── Desoutter │ ├── Desoutter_Controllers-Open_Protocol-MID_List.pdf │ └── Desoutter_Protocol_Manual_V22.pdf └── OpenProtocol_Specification.pdf ├── media ├── icon.png └── logo.png ├── sample ├── OpenProtocolInterpreter.Sample.sln └── OpenProtocolInterpreter.Sample │ ├── App.config │ ├── Driver │ ├── Commands │ │ ├── AbortJobCommand.cs │ │ ├── DownloadProductCommand.cs │ │ └── SendJobCommand.cs │ ├── Events │ │ └── MIDIncome.cs │ ├── Helpers │ │ └── AcknowledgeHelper.cs │ └── OpenProtocolDriver.cs │ ├── DriverForm.Designer.cs │ ├── DriverForm.cs │ ├── DriverForm.resx │ ├── Ethernet │ ├── Message.cs │ └── SimpleTcpClient.cs │ ├── OpenProtocolInterpreter.Sample.csproj │ ├── Program.cs │ ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings │ └── packages.config └── src ├── MIDTesters.Core ├── Alarm │ ├── TestMid0070.cs │ ├── TestMid0071.cs │ ├── TestMid0072.cs │ ├── TestMid0073.cs │ ├── TestMid0074.cs │ ├── TestMid0075.cs │ ├── TestMid0076.cs │ ├── TestMid0077.cs │ └── TestMid0078.cs ├── ApplicationController │ └── TestMid0270.cs ├── ApplicationSelector │ ├── TestMid0250.cs │ ├── TestMid0251.cs │ ├── TestMid0252.cs │ ├── TestMid0253.cs │ ├── TestMid0254.cs │ └── TestMid0255.cs ├── ApplicationToolLocationSystem │ ├── TestMid0260.cs │ ├── TestMid0261.cs │ ├── TestMid0262.cs │ ├── TestMid0263.cs │ ├── TestMid0264.cs │ └── TestMid0265.cs ├── AutomaticManualMode │ ├── TestMid0400.cs │ ├── TestMid0401.cs │ ├── TestMid0402.cs │ ├── TestMid0403.cs │ ├── TestMid0410.cs │ └── TestMid0411.cs ├── Communication │ ├── TestMid0001.cs │ ├── TestMid0002.cs │ ├── TestMid0003.cs │ ├── TestMid0004.cs │ ├── TestMid0005.cs │ ├── TestMid0006.cs │ ├── TestMid0008.cs │ └── TestMid0009.cs ├── Converters │ ├── BooleanConverterTest.cs │ ├── ByteConverterTest.cs │ ├── DateTimeConverterTest.cs │ ├── DecimalConverterTest.cs │ ├── Int32ConverterTest.cs │ ├── Int64ConverterTest.cs │ ├── PaddingConverterTest.cs │ └── TruncatedDecimalConverterTest.cs ├── DefaultMidTests.cs ├── IOInterface │ ├── TestMid0200.cs │ ├── TestMid0210.cs │ ├── TestMid0211.cs │ ├── TestMid0212.cs │ ├── TestMid0213.cs │ ├── TestMid0214.cs │ ├── TestMid0215.cs │ ├── TestMid0216.cs │ ├── TestMid0217.cs │ ├── TestMid0218.cs │ ├── TestMid0219.cs │ ├── TestMid0220.cs │ ├── TestMid0221.cs │ ├── TestMid0222.cs │ ├── TestMid0223.cs │ ├── TestMid0224.cs │ └── TestMid0225.cs ├── Job │ ├── Advanced │ │ ├── TestMid0120.cs │ │ ├── TestMid0121.cs │ │ ├── TestMid0122.cs │ │ ├── TestMid0123.cs │ │ ├── TestMid0124.cs │ │ ├── TestMid0125.cs │ │ ├── TestMid0126.cs │ │ ├── TestMid0127.cs │ │ ├── TestMid0128.cs │ │ ├── TestMid0129.cs │ │ ├── TestMid0130.cs │ │ ├── TestMid0131.cs │ │ ├── TestMid0132.cs │ │ ├── TestMid0133.cs │ │ └── TestMid0140.cs │ ├── TestMid0030.cs │ ├── TestMid0031.cs │ ├── TestMid0032.cs │ ├── TestMid0033.cs │ ├── TestMid0034.cs │ ├── TestMid0035.cs │ ├── TestMid0036.cs │ ├── TestMid0037.cs │ ├── TestMid0038.cs │ └── TestMid0039.cs ├── KeepAlive │ └── TestMid9999.cs ├── LinkCommunication │ ├── TestMid9997.cs │ └── TestMid9998.cs ├── MIDTesters.Core.csproj ├── MIDsTests.cs ├── MidTester.cs ├── MotorTuning │ ├── TestMid0500.cs │ ├── TestMid0501.cs │ ├── TestMid0502.cs │ ├── TestMid0503.cs │ └── TestMid0504.cs ├── MultiSpindle │ ├── TestMid0090.cs │ ├── TestMid0091.cs │ ├── TestMid0092.cs │ ├── TestMid0093.cs │ ├── TestMid0100.cs │ ├── TestMid0101.cs │ ├── TestMid0102.cs │ ├── TestMid0103.cs │ └── TestMid0104.cs ├── MultipleIdentifiers │ ├── TestMid0150.cs │ ├── TestMid0152.cs │ ├── TestMid0153.cs │ ├── TestMid0154.cs │ ├── TestMid0155.cs │ ├── TestMid0156.cs │ └── TestMid0157.cs ├── OpenProtocolCommandsDisabled │ ├── TestMid0420.cs │ ├── TestMid0421.cs │ ├── TestMid0422.cs │ └── TestMid0423.cs ├── PLCUserData │ ├── TestMid0240.cs │ ├── TestMid0241.cs │ ├── TestMid0242.cs │ ├── TestMid0243.cs │ ├── TestMid0244.cs │ └── TestMid0245.cs ├── ParameterSet │ ├── TestMid0010.cs │ ├── TestMid0011.cs │ ├── TestMid0012.cs │ ├── TestMid0013.cs │ ├── TestMid0014.cs │ ├── TestMid0015.cs │ ├── TestMid0016.cs │ ├── TestMid0017.cs │ ├── TestMid0018.cs │ ├── TestMid0019.cs │ ├── TestMid0020.cs │ ├── TestMid0021.cs │ ├── TestMid0022.cs │ ├── TestMid0023.cs │ ├── TestMid0024.cs │ ├── TestMid2504.cs │ ├── TestMid2505.cs │ └── TestMid2506.cs ├── PowerMACS │ ├── TestMid0105.cs │ ├── TestMid0106.cs │ ├── TestMid0107.cs │ ├── TestMid0108.cs │ └── TestMid0109.cs ├── Result │ └── TestMid1201.cs ├── Statistic │ ├── TestMid0300.cs │ └── TestMid0301.cs ├── TestCustomMid.cs ├── TestMidExtensions.cs ├── TestMidHeader.cs ├── Tightening │ ├── TestMid0060.cs │ ├── TestMid0061.cs │ ├── TestMid0062.cs │ ├── TestMid0063.cs │ ├── TestMid0064.cs │ ├── TestMid0065.cs │ ├── TestMid0066.cs │ └── TestMid0902.cs ├── Time │ ├── TestMid0080.cs │ ├── TestMid0081.cs │ └── TestMid0082.cs ├── Tool │ ├── TestMid0040.cs │ ├── TestMid0041.cs │ ├── TestMid0042.cs │ ├── TestMid0043.cs │ ├── TestMid0044.cs │ ├── TestMid0045.cs │ ├── TestMid0046.cs │ ├── TestMid0047.cs │ ├── TestMid0048.cs │ ├── TestMid0701.cs │ ├── TestMid0702.cs │ ├── TestMid0703.cs │ └── TestMid0704.cs ├── UserInterface │ ├── TestMid0110.cs │ ├── TestMid0111.cs │ └── TestMid0113.cs └── Vin │ ├── TestMid0050.cs │ ├── TestMid0051.cs │ ├── TestMid0052.cs │ ├── TestMid0053.cs │ └── TestMid0054.cs └── OpenProtocolInterpreter ├── Alarm ├── AlarmMessages.cs ├── IAlarm.cs ├── Mid0070.cs ├── Mid0071.cs ├── Mid0072.cs ├── Mid0073.cs ├── Mid0074.cs ├── Mid0075.cs ├── Mid0076.cs ├── Mid0077.cs └── Mid0078.cs ├── ApplicationController ├── ApplicationControllerMessages.cs ├── IApplicationController.cs └── Mid0270.cs ├── ApplicationSelector ├── ApplicationSelectorMessages.cs ├── IApplicationSelector.cs ├── Mid0250.cs ├── Mid0251.cs ├── Mid0252.cs ├── Mid0253.cs ├── Mid0254.cs └── Mid0255.cs ├── ApplicationToolLocationSystem ├── ApplicationToolLocationSystemMessages.cs ├── IApplicationToolLocationSystem.cs ├── Mid0260.cs ├── Mid0261.cs ├── Mid0262.cs ├── Mid0263.cs ├── Mid0264.cs └── Mid0265.cs ├── AutomaticManualMode ├── AutomaticManualModeMessages.cs ├── IAutomaticManualMode.cs ├── Mid0400.cs ├── Mid0401.cs ├── Mid0402.cs ├── Mid0403.cs ├── Mid0410.cs └── Mid0411.cs ├── Communication ├── CommunicationMessages.cs ├── ICommunication.cs ├── Mid0001.cs ├── Mid0002.cs ├── Mid0003.cs ├── Mid0004.cs ├── Mid0005.cs ├── Mid0006.cs ├── Mid0008.cs └── Mid0009.cs ├── CustomMessages.cs ├── DataField.cs ├── DataTypes.cs ├── Enums ├── AngleStatus.cs ├── AutoSelect.cs ├── BatchMode.cs ├── BatchStatus.cs ├── BatchStatusAtIncrement.cs ├── CalibrationUnit.cs ├── CurrentBatchStatus.cs ├── DataTypeDefinition.cs ├── DataUnitType.cs ├── DecrementBatchAfterLoosening.cs ├── DigitalInputNumber.cs ├── DisableType.cs ├── Error.cs ├── ForcedOrder.cs ├── HistogramType.cs ├── IdentifierPart.cs ├── InterpreterMode.cs ├── JobBatchMode.cs ├── JobStatus.cs ├── JobTighteningStatus.cs ├── LightCommand.cs ├── LinkCommunicationError.cs ├── MotorRotation.cs ├── NodeType.cs ├── ObjectType.cs ├── OperationType.cs ├── PID.cs ├── PaddingOrientation.cs ├── PairingHandlingType.cs ├── PairingStatus.cs ├── PostViewTorque.cs ├── PowerMacsStatus.cs ├── PrimaryTool.cs ├── RelayNumber.cs ├── RelayStatus.cs ├── RemovalCondition.cs ├── Reserved.cs ├── ResultType.cs ├── RotationDirection.cs ├── StatusInWorkOrder.cs ├── Strategy.cs ├── SystemSubType.cs ├── SystemType.cs ├── TighteningDirection.cs ├── TighteningValueStatus.cs ├── ToolHealth.cs ├── ToolLoosening.cs ├── ToolStatus.cs ├── ToolType.cs ├── TorqueStatus.cs └── TorqueValuesUnit.cs ├── Header.cs ├── IAcceptableCommand.cs ├── IAcknowledge.cs ├── IAcknowledgeable.cs ├── IAnswerableBy.cs ├── IController.cs ├── IDeclinableCommand.cs ├── IIntegrator.cs ├── IOInterface ├── DigitalInput.cs ├── IIOInterface.cs ├── IOInterfaceMessages.cs ├── Mid0200.cs ├── Mid0210.cs ├── Mid0211.cs ├── Mid0212.cs ├── Mid0213.cs ├── Mid0214.cs ├── Mid0215.cs ├── Mid0216.cs ├── Mid0217.cs ├── Mid0218.cs ├── Mid0219.cs ├── Mid0220.cs ├── Mid0221.cs ├── Mid0222.cs ├── Mid0223.cs ├── Mid0224.cs ├── Mid0225.cs └── Relay.cs ├── ISubscription.cs ├── IUnsubscription.cs ├── Job ├── Advanced │ ├── AdvancedJob.cs │ ├── AdvancedJobMessages.cs │ ├── IAdvancedJob.cs │ ├── Mid0120.cs │ ├── Mid0121.cs │ ├── Mid0122.cs │ ├── Mid0123.cs │ ├── Mid0124.cs │ ├── Mid0125.cs │ ├── Mid0126.cs │ ├── Mid0127.cs │ ├── Mid0128.cs │ ├── Mid0129.cs │ ├── Mid0130.cs │ ├── Mid0131.cs │ ├── Mid0132.cs │ ├── Mid0133.cs │ └── Mid0140.cs ├── IJob.cs ├── JobMessages.cs ├── Mid0030.cs ├── Mid0031.cs ├── Mid0032.cs ├── Mid0033.cs ├── Mid0034.cs ├── Mid0035.cs ├── Mid0036.cs ├── Mid0037.cs ├── Mid0038.cs ├── Mid0039.cs └── ParameterSet.cs ├── KeepAlive └── Mid9999.cs ├── LinkCommunication ├── ILinkCommunication.cs ├── LinkCommunicationMessages.cs ├── Mid9997.cs └── Mid9998.cs ├── MID.cs ├── MidExtensions.cs ├── MidInterpreter.cs ├── MidInterpreterMessagesExtensions.cs ├── MotorTuning ├── IMotorTuning.cs ├── Mid0500.cs ├── Mid0501.cs ├── Mid0502.cs ├── Mid0503.cs ├── Mid0504.cs └── MotorTuningMessages.cs ├── MultiSpindle ├── IMultiSpindle.cs ├── Mid0090.cs ├── Mid0091.cs ├── Mid0092.cs ├── Mid0093.cs ├── Mid0100.cs ├── Mid0101.cs ├── Mid0102.cs ├── Mid0103.cs ├── Mid0104.cs ├── MultiSpindleMessages.cs ├── SpindleOrPressStatus.cs └── SpindleStatus.cs ├── MultipleIdentifiers ├── IMultipleIdentifier.cs ├── IdentifierStatus.cs ├── Mid0150.cs ├── Mid0151.cs ├── Mid0152.cs ├── Mid0153.cs ├── Mid0154.cs ├── Mid0155.cs ├── Mid0156.cs ├── Mid0157.cs └── MultipleIdentifierMessages.cs ├── OpenProtocolCommandsDisabled ├── IOpenProtocolCommandsDisabled.cs ├── Mid0420.cs ├── Mid0421.cs ├── Mid0422.cs ├── Mid0423.cs └── OpenProtocolCommandsDisabledMessages.cs ├── OpenProtocolConvert.cs ├── OpenProtocolInterpreter.csproj ├── PLCUserData ├── IPLCUserData.cs ├── Mid0240.cs ├── Mid0241.cs ├── Mid0242.cs ├── Mid0243.cs ├── Mid0244.cs ├── Mid0245.cs └── PLCUserDataMessages.cs ├── ParameterSet ├── IParameterSet.cs ├── Mid0010.cs ├── Mid0011.cs ├── Mid0012.cs ├── Mid0013.cs ├── Mid0014.cs ├── Mid0015.cs ├── Mid0016.cs ├── Mid0017.cs ├── Mid0018.cs ├── Mid0019.cs ├── Mid0020.cs ├── Mid0021.cs ├── Mid0022.cs ├── Mid0023.cs ├── Mid0024.cs ├── Mid0025.cs ├── Mid2500.cs ├── Mid2501.cs ├── Mid2504.cs ├── Mid2505.cs ├── Mid2506.cs └── ParameterSetMessages.cs ├── PowerMACS ├── BoltData.cs ├── BoltResult.cs ├── IPowerMACS.cs ├── Mid0105.cs ├── Mid0106.cs ├── Mid0107.cs ├── Mid0108.cs ├── Mid0109.cs ├── PowerMACSMessages.cs ├── SpecialValue.cs └── StepResult.cs ├── Result ├── IResult.cs ├── Mid1201.cs ├── Mid1202.cs ├── Mid1203.cs ├── ObjectData.cs └── ResultMessages.cs ├── Statistic ├── IStatistic.cs ├── Mid0300.cs ├── Mid0301.cs └── StatisticMessages.cs ├── Tightening ├── ITightening.cs ├── Mid0060.cs ├── Mid0061.cs ├── Mid0062.cs ├── Mid0063.cs ├── Mid0064.cs ├── Mid0065.cs ├── Mid0066.cs ├── Mid0902.cs ├── StageResult.cs ├── StrategyOptions.cs ├── TighteningErrorStatus.cs └── TighteningMessages.cs ├── Time ├── ITime.cs ├── Mid0080.cs ├── Mid0081.cs ├── Mid0082.cs └── TimeMessages.cs ├── Tool ├── ITool.cs ├── Mid0040.cs ├── Mid0041.cs ├── Mid0042.cs ├── Mid0043.cs ├── Mid0044.cs ├── Mid0045.cs ├── Mid0046.cs ├── Mid0047.cs ├── Mid0048.cs ├── Mid0700.cs ├── Mid0701.cs ├── Mid0702.cs ├── Mid0703.cs ├── Mid0704.cs ├── OpenEndData.cs ├── ToolData.cs └── ToolMessages.cs ├── UserInterface ├── IUserInterface.cs ├── Mid0110.cs ├── Mid0111.cs ├── Mid0113.cs └── UserInterfaceMessages.cs ├── VariableDataField.cs ├── Vin └── Mid0052.cs ├── _internals ├── Messages │ ├── IMessagesTemplate.cs │ ├── MessageTemplateFactory.cs │ ├── MessagesTemplate.cs │ └── MidCompiledInstance.cs ├── SafeAccessRevisionsFields.cs └── StringExtensions.cs └── vin ├── IVIN.cs ├── Mid0050.cs ├── Mid0051.cs ├── Mid0052.cs ├── Mid0053.cs ├── Mid0054.cs └── VINMessages.cs /.github/workflows/dotnetcore.yml: -------------------------------------------------------------------------------- 1 | name: dotnetcore 2 | 3 | on: 4 | pull_request: 5 | types: [opened, synchronize] 6 | push: 7 | branches-ignore: 8 | - master 9 | 10 | jobs: 11 | build: 12 | runs-on: windows-latest 13 | steps: 14 | - uses: actions/checkout@master 15 | - name: Setup .NET Core 16 | uses: actions/setup-dotnet@master 17 | with: 18 | dotnet-version: | 19 | 3.1.x 20 | 6.0.x 21 | 8.0.x 22 | - name: Build library (.net core) 23 | run: dotnet build src/OpenProtocolInterpreter/OpenProtocolInterpreter.csproj --configuration release 24 | test: 25 | runs-on: windows-latest 26 | steps: 27 | - uses: actions/checkout@master 28 | - name: Build and run .net core tests 29 | uses: actions/setup-dotnet@master 30 | with: 31 | dotnet-version: | 32 | 3.1.x 33 | 6.0.x 34 | 8.0.x 35 | - name: Test Mids 36 | run: | 37 | dotnet build src/MIDTesters.Core/MIDTesters.Core.csproj 38 | dotnet test src/MIDTesters.Core/MIDTesters.Core.csproj -------------------------------------------------------------------------------- /.github/workflows/net-standard.yml: -------------------------------------------------------------------------------- 1 | name: .Net Standard 2 | 3 | on: 4 | pull_request: 5 | paths: 6 | - 'src/*' 7 | push: 8 | branches-ignore: 9 | - master 10 | 11 | jobs: 12 | build: 13 | runs-on: windows-latest 14 | steps: 15 | - uses: actions/checkout@master 16 | - name: Setup .Net Standard 17 | uses: actions/setup-dotnet@master 18 | - name: build 19 | run: | 20 | dotnet msbuild src/OpenProtocolInterpreter/OpenProtocolInterpreter.csproj -t:restore 21 | dotnet msbuild src/OpenProtocolInterpreter/OpenProtocolInterpreter.csproj -p:Configuration=Release 22 | test: 23 | runs-on: windows-latest 24 | steps: 25 | - uses: actions/checkout@master 26 | - name: Build and run .net core tests 27 | uses: actions/setup-dotnet@master 28 | with: 29 | dotnet-version: '3.1.414' 30 | - name: Test Mids 31 | run: | 32 | dotnet build src/MIDTesters.Core/MIDTesters.Core.csproj 33 | dotnet test src/MIDTesters.Core/MIDTesters.Core.csproj -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Henrique Dal Bello Batista 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /dist/lib/net6/OpenProtocolInterpreter.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rickedb/OpenProtocolInterpreter/47dbadd635674aecc6787940b90e11774a884ace/dist/lib/net6/OpenProtocolInterpreter.dll -------------------------------------------------------------------------------- /dist/lib/net8/OpenProtocolInterpreter.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rickedb/OpenProtocolInterpreter/47dbadd635674aecc6787940b90e11774a884ace/dist/lib/net8/OpenProtocolInterpreter.dll -------------------------------------------------------------------------------- /dist/lib/netstandard2.0/OpenProtocolInterpreter.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rickedb/OpenProtocolInterpreter/47dbadd635674aecc6787940b90e11774a884ace/dist/lib/netstandard2.0/OpenProtocolInterpreter.dll -------------------------------------------------------------------------------- /docs/Desoutter/Desoutter_Controllers-Open_Protocol-MID_List.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rickedb/OpenProtocolInterpreter/47dbadd635674aecc6787940b90e11774a884ace/docs/Desoutter/Desoutter_Controllers-Open_Protocol-MID_List.pdf -------------------------------------------------------------------------------- /docs/Desoutter/Desoutter_Protocol_Manual_V22.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rickedb/OpenProtocolInterpreter/47dbadd635674aecc6787940b90e11774a884ace/docs/Desoutter/Desoutter_Protocol_Manual_V22.pdf -------------------------------------------------------------------------------- /docs/OpenProtocol_Specification.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rickedb/OpenProtocolInterpreter/47dbadd635674aecc6787940b90e11774a884ace/docs/OpenProtocol_Specification.pdf -------------------------------------------------------------------------------- /media/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rickedb/OpenProtocolInterpreter/47dbadd635674aecc6787940b90e11774a884ace/media/icon.png -------------------------------------------------------------------------------- /media/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rickedb/OpenProtocolInterpreter/47dbadd635674aecc6787940b90e11774a884ace/media/logo.png -------------------------------------------------------------------------------- /sample/OpenProtocolInterpreter.Sample/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /sample/OpenProtocolInterpreter.Sample/Driver/Events/MIDIncome.cs: -------------------------------------------------------------------------------- 1 | using OpenProtocolInterpreter; 2 | using System; 3 | 4 | namespace OpenProtocolInterpreter.Sample.Driver.Events 5 | { 6 | public class MIDIncome : EventArgs 7 | { 8 | public Mid Mid { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /sample/OpenProtocolInterpreter.Sample/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Forms; 6 | 7 | namespace OpenProtocolInterpreter.Sample 8 | { 9 | static class Program 10 | { 11 | /// 12 | /// The main entry point for the application. 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | Application.EnableVisualStyles(); 18 | Application.SetCompatibleTextRenderingDefault(false); 19 | Application.Run(new DriverForm()); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /sample/OpenProtocolInterpreter.Sample/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /sample/OpenProtocolInterpreter.Sample/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/Alarm/TestMid0070.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.Alarm; 3 | 4 | namespace MIDTesters.Alarm 5 | { 6 | [TestClass] 7 | [TestCategory("Alarm")] 8 | public class TestMid0070 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("ASCII")] 12 | public void Mid0070AllRevisions() 13 | { 14 | string pack = @"002000700021 "; 15 | var mid = _midInterpreter.Parse(pack); 16 | 17 | Assert.IsTrue(mid.Header.NoAckFlag); 18 | AssertEqualPackages(pack, mid); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("ByteArray")] 23 | public void Mid0070ByteAllRevisions() 24 | { 25 | string pack = @"002000700021 "; 26 | byte[] bytes = GetAsciiBytes(pack); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.IsTrue(mid.Header.NoAckFlag); 30 | AssertEqualPackages(bytes, mid); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/Alarm/TestMid0072.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.Alarm; 3 | 4 | namespace MIDTesters.Alarm 5 | { 6 | [TestClass] 7 | [TestCategory("Alarm")] 8 | public class TestMid0072 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("ASCII")] 12 | public void Mid0072AllRevisions() 13 | { 14 | string pack = @"00200072002 "; 15 | var mid = _midInterpreter.Parse(pack); 16 | 17 | Assert.AreEqual(typeof(Mid0072), mid.GetType()); 18 | AssertEqualPackages(pack, mid); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("ByteArray")] 23 | public void Mid0072ByteAllRevisions() 24 | { 25 | string pack = @"00200072002 "; 26 | byte[] bytes = GetAsciiBytes(pack); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0072), mid.GetType()); 30 | AssertEqualPackages(bytes, mid); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/Alarm/TestMid0073.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.Alarm; 3 | 4 | namespace MIDTesters.Alarm 5 | { 6 | [TestClass] 7 | [TestCategory("Alarm")] 8 | public class TestMid0073 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("ASCII")] 12 | public void Mid0073AllRevisions() 13 | { 14 | string pack = @"00200073002 "; 15 | var mid = _midInterpreter.Parse(pack); 16 | 17 | Assert.AreEqual(typeof(Mid0073), mid.GetType()); 18 | AssertEqualPackages(pack, mid); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("ByteArray")] 23 | public void Mid0073ByteAllRevisions() 24 | { 25 | string pack = @"00200073002 "; 26 | byte[] bytes = GetAsciiBytes(pack); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0073), mid.GetType()); 30 | AssertEqualPackages(bytes, mid); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/Alarm/TestMid0075.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.Alarm; 3 | 4 | namespace MIDTesters.Alarm 5 | { 6 | [TestClass] 7 | [TestCategory("Alarm")] 8 | public class TestMid0075 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("ASCII")] 12 | public void Mid0075AllRevisions() 13 | { 14 | string pack = @"00200075001 "; 15 | var mid = _midInterpreter.Parse(pack); 16 | 17 | Assert.AreEqual(typeof(Mid0075), mid.GetType()); 18 | AssertEqualPackages(pack, mid); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("ByteArray")] 23 | public void Mid0075ByteAllRevisions() 24 | { 25 | string pack = @"00200075001 "; 26 | byte[] bytes = GetAsciiBytes(pack); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0075), mid.GetType()); 30 | AssertEqualPackages(bytes, mid); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/Alarm/TestMid0077.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.Alarm; 3 | 4 | namespace MIDTesters.Alarm 5 | { 6 | [TestClass] 7 | [TestCategory("Alarm")] 8 | public class TestMid0077 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("ASCII")] 12 | public void Mid0077AllRevisions() 13 | { 14 | string pack = @"00200077 "; 15 | var mid = _midInterpreter.Parse(pack); 16 | 17 | Assert.AreEqual(typeof(Mid0077), mid.GetType()); 18 | AssertEqualPackages(pack, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("ByteArray")] 23 | public void Mid0077ByteAllRevisions() 24 | { 25 | string pack = @"00200077 "; 26 | byte[] bytes = GetAsciiBytes(pack); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0077), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/Alarm/TestMid0078.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.Alarm; 3 | 4 | namespace MIDTesters.Alarm 5 | { 6 | [TestClass] 7 | [TestCategory("Alarm")] 8 | public class TestMid0078 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("ASCII")] 12 | public void Mid0078AllRevisions() 13 | { 14 | string pack = @"00200078 "; 15 | var mid = _midInterpreter.Parse(pack); 16 | 17 | Assert.AreEqual(typeof(Mid0078), mid.GetType()); 18 | AssertEqualPackages(pack, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("ByteArray")] 23 | public void Mid0078ByteAllRevisions() 24 | { 25 | string pack = @"00200078 "; 26 | byte[] bytes = GetAsciiBytes(pack); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0078), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/ApplicationSelector/TestMid0252.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.ApplicationSelector; 3 | 4 | namespace MIDTesters.ApplicationSelector 5 | { 6 | [TestClass] 7 | [TestCategory("ApplicationSelector")] 8 | public class TestMid0252 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0252Revision1() 13 | { 14 | string package = "00200252 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0252), mid.GetType()); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0252ByteRevision1() 24 | { 25 | string package = "00200252 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0252), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/ApplicationSelector/TestMid0253.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.ApplicationSelector; 3 | 4 | namespace MIDTesters.ApplicationSelector 5 | { 6 | [TestClass] 7 | [TestCategory("ApplicationSelector")] 8 | public class TestMid0253 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0253Revision1() 13 | { 14 | string package = "00200253 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0253), mid.GetType()); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0253ByteRevision1() 24 | { 25 | string package = "00200253 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0253), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/AutomaticManualMode/TestMid0402.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.AutomaticManualMode; 3 | 4 | namespace MIDTesters.AutomaticManualMode 5 | { 6 | [TestClass] 7 | [TestCategory("AutomaticManualMode")] 8 | public class TestMid0402 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0402Revision1() 13 | { 14 | string package = "00200402 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0402), mid.GetType()); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0402ByteRevision1() 24 | { 25 | string package = "00200402 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0402), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/AutomaticManualMode/TestMid0403.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.AutomaticManualMode; 3 | 4 | namespace MIDTesters.AutomaticManualMode 5 | { 6 | [TestClass] 7 | [TestCategory("AutomaticManualMode")] 8 | public class TestMid0403 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0403Revision1() 13 | { 14 | string package = "00200403 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0403), mid.GetType()); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0403ByteRevision1() 24 | { 25 | string package = "00200403 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0403), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/AutomaticManualMode/TestMid0410.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.AutomaticManualMode; 3 | 4 | namespace MIDTesters.AutomaticManualMode 5 | { 6 | [TestClass] 7 | [TestCategory("AutomaticManualMode")] 8 | public class TestMid0410 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0410Revision1() 13 | { 14 | string package = "00200410 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0410), mid.GetType()); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0410ByteRevision1() 24 | { 25 | string package = "00200410 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0410), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/Communication/TestMid0003.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.Communication; 3 | 4 | namespace MIDTesters.Communication 5 | { 6 | [TestClass] 7 | [TestCategory("Communication")] 8 | public class TestMid0003 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0003Revision1() 13 | { 14 | string pack = @"00200003001 "; 15 | var mid = _midInterpreter.Parse(pack); 16 | 17 | AssertEqualPackages(pack, mid); 18 | } 19 | 20 | [TestMethod] 21 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 22 | public void Mid0003ByteRevision1() 23 | { 24 | string pack = @"00200003001 "; 25 | byte[] bytes = GetAsciiBytes(pack); 26 | var mid = _midInterpreter.Parse(bytes); 27 | 28 | AssertEqualPackages(bytes, mid); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/Communication/TestMid0005.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.Communication; 3 | 4 | namespace MIDTesters.Communication 5 | { 6 | [TestClass] 7 | [TestCategory("Communication")] 8 | public class TestMid0005 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0005Revision1() 13 | { 14 | string pack = @"00240005 0018"; 15 | var mid = _midInterpreter.Parse(pack); 16 | 17 | Assert.IsNotNull(mid.MidAccepted); 18 | AssertEqualPackages(pack, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0005ByteRevision1() 24 | { 25 | string pack = @"00240005 0018"; 26 | byte[] bytes = GetAsciiBytes(pack); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.IsNotNull(mid.MidAccepted); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/Converters/PaddingConverterTest.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter; 3 | 4 | namespace MIDTesters.Core.Converters 5 | { 6 | [TestClass] 7 | [TestCategory("Converters")] 8 | public class PaddingConverterTest 9 | { 10 | [TestMethod] 11 | [TestCategory("Padding")] 12 | public void LeftPaddingTest() 13 | { 14 | Assert.AreEqual(" ABC", OpenProtocolConvert.TruncatePadded(' ', 10, PaddingOrientation.LeftPadded, "ABC")); 15 | } 16 | 17 | [TestMethod] 18 | [TestCategory("Padding")] 19 | public void RightPaddingTest() 20 | { 21 | Assert.AreEqual("ABC ", OpenProtocolConvert.TruncatePadded(' ', 10, PaddingOrientation.RightPadded, "ABC")); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/DefaultMidTests.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter; 3 | using System; 4 | 5 | namespace MIDTesters 6 | { 7 | public class DefaultMidTests : MidTester where TMid : Mid 8 | { 9 | [TestMethod] 10 | [TestCategory("Default")] 11 | public void HasParameterlessConstructor() 12 | { 13 | var constructor = typeof(TMid).GetConstructor(new Type[] { }); 14 | Assert.IsTrue(constructor != null); 15 | } 16 | 17 | [TestMethod] 18 | [TestCategory("Default")] 19 | public void HasHeaderParameterConstructor() 20 | { 21 | var constructor = typeof(TMid).GetConstructor(new Type[] { typeof(Header) }); 22 | Assert.IsTrue(constructor != null); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/IOInterface/TestMid0212.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.IOInterface; 3 | 4 | namespace MIDTesters.IOInterface 5 | { 6 | [TestClass] 7 | [TestCategory("IOInterface")] 8 | public class TestMid0212 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0212Revision1() 13 | { 14 | string package = "00200212 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0212), mid.GetType()); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0212ByteRevision1() 24 | { 25 | string package = "00200212 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0212), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/IOInterface/TestMid0213.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.IOInterface; 3 | 4 | namespace MIDTesters.IOInterface 5 | { 6 | [TestClass] 7 | [TestCategory("IOInterface")] 8 | public class TestMid0213 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0213Revision1() 13 | { 14 | string package = "00200213 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0213), mid.GetType()); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0213ByteRevision1() 24 | { 25 | string package = "00200213 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0213), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/IOInterface/TestMid0214.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.IOInterface; 3 | 4 | namespace MIDTesters.IOInterface 5 | { 6 | [TestClass] 7 | [TestCategory("IOInterface")] 8 | public class TestMid0214 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("ASCII")] 12 | public void Mid0214AllRevisions() 13 | { 14 | string package = "00220214002 10"; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.IsNotNull(mid.DeviceNumber); 18 | AssertEqualPackages(package, mid); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("ByteArray")] 23 | public void Mid0214ByteAllRevisions() 24 | { 25 | string package = "00220214002 10"; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.IsNotNull(mid.DeviceNumber); 30 | AssertEqualPackages(bytes, mid); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/IOInterface/TestMid0216.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.IOInterface; 3 | 4 | namespace MIDTesters.IOInterface 5 | { 6 | [TestClass] 7 | [TestCategory("IOInterface")] 8 | public class TestMid0216 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0216Revision1() 13 | { 14 | string package = "00230216 1 026"; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.IsNotNull(mid.RelayNumber); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0216ByteRevision1() 24 | { 25 | string package = "00230216 1 026"; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.IsNotNull(mid.RelayNumber); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/IOInterface/TestMid0218.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.IOInterface; 3 | 4 | namespace MIDTesters.IOInterface 5 | { 6 | [TestClass] 7 | [TestCategory("IOInterface")] 8 | public class TestMid0218 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0218Revision1() 13 | { 14 | string package = "00200218 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0218), mid.GetType()); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0218ByteRevision1() 24 | { 25 | string package = "00200218 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0218), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/IOInterface/TestMid0219.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.IOInterface; 3 | 4 | namespace MIDTesters.IOInterface 5 | { 6 | [TestClass] 7 | [TestCategory("IOInterface")] 8 | public class TestMid0219 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0219Revision1() 13 | { 14 | string package = "00230219 102"; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.IsNotNull(mid.RelayNumber); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0219ByteRevision1() 24 | { 25 | string package = "00230219 102"; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.IsNotNull(mid.RelayNumber); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/IOInterface/TestMid0220.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.IOInterface; 3 | 4 | namespace MIDTesters.IOInterface 5 | { 6 | [TestClass] 7 | [TestCategory("IOInterface")] 8 | public class TestMid0220 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0220Revision1() 13 | { 14 | string package = "00230220 120"; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.IsNotNull(mid.DigitalInputNumber); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0220ByteRevision1() 24 | { 25 | string package = "00230220 120"; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.IsNotNull(mid.DigitalInputNumber); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/IOInterface/TestMid0222.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.IOInterface; 3 | 4 | namespace MIDTesters.IOInterface 5 | { 6 | [TestClass] 7 | [TestCategory("IOInterface")] 8 | public class TestMid0222 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0222Revision1() 13 | { 14 | string package = "00200222 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0222), mid.GetType()); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0222ByteRevision1() 24 | { 25 | string package = "00200222 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0222), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/IOInterface/TestMid0223.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.IOInterface; 3 | 4 | namespace MIDTesters.IOInterface 5 | { 6 | [TestClass] 7 | [TestCategory("IOInterface")] 8 | public class TestMid0223 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0223Revision1() 13 | { 14 | string package = "00230223 066"; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.IsNotNull(mid.DigitalInputNumber); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0223ByteRevision1() 24 | { 25 | string package = "00230223 066"; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.IsNotNull(mid.DigitalInputNumber); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/IOInterface/TestMid0224.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.IOInterface; 3 | 4 | namespace MIDTesters.IOInterface 5 | { 6 | [TestClass] 7 | [TestCategory("IOInterface")] 8 | public class TestMid0224 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0224Revision1() 13 | { 14 | string package = "00230224 065"; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.IsNotNull(mid.DigitalInputNumber); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0224ByteRevision1() 24 | { 25 | string package = "00230224 065"; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.IsNotNull(mid.DigitalInputNumber); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/IOInterface/TestMid0225.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.IOInterface; 3 | 4 | namespace MIDTesters.IOInterface 5 | { 6 | [TestClass] 7 | [TestCategory("IOInterface")] 8 | public class TestMid0225 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0225Revision1() 13 | { 14 | string package = "00230225 055"; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.IsNotNull(mid.DigitalInputNumber); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0225ByteRevision1() 24 | { 25 | string package = "00230225 055"; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.IsNotNull(mid.DigitalInputNumber); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/Job/Advanced/TestMid0125.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.Job.Advanced; 3 | 4 | namespace MIDTesters.Job.Advanced 5 | { 6 | [TestClass] 7 | [TestCategory("Job"), TestCategory("Advanced Job")] 8 | public class TestMid0125 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0125Revision1() 13 | { 14 | string package = "00200125 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0125), mid.GetType()); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0125ByteRevision1() 24 | { 25 | string package = "00200125 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0125), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/Job/Advanced/TestMid0126.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.Job.Advanced; 3 | 4 | namespace MIDTesters.Job.Advanced 5 | { 6 | [TestClass] 7 | [TestCategory("Job"), TestCategory("Advanced Job")] 8 | public class TestMid0126 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0126Revision1() 13 | { 14 | string package = "00200126 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0126), mid.GetType()); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0126ByteRevision1() 24 | { 25 | string package = "00200126 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0126), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/Job/Advanced/TestMid0127.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.Job.Advanced; 3 | 4 | namespace MIDTesters.Job.Advanced 5 | { 6 | [TestClass] 7 | [TestCategory("Job"), TestCategory("Advanced Job")] 8 | public class TestMid0127 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0127Revision1() 13 | { 14 | string package = "00200127001 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0127), mid.GetType()); 18 | AssertEqualPackages(package, mid); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0127ByteRevision1() 24 | { 25 | string package = "00200127001 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0127), mid.GetType()); 30 | AssertEqualPackages(bytes, mid); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/Job/Advanced/TestMid0128.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.Job.Advanced; 3 | 4 | namespace MIDTesters.Job.Advanced 5 | { 6 | [TestClass] 7 | [TestCategory("Job"), TestCategory("Advanced Job")] 8 | public class TestMid0128 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0128Revision1() 13 | { 14 | string package = "00200128 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0128), mid.GetType()); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0128ByteRevision1() 24 | { 25 | string package = "00200128 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0128), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/Job/Advanced/TestMid0130.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.Job.Advanced; 3 | 4 | namespace MIDTesters.Job.Advanced 5 | { 6 | [TestClass] 7 | [TestCategory("Job"), TestCategory("Advanced Job")] 8 | public class TestMid0130 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0130Revision1() 13 | { 14 | string package = "00210130 1"; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.IsNotNull(mid.JobOffStatus); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0130ByteRevision1() 24 | { 25 | string package = "00210130 1"; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.IsNotNull(mid.JobOffStatus); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/Job/Advanced/TestMid0131.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.Job.Advanced; 3 | 4 | namespace MIDTesters.Job.Advanced 5 | { 6 | [TestClass] 7 | [TestCategory("Job"), TestCategory("Advanced Job")] 8 | public class TestMid0131 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0131Revision1() 13 | { 14 | string package = "00200131 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0131), mid.GetType()); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0131ByteRevision1() 24 | { 25 | string package = "00200131 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0131), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/Job/Advanced/TestMid0132.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.Job.Advanced; 3 | 4 | namespace MIDTesters.Job.Advanced 5 | { 6 | [TestClass] 7 | [TestCategory("Job"), TestCategory("Advanced Job")] 8 | public class TestMid0132 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0132Revision1() 13 | { 14 | string package = "00200132 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0132), mid.GetType()); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0132ByteRevision1() 24 | { 25 | string package = "00200132 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0132), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/Job/Advanced/TestMid0133.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.Job.Advanced; 3 | 4 | namespace MIDTesters.Job.Advanced 5 | { 6 | [TestClass] 7 | [TestCategory("Job"), TestCategory("Advanced Job")] 8 | public class TestMid0133 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0133Revision1() 13 | { 14 | string package = "00200133 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0133), mid.GetType()); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0133ByteRevision1() 24 | { 25 | string package = "00200133 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0133), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/Job/TestMid0030.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.Job; 3 | 4 | namespace MIDTesters.Job 5 | { 6 | [TestClass] 7 | [TestCategory("Job")] 8 | public class TestMid0030 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("ASCII")] 12 | public void Mid0030AllRevisions() 13 | { 14 | string package = "00200030002 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0030), mid.GetType()); 18 | AssertEqualPackages(package, mid); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("ByteArray")] 23 | public void Mid0030ByteAllRevisions() 24 | { 25 | string package = "00200030002 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0030), mid.GetType()); 30 | AssertEqualPackages(bytes, mid); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/Job/TestMid0034.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.Job; 3 | 4 | namespace MIDTesters.Job 5 | { 6 | [TestClass] 7 | [TestCategory("Job")] 8 | public class TestMid0034 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("ASCII")] 12 | public void Mid0034AllRevisions() 13 | { 14 | string package = "00200034001 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0034), mid.GetType()); 18 | AssertEqualPackages(package, mid); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("ByteArray")] 23 | public void Mid0034ByteAllRevisions() 24 | { 25 | string package = "00200034001 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0034), mid.GetType()); 30 | AssertEqualPackages(bytes, mid); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/Job/TestMid0036.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.Job; 3 | 4 | namespace MIDTesters.Job 5 | { 6 | [TestClass] 7 | [TestCategory("Job")] 8 | public class TestMid0036 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("ASCII")] 12 | public void Mid0036AllRevisions() 13 | { 14 | string package = "00200036001 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0036), mid.GetType()); 18 | AssertEqualPackages(package, mid); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("ByteArray")] 23 | public void Mid0036ByteAllRevisions() 24 | { 25 | string package = "00200036001 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0036), mid.GetType()); 30 | AssertEqualPackages(bytes, mid); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/Job/TestMid0037.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.Job; 3 | 4 | namespace MIDTesters.Job 5 | { 6 | [TestClass] 7 | [TestCategory("Job")] 8 | public class TestMid0037 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("ASCII")] 12 | public void Mid0037AllRevisions() 13 | { 14 | string package = "00200037001 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0037), mid.GetType()); 18 | AssertEqualPackages(package, mid); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("ByteArray")] 23 | public void Mid0037ByteAllRevisions() 24 | { 25 | string package = "00200037001 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0037), mid.GetType()); 30 | AssertEqualPackages(bytes, mid); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/KeepAlive/TestMid9999.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.KeepAlive; 3 | 4 | namespace MIDTesters.KeepAlive 5 | { 6 | [TestClass] 7 | [TestCategory("KeepAlive")] 8 | public class TestMid9999 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid9999Revision1() 13 | { 14 | string package = "00209999 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid9999), mid.GetType()); 18 | AssertEqualPackages(package, mid); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid9999ByteRevision1() 24 | { 25 | string package = "00209999 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid9999), mid.GetType()); 30 | AssertEqualPackages(bytes, mid); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/LinkCommunication/TestMid9997.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.LinkCommunication; 3 | 4 | namespace MIDTesters.LinkCommunication 5 | { 6 | [TestClass] 7 | [TestCategory("LinkCommunication")] 8 | public class TestMid9997 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid9997Revision1() 13 | { 14 | string package = "00249997001 0061"; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreNotEqual(0, mid.MidNumber); 18 | AssertEqualPackages(package, mid); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid9997ByteRevision1() 24 | { 25 | string package = "00249997001 0065"; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreNotEqual(0, mid.MidNumber); 30 | AssertEqualPackages(bytes, mid); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/MIDTesters.Core.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0 5 | 6 | false 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/MotorTuning/TestMid0500.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.MotorTuning; 3 | 4 | namespace MIDTesters.MotorTuning 5 | { 6 | [TestClass] 7 | [TestCategory("MotorTuning")] 8 | public class TestMid0500 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0500Revision1() 13 | { 14 | string package = "00200500 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0500), mid.GetType()); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0500ByteRevision1() 24 | { 25 | string package = "00200500 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0500), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/MotorTuning/TestMid0501.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.MotorTuning; 3 | 4 | namespace MIDTesters.MotorTuning 5 | { 6 | [TestClass] 7 | [TestCategory("MotorTuning")] 8 | public class TestMid0501 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0501Revision1() 13 | { 14 | string package = "00230501 011"; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.IsNotNull(mid.MotorTuneResult); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0501ByteRevision1() 24 | { 25 | string package = "00230501 011"; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.IsNotNull(mid.MotorTuneResult); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/MotorTuning/TestMid0502.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.MotorTuning; 3 | 4 | namespace MIDTesters.MotorTuning 5 | { 6 | [TestClass] 7 | [TestCategory("MotorTuning")] 8 | public class TestMid0502 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0502Revision1() 13 | { 14 | string package = "00200502 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0502), mid.GetType()); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0502ByteRevision1() 24 | { 25 | string package = "00200502 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0502), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/MotorTuning/TestMid0503.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.MotorTuning; 3 | 4 | namespace MIDTesters.MotorTuning 5 | { 6 | [TestClass] 7 | [TestCategory("MotorTuning")] 8 | public class TestMid0503 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0503Revision1() 13 | { 14 | string package = "00200503 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0503), mid.GetType()); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0503ByteRevision1() 24 | { 25 | string package = "00200503 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0503), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/MotorTuning/TestMid0504.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.MotorTuning; 3 | 4 | namespace MIDTesters.MotorTuning 5 | { 6 | [TestClass] 7 | [TestCategory("MotorTuning")] 8 | public class TestMid0504 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0504Revision1() 13 | { 14 | string package = "00200504 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0504), mid.GetType()); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0504ByteRevision1() 24 | { 25 | string package = "00200504 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0504), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/MultiSpindle/TestMid0092.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.MultiSpindle; 3 | 4 | namespace MIDTesters.MultiSpindle 5 | { 6 | [TestClass] 7 | [TestCategory("MultiSpindle")] 8 | public class TestMid0092 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("ASCII")] 12 | public void Mid0092AllRevisions() 13 | { 14 | string pack = @"00200092 "; 15 | var mid = _midInterpreter.Parse(pack); 16 | 17 | Assert.AreEqual(typeof(Mid0092), mid.GetType()); 18 | AssertEqualPackages(pack, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("ByteArray")] 23 | public void Mid0092ByteAllRevisions() 24 | { 25 | string package = @"00200092 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0092), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/MultiSpindle/TestMid0093.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.MultiSpindle; 3 | 4 | namespace MIDTesters.MultiSpindle 5 | { 6 | [TestClass] 7 | [TestCategory("MultiSpindle")] 8 | public class TestMid0093 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("ASCII")] 12 | public void Mid0093AllRevisions() 13 | { 14 | string pack = @"00200093 "; 15 | var mid = _midInterpreter.Parse(pack); 16 | 17 | Assert.AreEqual(typeof(Mid0093), mid.GetType()); 18 | AssertEqualPackages(pack, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("ByteArray")] 23 | public void Mid0093ByteAllRevisions() 24 | { 25 | string package = @"00200093 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0093), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/MultiSpindle/TestMid0102.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.MultiSpindle; 3 | 4 | namespace MIDTesters.MultiSpindle 5 | { 6 | [TestClass] 7 | [TestCategory("MultiSpindle")] 8 | public class TestMid0102 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0102Revision1() 13 | { 14 | string pack = @"00200102 "; 15 | var mid = _midInterpreter.Parse(pack); 16 | 17 | Assert.AreEqual(typeof(Mid0102), mid.GetType()); 18 | AssertEqualPackages(pack, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0102ByteRevision1() 24 | { 25 | string package = @"00200102 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0102), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/MultiSpindle/TestMid0103.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.MultiSpindle; 3 | 4 | namespace MIDTesters.MultiSpindle 5 | { 6 | [TestClass] 7 | [TestCategory("MultiSpindle")] 8 | public class TestMid0103 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0102Revision1() 13 | { 14 | string pack = @"00200103 "; 15 | var mid = _midInterpreter.Parse(pack); 16 | 17 | Assert.AreEqual(typeof(Mid0103), mid.GetType()); 18 | AssertEqualPackages(pack, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0102ByteRevision1() 24 | { 25 | string package = @"00200103 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0103), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/MultipleIdentifiers/TestMid0153.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.MultipleIdentifiers; 3 | 4 | namespace MIDTesters.MultipleIdentifiers 5 | { 6 | [TestClass] 7 | [TestCategory("MultipleIdentifiers")] 8 | public class TestMid0153 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0153Revision1() 13 | { 14 | string package = "00200153 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0153), mid.GetType()); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0153ByteRevision1() 24 | { 25 | string package = "00200153 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0153), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/MultipleIdentifiers/TestMid0154.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.MultipleIdentifiers; 3 | 4 | namespace MIDTesters.MultipleIdentifiers 5 | { 6 | [TestClass] 7 | [TestCategory("MultipleIdentifiers")] 8 | public class TestMid0154 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0154Revision1() 13 | { 14 | string package = "00200154 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0154), mid.GetType()); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0154ByteRevision1() 24 | { 25 | string package = "00200154 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0154), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/MultipleIdentifiers/TestMid0155.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.MultipleIdentifiers; 3 | 4 | namespace MIDTesters.MultipleIdentifiers 5 | { 6 | [TestClass] 7 | [TestCategory("MultipleIdentifiers")] 8 | public class TestMid0155 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0155Revision1() 13 | { 14 | string package = "00200155 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0155), mid.GetType()); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0155ByteRevision1() 24 | { 25 | string package = "00200155 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0155), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/PLCUserData/TestMid0241.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.PLCUserData; 3 | 4 | namespace MIDTesters.PLCUserData 5 | { 6 | [TestClass] 7 | [TestCategory("PLCUserData")] 8 | public class TestMid0241 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0241Revision1() 13 | { 14 | string package = "00200241 1 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.IsTrue(mid.Header.NoAckFlag); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0241ByteRevision1() 24 | { 25 | string package = "00200241 1 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.IsTrue(mid.Header.NoAckFlag); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/PLCUserData/TestMid0243.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.PLCUserData; 3 | 4 | namespace MIDTesters.PLCUserData 5 | { 6 | [TestClass] 7 | [TestCategory("PLCUserData")] 8 | public class TestMid0243 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0243Revision1() 13 | { 14 | string package = "00200243 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0243), mid.GetType()); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0243ByteRevision1() 24 | { 25 | string package = "00200243 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0243), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/PLCUserData/TestMid0244.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.PLCUserData; 3 | 4 | namespace MIDTesters.PLCUserData 5 | { 6 | [TestClass] 7 | [TestCategory("PLCUserData")] 8 | public class TestMid0244 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0244Revision1() 13 | { 14 | string package = "00200244 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0244), mid.GetType()); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0244ByteRevision1() 24 | { 25 | string package = "00200244 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0244), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/ParameterSet/TestMid0010.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.ParameterSet; 3 | 4 | namespace MIDTesters.ParameterSet 5 | { 6 | [TestClass] 7 | [TestCategory("ParameterSet")] 8 | public class TestMid0010 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("ASCII")] 12 | public void Mid0010AllRevisions() 13 | { 14 | string package = "00200010002 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0010), mid.GetType()); 18 | AssertEqualPackages(package, mid); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("ByteArray")] 23 | public void Mid0010ByteAllRevisions() 24 | { 25 | string package = "00200010002 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0010), mid.GetType()); 30 | AssertEqualPackages(bytes, mid); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/ParameterSet/TestMid0014.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.ParameterSet; 3 | 4 | namespace MIDTesters.ParameterSet 5 | { 6 | [TestClass] 7 | [TestCategory("ParameterSet")] 8 | public class TestMid0014 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0014Revision1() 13 | { 14 | string package = "00200014 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0014), mid.GetType()); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0014ByteRevision1() 24 | { 25 | string package = "00200014 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0014), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/ParameterSet/TestMid0016.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.ParameterSet; 3 | 4 | namespace MIDTesters.ParameterSet 5 | { 6 | [TestClass] 7 | [TestCategory("ParameterSet")] 8 | public class TestMid0016 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0016Revision1() 13 | { 14 | string package = "00200016 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0016), mid.GetType()); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0016ByteRevision1() 24 | { 25 | string package = "00200016 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0016), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/ParameterSet/TestMid0017.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.ParameterSet; 3 | 4 | namespace MIDTesters.ParameterSet 5 | { 6 | [TestClass] 7 | [TestCategory("ParameterSet")] 8 | public class TestMid0017 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0017Revision1() 13 | { 14 | string package = "00200017 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0017), mid.GetType()); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0017ByteRevision1() 24 | { 25 | string package = "00200017 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0017), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/ParameterSet/TestMid0018.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.ParameterSet; 3 | 4 | namespace MIDTesters.ParameterSet 5 | { 6 | [TestClass] 7 | [TestCategory("ParameterSet")] 8 | public class TestMid0018 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0018Revision1() 13 | { 14 | string package = "00230018001 022"; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.IsNotNull(mid.ParameterSetId); 18 | AssertEqualPackages(package, mid); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0018ByteRevision1() 24 | { 25 | string package = "00230018001 022"; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.IsNotNull(mid.ParameterSetId); 30 | AssertEqualPackages(bytes, mid); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/ParameterSet/TestMid0020.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.ParameterSet; 3 | 4 | namespace MIDTesters.ParameterSet 5 | { 6 | [TestClass] 7 | [TestCategory("ParameterSet")] 8 | public class TestMid0020 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0020Revision1() 13 | { 14 | string package = "00230020 054"; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.IsNotNull(mid.ParameterSetId); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0020ByteRevision1() 24 | { 25 | string package = "00230020 054"; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.IsNotNull(mid.ParameterSetId); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/ParameterSet/TestMid0023.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.ParameterSet; 3 | 4 | namespace MIDTesters.ParameterSet 5 | { 6 | [TestClass] 7 | [TestCategory("ParameterSet")] 8 | public class TestMid0023 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0023Revision1() 13 | { 14 | string package = "00200023 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0023), mid.GetType()); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0023ByteRevision1() 24 | { 25 | string package = "00200023 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0023), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/ParameterSet/TestMid0024.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.ParameterSet; 3 | 4 | namespace MIDTesters.ParameterSet 5 | { 6 | [TestClass] 7 | [TestCategory("ParameterSet")] 8 | public class TestMid0024 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0024Revision1() 13 | { 14 | string package = "00200024 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0024), mid.GetType()); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0024ByteRevision1() 24 | { 25 | string package = "00200024 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0024), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/ParameterSet/TestMid2504.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.ParameterSet; 3 | 4 | namespace MIDTesters.ParameterSet 5 | { 6 | [TestClass] 7 | [TestCategory("ParameterSet")] 8 | public class TestMid2504 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid2504Revision1() 13 | { 14 | string package = "00232504001 010"; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.IsNotNull(mid.ParameterSetId); 18 | AssertEqualPackages(package, mid); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid2504ByteRevision1() 24 | { 25 | string package = "00232504001 010"; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.IsNotNull(mid.ParameterSetId); 30 | AssertEqualPackages(bytes, mid); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/PowerMACS/TestMid0108.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.PowerMACS; 3 | 4 | namespace MIDTesters.PowerMACS 5 | { 6 | [TestClass] 7 | [TestCategory("PowerMACS")] 8 | public class TestMid0108 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("ASCII")] 12 | public void Mid0108AllRevisions() 13 | { 14 | string package = "00210108002 1"; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.IsNotNull(mid.BoltData); 18 | AssertEqualPackages(package, mid); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("ByteArray")] 23 | public void Mid0108ByteAllRevisions() 24 | { 25 | string package = "00210108002 1"; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.IsNotNull(mid.BoltData); 30 | AssertEqualPackages(bytes, mid); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/PowerMACS/TestMid0109.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.PowerMACS; 3 | 4 | namespace MIDTesters.PowerMACS 5 | { 6 | [TestClass] 7 | [TestCategory("PowerMACS")] 8 | public class TestMid0109 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("ASCII")] 12 | public void Mid0109AllRevisions() 13 | { 14 | string package = "00200109002 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0109), mid.GetType()); 18 | AssertEqualPackages(package, mid); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("ByteArray")] 23 | public void Mid0109ByteAllRevisions() 24 | { 25 | string package = "00200109002 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0109), mid.GetType()); 30 | AssertEqualPackages(bytes, mid); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/TestMidHeader.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.Communication; 3 | 4 | namespace MIDTesters 5 | { 6 | [TestClass] 7 | [TestCategory("Header")] 8 | public class TestMidHeader : MidTester 9 | { 10 | 11 | [TestMethod] 12 | public void TestRevisionEmpty() 13 | { 14 | var package = "00200001 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0001), mid.GetType()); 18 | Assert.AreEqual(1, mid.Header.Revision); 19 | } 20 | 21 | [TestMethod] 22 | public void TestRevisionZero() 23 | { 24 | var package = "00200001000 "; 25 | var mid = _midInterpreter.Parse(package); 26 | 27 | Assert.AreEqual(typeof(Mid0001), mid.GetType()); 28 | Assert.AreEqual(1, mid.Header.Revision); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/Tightening/TestMid0060.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.Tightening; 3 | 4 | namespace MIDTesters.Tightening 5 | { 6 | [TestClass] 7 | [TestCategory("Tightening")] 8 | public class TestMid0060 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("ASCII")] 12 | public void Mid0060AllRevisions() 13 | { 14 | string package = "00200060998 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0060), mid.GetType()); 18 | AssertEqualPackages(package, mid); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("ByteArray")] 23 | public void Mid0060ByteAllRevisions() 24 | { 25 | string package = "00200060998 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0060), mid.GetType()); 30 | AssertEqualPackages(bytes, mid); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/Tightening/TestMid0062.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.Tightening; 3 | 4 | namespace MIDTesters.Tightening 5 | { 6 | [TestClass] 7 | [TestCategory("Tightening")] 8 | public class TestMid0062 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("ASCII")] 12 | public void Mid0062AllRevisions() 13 | { 14 | string package = "00200062005 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0062), mid.GetType()); 18 | AssertEqualPackages(package, mid); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("ByteArray")] 23 | public void Mid0062ByteAllRevisions() 24 | { 25 | string package = "00200062005 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0062), mid.GetType()); 30 | AssertEqualPackages(bytes, mid); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/Tightening/TestMid0063.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.Tightening; 3 | 4 | namespace MIDTesters.Tightening 5 | { 6 | [TestClass] 7 | [TestCategory("Tightening")] 8 | public class TestMid0063 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("ASCII")] 12 | public void Mid0063AllRevisions() 13 | { 14 | string package = "00200063002 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0063), mid.GetType()); 18 | AssertEqualPackages(package, mid); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("ByteArray")] 23 | public void Mid0063ByteAllRevisions() 24 | { 25 | string package = "00200063002 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0063), mid.GetType()); 30 | AssertEqualPackages(bytes, mid); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/Time/TestMid0080.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.Time; 3 | 4 | namespace MIDTesters.Time 5 | { 6 | [TestClass] 7 | [TestCategory("Time")] 8 | public class TestMid0080 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("ASCII")] 12 | public void Mid0080AllRevisions() 13 | { 14 | string pack = @"00200080 "; 15 | var mid = _midInterpreter.Parse(pack); 16 | 17 | Assert.AreEqual(typeof(Mid0080), mid.GetType()); 18 | AssertEqualPackages(pack, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("ByteArray")] 23 | public void Mid0080ByteAllRevisions() 24 | { 25 | string package = "00200080 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0080), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/Time/TestMid0081.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.Time; 3 | 4 | namespace MIDTesters.Time 5 | { 6 | [TestClass] 7 | [TestCategory("Time")] 8 | public class TestMid0081 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0081Revision1() 13 | { 14 | string pack = @"00390081 2017-12-01:20:12:45"; 15 | var mid = _midInterpreter.Parse(pack); 16 | 17 | Assert.IsNotNull(mid.Time); 18 | AssertEqualPackages(pack, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0081ByteRevision1() 24 | { 25 | string package = @"00390081 2017-12-01:20:12:45"; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.IsNotNull(mid.Time); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/Time/TestMid0082.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.Time; 3 | 4 | namespace MIDTesters.Time 5 | { 6 | [TestClass] 7 | [TestCategory("Time")] 8 | public class TestMid0082 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0082Revision1() 13 | { 14 | string pack = @"00390082 2017-12-01:20:12:45"; 15 | var mid = _midInterpreter.Parse(pack); 16 | 17 | Assert.IsNotNull(mid.Time); 18 | AssertEqualPackages(pack, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0082ByteRevision1() 24 | { 25 | string package = @"00390082 2017-12-01:20:12:45"; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.IsNotNull(mid.Time); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/Tool/TestMid0044.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.Tool; 3 | 4 | namespace MIDTesters.Tool 5 | { 6 | [TestClass] 7 | [TestCategory("Tool")] 8 | public class TestMid0044 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0044AllRevisions() 13 | { 14 | string package = "00200044 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0044), mid.GetType()); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0044ByteAllRevisions() 24 | { 25 | string package = "00200044 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0044), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/Tool/TestMid0046.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.Tool; 3 | 4 | namespace MIDTesters.Tool 5 | { 6 | [TestClass] 7 | [TestCategory("Tool")] 8 | public class TestMid0046 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0046Revision1() 13 | { 14 | string package = "00240046001 0102"; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.IsNotNull(mid.PrimaryTool); 18 | AssertEqualPackages(package, mid); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0046ByteRevision1() 24 | { 25 | string package = "00240046001 0102"; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.IsNotNull(mid.PrimaryTool); 30 | AssertEqualPackages(bytes, mid); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/Tool/TestMid0047.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.Tool; 3 | 4 | namespace MIDTesters.Tool 5 | { 6 | [TestClass] 7 | [TestCategory("Tool")] 8 | public class TestMid0047 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0047Revision1() 13 | { 14 | string package = "00240047001 0103"; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.IsNotNull(mid.PairingHandlingType); 18 | AssertEqualPackages(package, mid); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0047ByteRevision1() 24 | { 25 | string package = "00240047001 0103"; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.IsNotNull(mid.PairingHandlingType); 30 | AssertEqualPackages(bytes, mid); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/UserInterface/TestMid0110.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.UserInterface; 3 | 4 | namespace MIDTesters.UserInterface 5 | { 6 | [TestClass] 7 | [TestCategory("UserInterface")] 8 | public class TestMid0110 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0110Revision1() 13 | { 14 | string package = "00240110001 TEST"; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.IsNotNull(mid.UserText); 18 | AssertEqualPackages(package, mid); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0110ByteRevision1() 24 | { 25 | string package = "00240110001 TEST"; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.IsNotNull(mid.UserText); 30 | AssertEqualPackages(bytes, mid); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/UserInterface/TestMid0113.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.UserInterface; 3 | 4 | namespace MIDTesters.UserInterface 5 | { 6 | [TestClass] 7 | [TestCategory("UserInterface")] 8 | public class TestMid0113 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0113Revision1() 13 | { 14 | string package = "00200113 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0113), mid.GetType()); 18 | AssertEqualPackages(package, mid, true); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0113ByteAllRevisions() 24 | { 25 | string package = "00200113 "; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.AreEqual(typeof(Mid0113), mid.GetType()); 30 | AssertEqualPackages(bytes, mid, true); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/Vin/TestMid0050.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.Vin; 3 | 4 | namespace MIDTesters.Vin 5 | { 6 | [TestClass] 7 | [TestCategory("Vin")] 8 | public class TestMid0050 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("Revision 1"), TestCategory("ASCII")] 12 | public void Mid0050Revision1() 13 | { 14 | string package = "00350050001 VehicleIdNumber"; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.IsNotNull(mid.VinNumber); 18 | AssertEqualPackages(package, mid); 19 | } 20 | 21 | [TestMethod] 22 | [TestCategory("Revision 1"), TestCategory("ByteArray")] 23 | public void Mid0050ByteRevision1() 24 | { 25 | string package = "00350050001 VehicleIdNumber"; 26 | byte[] bytes = GetAsciiBytes(package); 27 | var mid = _midInterpreter.Parse(bytes); 28 | 29 | Assert.IsNotNull(mid.VinNumber); 30 | AssertEqualPackages(bytes, mid); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/Vin/TestMid0051.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.Vin; 3 | 4 | namespace MIDTesters.Vin 5 | { 6 | [TestClass] 7 | [TestCategory("Vin")] 8 | public class TestMid0051 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("ASCII")] 12 | public void Mid0051AllRevisions() 13 | { 14 | string package = "002000510011 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | Assert.AreEqual(typeof(Mid0051), mid.GetType()); 18 | Assert.IsTrue(mid.Header.NoAckFlag); 19 | AssertEqualPackages(package, mid); 20 | } 21 | 22 | [TestMethod] 23 | [TestCategory("ByteArray")] 24 | public void Mid0051ByteAllRevisions() 25 | { 26 | string package = "002000510011 "; 27 | byte[] bytes = GetAsciiBytes(package); 28 | var mid = _midInterpreter.Parse(bytes); 29 | 30 | Assert.AreEqual(typeof(Mid0051), mid.GetType()); 31 | Assert.IsTrue(mid.Header.NoAckFlag); 32 | AssertEqualPackages(bytes, mid); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/Vin/TestMid0053.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.Vin; 3 | 4 | namespace MIDTesters.Vin 5 | { 6 | [TestClass] 7 | [TestCategory("Vin")] 8 | public class TestMid0053 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("ASCII")] 12 | public void Mid0053AllRevisions() 13 | { 14 | string package = "00200053001 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | AssertEqualPackages(package, mid); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/MIDTesters.Core/Vin/TestMid0054.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using OpenProtocolInterpreter.Vin; 3 | 4 | namespace MIDTesters.Vin 5 | { 6 | [TestClass] 7 | [TestCategory("Vin")] 8 | public class TestMid0054 : DefaultMidTests 9 | { 10 | [TestMethod] 11 | [TestCategory("ASCII")] 12 | public void Mid0054AllRevisions() 13 | { 14 | string package = "00200054 "; 15 | var mid = _midInterpreter.Parse(package); 16 | 17 | AssertEqualPackages(package, mid, true); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Alarm/IAlarm.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.Alarm 2 | { 3 | /// 4 | /// Alarm message category. Every alarm mid must implement . 5 | /// 6 | public interface IAlarm 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Alarm/Mid0070.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace OpenProtocolInterpreter.Alarm 4 | { 5 | /// 6 | /// Alarm subscribe 7 | /// A subscription for the alarms that can appear in the controller. 8 | /// Message sent by Integrator 9 | /// Answers: Command accepted or Command error, Alarm subscription already exists 10 | /// 11 | public class Mid0070 : Mid, IAlarm, IIntegrator, ISubscription, IAcceptableCommand, IDeclinableCommand 12 | { 13 | public const int MID = 70; 14 | 15 | public IEnumerable DocumentedPossibleErrors => new Error[] { Error.AlarmSubscriptionAlreadyExists }; 16 | 17 | public Mid0070() : this(DEFAULT_REVISION) 18 | { 19 | 20 | } 21 | 22 | public Mid0070(Header header) : base(header) 23 | { 24 | 25 | } 26 | 27 | public Mid0070(int revision, bool noAckFlag = false) : base(MID, revision, noAckFlag) 28 | { 29 | 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Alarm/Mid0072.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.Alarm 2 | { 3 | /// 4 | /// Alarm acknowledge 5 | /// Acknowledgement for Alarm. 6 | /// Message sent by: Integrator 7 | /// Answer: None 8 | /// 9 | public class Mid0072 : Mid, IAlarm, IIntegrator, IAcknowledge 10 | { 11 | public const int MID = 72; 12 | 13 | public Mid0072() : this(DEFAULT_REVISION) 14 | { 15 | 16 | } 17 | 18 | public Mid0072(Header header) : base(header) 19 | { 20 | 21 | } 22 | 23 | public Mid0072(int revision) : base(MID, revision) 24 | { 25 | 26 | } 27 | 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Alarm/Mid0073.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace OpenProtocolInterpreter.Alarm 4 | { 5 | /// 6 | /// Alarm unsubscribe 7 | /// Reset the subscription for the controller alarms. 8 | /// Message sent by: Integrator 9 | /// Answer: Command accepted or Command error, Alarm subscription does not exist 10 | /// 11 | public class Mid0073 : Mid, IAlarm, IIntegrator, IUnsubscription, IAcceptableCommand, IDeclinableCommand 12 | { 13 | public const int MID = 73; 14 | 15 | public IEnumerable DocumentedPossibleErrors => new Error[] { Error.AlarmSubscriptionDoesntExists }; 16 | 17 | public Mid0073() : this(DEFAULT_REVISION) 18 | { 19 | 20 | } 21 | 22 | public Mid0073(Header header) : base(header) 23 | { 24 | 25 | } 26 | 27 | public Mid0073(int revision) : base(MID, revision) 28 | { 29 | 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Alarm/Mid0075.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.Alarm 2 | { 3 | /// 4 | /// Alarm acknowledged on controller acknowledge 5 | /// Acknowledgement of MID 0074 Alarm acknowledged on controller. 6 | /// Message sent by: Integrator 7 | /// Answer : None 8 | /// 9 | public class Mid0075 : Mid, IAlarm, IIntegrator, IAcknowledge 10 | { 11 | public const int MID = 75; 12 | 13 | public Mid0075() : this(DEFAULT_REVISION) 14 | { 15 | 16 | } 17 | 18 | public Mid0075(Header header) : base(header) 19 | { 20 | 21 | } 22 | 23 | public Mid0075(int revision) : base(MID, revision) 24 | { 25 | 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Alarm/Mid0077.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.Alarm 2 | { 3 | /// 4 | /// Alarm status acknowledge 5 | /// Acknowledgement of Alarm Status. 6 | /// Message sent by: Integrator 7 | /// Answer : None 8 | /// 9 | public class Mid0077 : Mid, IAlarm, IIntegrator, IAcknowledge 10 | { 11 | public const int MID = 77; 12 | 13 | public Mid0077() : base(MID, DEFAULT_REVISION) 14 | { 15 | 16 | } 17 | 18 | public Mid0077(Header header) : base(header) 19 | { 20 | 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Alarm/Mid0078.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace OpenProtocolInterpreter.Alarm 4 | { 5 | /// 6 | /// Acknowledge alarm remotely on controller 7 | /// The integrator can remotely acknowledge the current alarm on the controller by sending . 8 | /// If no alarm is currently active when the controller receives the command, the command will be rejected. 9 | /// Message sent by: Integrator 10 | /// Answer : Command accepted or Command error, No alarm present or Invalid data 11 | /// 12 | public class Mid0078 : Mid, IAlarm, IIntegrator, IAcceptableCommand, IDeclinableCommand 13 | { 14 | public const int MID = 78; 15 | 16 | public IEnumerable DocumentedPossibleErrors => new Error[] { Error.NoAlarmPresent, Error.InvalidData }; 17 | 18 | public Mid0078() : base(MID, DEFAULT_REVISION) 19 | { 20 | 21 | } 22 | 23 | public Mid0078(Header header) : base(header) 24 | { 25 | 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/ApplicationController/ApplicationControllerMessages.cs: -------------------------------------------------------------------------------- 1 | using OpenProtocolInterpreter.Messages; 2 | using System; 3 | using System.Collections.Generic; 4 | 5 | namespace OpenProtocolInterpreter.ApplicationController 6 | { 7 | /// 8 | /// Template for implementers. 9 | /// 10 | internal class ApplicationControllerMessages : MessagesTemplate 11 | { 12 | public ApplicationControllerMessages() : base() 13 | { 14 | _templates = new Dictionary() 15 | { 16 | { Mid0270.MID, new MidCompiledInstance(typeof(Mid0270)) } 17 | }; 18 | } 19 | 20 | public ApplicationControllerMessages(IEnumerable selectedMids) : this() 21 | { 22 | FilterSelectedMids(selectedMids); 23 | } 24 | 25 | public ApplicationControllerMessages(InterpreterMode mode) : this() 26 | { 27 | FilterSelectedMids(mode); 28 | } 29 | 30 | public override bool IsAssignableTo(int mid) => mid == 270; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/ApplicationController/IApplicationController.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.ApplicationController 2 | { 3 | /// 4 | /// Application Controller message category. Every application controller mid must implement . 5 | /// 6 | public interface IApplicationController 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/ApplicationSelector/IApplicationSelector.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.ApplicationSelector 2 | { 3 | /// 4 | /// Application Selector message category. Every application selector mid must implement . 5 | /// 6 | public interface IApplicationSelector 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/ApplicationSelector/Mid0252.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.ApplicationSelector 2 | { 3 | /// 4 | /// Selector socket info acknowledge 5 | /// Acknowledgement of the Selector socket info. 6 | /// Message sent by: Integrator 7 | /// Answer: None 8 | /// 9 | public class Mid0252 : Mid, IApplicationSelector, IIntegrator, IAcknowledge 10 | { 11 | public const int MID = 252; 12 | 13 | public Mid0252() : base(MID, DEFAULT_REVISION) { } 14 | 15 | public Mid0252(Header header) : base(header) 16 | { 17 | 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/ApplicationSelector/Mid0253.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace OpenProtocolInterpreter.ApplicationSelector 4 | { 5 | /// 6 | /// Selector socket info unsubscribe 7 | /// Unsubscribe for the selector socket info. The subscription is reset for all selector devices. 8 | /// Message sent by: Integrator 9 | /// Answer: Command accepted or Command error, The selector socket info subscription does not exist 10 | /// 11 | public class Mid0253 : Mid, IApplicationSelector, IIntegrator, IUnsubscription, IAcceptableCommand, IDeclinableCommand 12 | { 13 | public const int MID = 253; 14 | 15 | public IEnumerable DocumentedPossibleErrors => new Error[] { Error.SelectorSocketInfoSubscriptionDoesntExists }; 16 | 17 | public Mid0253() : base(MID, DEFAULT_REVISION) { } 18 | 19 | public Mid0253(Header header) : base(header) 20 | { 21 | 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/ApplicationToolLocationSystem/IApplicationToolLocationSystem.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.ApplicationToolLocationSystem 2 | { 3 | /// 4 | /// Application Tool Location System message category. Every application tool location system mid must implement . 5 | /// 6 | public interface IApplicationToolLocationSystem 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/ApplicationToolLocationSystem/Mid0260.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace OpenProtocolInterpreter.ApplicationToolLocationSystem 4 | { 5 | /// 6 | /// Tool tag ID request 7 | /// Used by the integrator to request Tool tag ID information. 8 | /// Message sent by: Controller 9 | /// Answer: Tool tag ID or Command error, Tool tag ID unknown or MID revision unsupported. 10 | /// 11 | public class Mid0260 : Mid, IApplicationToolLocationSystem, IController, IAnswerableBy, IDeclinableCommand 12 | { 13 | public const int MID = 260; 14 | 15 | public IEnumerable DocumentedPossibleErrors => new Error[] { Error.ToolTagIdUnknown, Error.MidRevisionUnsupported }; 16 | 17 | public Mid0260() : base(MID, DEFAULT_REVISION) { } 18 | 19 | public Mid0260(Header header) : base(header) 20 | { 21 | 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/ApplicationToolLocationSystem/Mid0263.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.ApplicationToolLocationSystem 2 | { 3 | /// 4 | /// Tool tag ID acknowledge 5 | /// Acknowledgement of Tool tag ID. 6 | /// Message sent by: Integrator 7 | /// Answer: None 8 | /// 9 | public class Mid0263 : Mid, IApplicationToolLocationSystem, IIntegrator, IAcknowledge 10 | { 11 | public const int MID = 263; 12 | 13 | public Mid0263() : base(MID, DEFAULT_REVISION) { } 14 | 15 | public Mid0263(Header header) : base(header) 16 | { 17 | 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/AutomaticManualMode/IAutomaticManualMode.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.AutomaticManualMode 2 | { 3 | /// 4 | /// Application Selector message category. Every application selector mid must implement . 5 | /// 6 | public interface IAutomaticManualMode 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/AutomaticManualMode/Mid0402.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.AutomaticManualMode 2 | { 3 | /// 4 | /// Automatic/Manual mode acknowledge 5 | /// Acknowledgement of automatic/manual mode upload. 6 | /// Message sent by: Integrator 7 | /// Answer: None 8 | /// 9 | public class Mid0402 : Mid, IAutomaticManualMode, IIntegrator, IAcknowledge 10 | { 11 | public const int MID = 402; 12 | 13 | public Mid0402() : base(MID, DEFAULT_REVISION) { } 14 | 15 | public Mid0402(Header header) : base(header) 16 | { 17 | 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/AutomaticManualMode/Mid0403.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace OpenProtocolInterpreter.AutomaticManualMode 4 | { 5 | /// 6 | /// Automatic/Manual mode unsubscribe 7 | /// Reset the subscription for the automatic/manual mode. 8 | /// Message sent by: Integrator 9 | /// Answer: Command accepted or Command error, Automatic/Manual mode subscribe does not exist 10 | /// 11 | public class Mid0403 : Mid, IAutomaticManualMode, IIntegrator, IUnsubscription, IAcceptableCommand, IDeclinableCommand 12 | { 13 | public const int MID = 403; 14 | 15 | public IEnumerable DocumentedPossibleErrors => new Error[] { Error.AutomaticManualModeSubscribeDoesntExists }; 16 | 17 | 18 | public Mid0403() : base(MID, DEFAULT_REVISION) { } 19 | 20 | public Mid0403(Header header) : base(header) 21 | { 22 | 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/AutomaticManualMode/Mid0410.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.AutomaticManualMode 2 | { 3 | /// 4 | /// AutoDisable settings request 5 | /// 6 | /// Request for AutoDisable settings. This request is intended to be used while 7 | /// running single parameter sets with batch and does not provide batch information while running Job. 8 | /// 9 | /// Message sent by: Integrator 10 | /// Answer: AutoDisable settings reply 11 | /// 12 | public class Mid0410 : Mid, IAutomaticManualMode, IIntegrator, IAnswerableBy 13 | { 14 | public const int MID = 410; 15 | 16 | public Mid0410() : base(MID, DEFAULT_REVISION) { } 17 | 18 | public Mid0410(Header header) : base(header) 19 | { 20 | 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Communication/ICommunication.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.Communication 2 | { 3 | /// 4 | /// Communication message category. Every communication mid must implement . 5 | /// 6 | public interface ICommunication 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Communication/Mid0003.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.Communication 2 | { 3 | /// 4 | /// Application Communication stop 5 | /// 6 | /// This message disables the communication. The controller will stop to respond to any commands 7 | /// except for Communication start after receiving this command. 8 | /// 9 | /// Message sent by: Integrator 10 | /// Answer: Command accepted 11 | /// 12 | public class Mid0003 : Mid, ICommunication, IIntegrator, IAcceptableCommand 13 | { 14 | public const int MID = 3; 15 | 16 | public Mid0003() : base(MID, DEFAULT_REVISION) { } 17 | 18 | public Mid0003(Header header) : base(header) 19 | { 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/CustomMessages.cs: -------------------------------------------------------------------------------- 1 | using OpenProtocolInterpreter.Messages; 2 | using System; 3 | using System.Collections.Generic; 4 | 5 | namespace OpenProtocolInterpreter 6 | { 7 | internal class CustomMessages : MessagesTemplate 8 | { 9 | public CustomMessages(IDictionary midTypes) 10 | { 11 | foreach(var type in midTypes) 12 | { 13 | _templates.Add(type.Key, new MidCompiledInstance(type.Value)); 14 | } 15 | } 16 | 17 | public override bool IsAssignableTo(int mid) => _templates.ContainsKey(mid); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/AngleStatus.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Angle status. Used in . 5 | /// 6 | public enum AngleStatus 7 | { 8 | Undefined = -1, 9 | BoltAngleLow = 0, 10 | BoltAngleOk = 1, 11 | BoltAngleHigh = 2 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/AutoSelect.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Auto Select. Used in in . 5 | /// 6 | public enum AutoSelect 7 | { 8 | None = 0, 9 | AutoNextChange = 1, 10 | IO = 2, 11 | Fieldbus = 6, 12 | SocketTray = 8, 13 | EndFittings = 9, 14 | ToolDisplay = 10 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/BatchMode.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Batch Mode. Used in 5 | /// 6 | public enum BatchMode 7 | { 8 | OnlyOk = 0, 9 | BothOkAndNok = 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/BatchStatus.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Batch Status. Used in and . 5 | /// 6 | public enum BatchStatus 7 | { 8 | Nok = 0, 9 | Ok = 1, 10 | NotUsed = 2, 11 | Running = 3 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/BatchStatusAtIncrement.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// /// 4 | /// Batch Status at Increment. Used in in . 5 | /// 6 | public enum BatchStatusAtIncrement 7 | { 8 | Ok = 0, 9 | Nok = 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/CalibrationUnit.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Calibration Units. Used in . 5 | /// 6 | public enum CalibrationUnit 7 | { 8 | Nm = 1, 9 | LbfFt = 2, 10 | LbfIn = 3, 11 | Kpm = 4, 12 | KgfCm = 5, 13 | OzfIn = 6, 14 | Percentage = 7, 15 | Ncm = 8 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/CurrentBatchStatus.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Current Batch Status. Used in in . 5 | /// 6 | public enum CurrentBatchStatus 7 | { 8 | NotStarted = 0, 9 | Ok = 1, 10 | Nok = 2 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/DecrementBatchAfterLoosening.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// /// 4 | /// Decrement batch after loosening/OK tightening. Used in in . 5 | /// 6 | public enum DecrementBatchAfterLoosening 7 | { 8 | Never = 0, 9 | Always = 1, 10 | AfterOk = 2 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/DisableType.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Disable types. Used in . 5 | /// 6 | public enum DisableType 7 | { 8 | /// 9 | /// This is the same function as the revision 1 functionality. The tool is locked and cannot be started. 10 | /// 11 | Disable = 0, 12 | /// 13 | /// Will not run in the next tightening but will be included in the final result with status NOK 14 | /// 15 | InhibitNok = 1, 16 | /// 17 | /// Will not run in the next tightening but will be included in the final result with status OK 18 | /// 19 | InhibitOk = 2, 20 | /// 21 | /// Will not run in the next tightening and will not be included in the final result 22 | /// 23 | InhibitNoResult = 3 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/ForcedOrder.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Forced Orders. Used in and . 5 | /// 6 | public enum ForcedOrder 7 | { 8 | FreeOrder = 0, 9 | ForcedOrder = 1, 10 | FreeAndForcedOrder = 2 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/HistogramType.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Histogram Types. Used in and . 5 | /// 6 | public enum HistogramType 7 | { 8 | Torque = 0, 9 | Angle = 1, 10 | Current = 2, 11 | PrevailTorque = 3, 12 | Selftap = 4, 13 | RundownAngle = 5 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/IdentifierPart.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Identifier parts. Used in . 5 | /// 6 | public enum IdentifierPart 7 | { 8 | JobVINNumber = 0, 9 | Other = 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/InterpreterMode.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Mid interpreter possible modes. 5 | /// 6 | public enum InterpreterMode 7 | { 8 | Both = 0, 9 | Controller = 1, 10 | Integrator = 2 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/JobBatchMode.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Job batch modes. Used in and . 5 | /// 6 | public enum JobBatchMode 7 | { 8 | OnlyOkTightenings = 0, 9 | OkAndNokTightenings = 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/JobStatus.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Job Status. Used in . 5 | /// 6 | public enum JobStatus 7 | { 8 | NotCompleted = 0, 9 | Ok = 1, 10 | Nok = 2 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/JobTighteningStatus.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Job tightening status. Used in . 5 | /// 6 | public enum JobTighteningStatus 7 | { 8 | Off = 0, 9 | Nok = 1, 10 | Aborted = 3, 11 | Incremented = 4, 12 | Decremented = 5, 13 | Bypassed = 6, 14 | ResetBatch = 7, 15 | Loosening = 8, 16 | FreeBatch = 9, 17 | JobAborted = 10, 18 | JobRestart = 11 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/LightCommand.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Light commands. Used in and . 5 | /// 6 | public enum LightCommand 7 | { 8 | Off = 0, 9 | Steady = 1, 10 | Flashing = 2 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/LinkCommunicationError.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Error codes. Used in . 5 | /// 6 | public enum LinkCommunicationError 7 | { 8 | InvalidLength = 1, 9 | InvalidRevision = 2, 10 | InvalidSequenceNumber = 3, 11 | InconsistencyOfMessageNumber = 4 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/MotorRotation.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Motor rotations. Used in . 5 | /// 6 | public enum MotorRotation 7 | { 8 | Normal = 0, 9 | Inverted = 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/NodeType.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | public enum NodeType 4 | { 5 | ParameterSet = 1, 6 | Multistage = 2, 7 | Job = 3, 8 | 9 | TighteningProgram = 100, 10 | TighteningStep = 101, 11 | Restriction = 102, 12 | Check = 103, 13 | SpeedRamp = 104, 14 | Monitoring = 105, 15 | 16 | MultistepTighteningProgram = 201 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/ObjectType.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | public enum ObjectType 4 | { 5 | Unknown = 0, 6 | DualReading = 1, 7 | TighteningProduction = 2, 8 | TighteningSimulation = 3, 9 | JointCheck = 4, 10 | Dimensional = 5 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/OperationType.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Operation Types. Used in . 5 | /// 6 | public enum OperationType 7 | { 8 | NonSynchronizedTightening = 0, 9 | SynchronizedTightening = 1, 10 | Pressing = 2, 11 | Drilling = 3, 12 | Pulse = 4 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/PaddingOrientation.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | public enum PaddingOrientation 4 | { 5 | RightPadded, 6 | LeftPadded 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/PairingHandlingType.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Pairing handling types. Used in . 5 | /// 6 | public enum PairingHandlingType 7 | { 8 | StartPairing = 01, 9 | PairingAbortOrDisconnect = 02, 10 | FetchLatestPairingStatus = 03 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/PostViewTorque.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Post View Torque. Used in . 5 | /// 6 | public enum PostViewTorque 7 | { 8 | Off = 0, 9 | On = 1, 10 | OnlyPVTHOn = 2, 11 | OnlyPVTLOn = 3 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/PowerMacsStatus.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Power Macs status. Used in . 5 | /// 6 | public enum PowerMacsStatus 7 | { 8 | Ok = 0, 9 | Okr = 1, 10 | Nok = 2, 11 | TermNok = 3 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/PrimaryTool.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Primary tools. Used in and . 5 | /// 6 | public enum PrimaryTool 7 | { 8 | Cable = 1, 9 | IRC_B = 2, 10 | IRC_W = 3 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/RelayStatus.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Relay status. Used in . 5 | /// 6 | public enum RelayStatus 7 | { 8 | Off = 0, 9 | On = 1, 10 | Flashing = 2, 11 | KeepCurrentStatus = 3 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/RemovalCondition.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Removal conditions. . 5 | /// 6 | public enum RemovalCondition 7 | { 8 | AcknowledgeOrWaitExpirationTime = 0, 9 | Acknowledge = 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/Reserved.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Reserved. Used in and . 5 | /// 6 | public enum Reserved 7 | { 8 | E = 0, 9 | G = 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/ResultType.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Result types. Used in and . 5 | /// 6 | public enum ResultType 7 | { 8 | Tightening = 1, 9 | Loosening = 2, 10 | BatchIncrement = 3, 11 | BatchDecrement = 4, 12 | BypassParameterSetResult = 5, 13 | AbortJobResult = 6, 14 | SyncTightening = 7, 15 | ReferenceSetup = 8, 16 | BatchReset = 9, 17 | JobRestart = 10 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/RotationDirection.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Rotation directions. Used in and . 5 | /// 6 | public enum RotationDirection 7 | { 8 | Clockwise = 1, 9 | Counterclockwise = 2 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/StatusInWorkOrder.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Status in work order. Used in . 5 | /// 6 | public enum StatusInWorkOrder 7 | { 8 | NotAccepted = 0, 9 | Accepted = 1, 10 | Bypassed = 2, 11 | Reset = 3, 12 | Next = 4, 13 | Initial = 5 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/SystemSubType.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// If no subtype exists it will be set to 000 5 | /// For a Power Focus 4000 and PF 6000 system the valid subtypes are: 6 | /// 001 = a normal tightening system 7 | /// For a Power MACS 4000 system the valid subtypes are: 8 | /// 9 | /// 001 = a normal tightening system 10 | /// 002 = a system running presses instead of spindles. 11 | /// 12 | /// 13 | public enum SystemSubType 14 | { 15 | NoSubtypeExists = 0, 16 | NormalTighteningSystem = 1, 17 | SystemRunningPresses = 2 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/SystemType.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// The system type of the controller. 5 | /// Possible values are: 6 | /// 7 | /// 000 = System type not set 8 | /// 001 = Power Focus 4000 9 | /// 002 = Power MACS 4000 10 | /// 003 = Power Focus 6000 11 | /// 004 = Micro Torque Focus 6000 12 | /// 13 | /// 14 | public enum SystemType 15 | { 16 | SystemTypeNotSet = 0, 17 | PowerFocus4000 = 1, 18 | PowerMacs4000 = 2, 19 | PowerFocus6000 = 3, 20 | MicroTorqueFocus6000 = 4 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/TighteningDirection.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Tightening Directions. Used in . 5 | /// 6 | public enum TighteningDirection 7 | { 8 | Clockwise = 0, 9 | Counterclockwise = 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/TighteningValueStatus.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Tightening value status. Used in and . 5 | /// 6 | public enum TighteningValueStatus 7 | { 8 | Low = 0, 9 | Ok = 1, 10 | High = 2 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/ToolHealth.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | public enum ToolHealth 4 | { 5 | NotApplicable = 0, 6 | Ok = 1, 7 | Nok = 2 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/ToolLoosening.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Tool loosenings. Used in and . 5 | /// 6 | public enum ToolLoosening 7 | { 8 | Enabled = 0, 9 | Disabled = 1, 10 | EnableOnlyOnNokTightenings = 2 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/ToolStatus.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Tool status. Used in . 5 | /// 6 | public enum ToolStatus 7 | { 8 | Operable = 1, 9 | Inoperable = 2 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/ToolType.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Tool types. Used in . 5 | /// 6 | public enum ToolType 7 | { 8 | NoTool = 0, 9 | S_Tool = 1, 10 | DS_Tool = 2, 11 | RefTransducer = 3, 12 | ST_Tool = 4, 13 | EP_Tool = 5, 14 | ETX_Tool = 6, 15 | SL_Tool = 7, 16 | DL_Tool = 8, 17 | IRC_Offline = 9, 18 | STB_Tool = 10, 19 | QST_Tool = 11, 20 | STT_Tool = 12, 21 | STWrench = 13, 22 | ES_Tool = 14, 23 | ESB = 15, 24 | SB = 16, 25 | SBPlus = 17, 26 | PST = 18, 27 | STR = 19, 28 | ETD_M = 20, 29 | ETD_MC = 21, 30 | ETD_MT = 22, 31 | QMC = 23, 32 | QMT = 24, 33 | BCV_RE = 25, 34 | BCP_REW = 26, 35 | E_LIT = 27, 36 | ISB = 28, 37 | ITB = 29, 38 | ITP = 30, 39 | QSHIELD_C = 31, 40 | DeltaWrench = 32, 41 | STRWrench = 33 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/TorqueStatus.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Torque status. Used in . 5 | /// 6 | public enum TorqueStatus 7 | { 8 | Undefined = -1, 9 | BoltTorqueLow = 0, 10 | BoltTorqueOk = 1, 11 | BoltTorqueHigh = 2 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Enums/TorqueValuesUnit.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenProtocolInterpreter 4 | { 5 | /// 6 | /// Torque values unit. Used in and . 7 | /// 8 | public enum TorqueValuesUnit 9 | { 10 | Nm = 1, 11 | LbfFt = 2, 12 | LbfIn = 3, 13 | Kpm = 4, 14 | KgfCm = 5, 15 | OzfIn = 6, 16 | [Obsolete("Percentage of torque was marked as obsolete since Specification 2.10.0")] 17 | Percentage = 7, 18 | Ncm = 8 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/IAcceptableCommand.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Contract of every message that can be accepted with implements. 5 | /// 6 | public interface IAcceptableCommand 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/IAcknowledge.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Contract which every acknowledge message implements. 5 | /// 6 | public interface IAcknowledge 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/IAcknowledgeable.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Contract which every that might needs an acknowledge response implements. 5 | /// 6 | public interface IAcknowledgeable where TAckMid : Mid, IAcknowledge, new() 7 | { 8 | 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/IAnswerableBy.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Contract of every message that can be answered by another mid which is not classified as an acknowledge. 5 | /// 6 | public interface IAnswerableBy where TAnswerMid : Mid 7 | { 8 | 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/IController.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Contract which every controller message implements. 5 | /// 6 | public interface IController 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/IDeclinableCommand.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace OpenProtocolInterpreter 4 | { 5 | /// 6 | /// Contract which every message that can be declined with implements. 7 | /// 8 | public interface IDeclinableCommand 9 | { 10 | IEnumerable DocumentedPossibleErrors { get; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/IIntegrator.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Contract which every integrator message implements. 5 | /// 6 | public interface IIntegrator 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/IOInterface/IIOInterface.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.IOInterface 2 | { 3 | /// 4 | /// IO interface message category. Every IO interface mid must implement . 5 | /// 6 | public interface IIOInterface 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/IOInterface/Mid0212.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.IOInterface 2 | { 3 | /// 4 | /// Status externally monitored inputs acknowledge 5 | /// Acknowledgement for the message status externally monitored inputs upload. 6 | /// Message sent by: Integrator 7 | /// Answer: None 8 | /// 9 | public class Mid0212 : Mid, IIOInterface, IIntegrator, IAcknowledge 10 | { 11 | public const int MID = 212; 12 | 13 | public Mid0212() : base(MID, DEFAULT_REVISION) { } 14 | 15 | public Mid0212(Header header) : base(header) 16 | { 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/IOInterface/Mid0213.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace OpenProtocolInterpreter.IOInterface 4 | { 5 | /// 6 | /// Status externally monitored inputs unsubscribe 7 | /// Unsubscribe for the Status externally monitored inputs. 8 | /// Message sent by: Integrator 9 | /// 10 | /// Answer: Command accepted or Command error, 11 | /// Status externally monitored inputs subscription does not exist 12 | /// 13 | /// 14 | public class Mid0213 : Mid, IIOInterface, IIntegrator, IUnsubscription, IAcceptableCommand, IDeclinableCommand 15 | { 16 | public const int MID = 213; 17 | 18 | public IEnumerable DocumentedPossibleErrors => new Error[] { Error.StatusExternalMonitoredInputsSubscriptionDoesntExists }; 19 | 20 | public Mid0213() : base(MID, DEFAULT_REVISION) { } 21 | 22 | public Mid0213(Header header) : base(header) 23 | { 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/IOInterface/Mid0218.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.IOInterface 2 | { 3 | /// 4 | /// Relay function acknowledge 5 | /// Acknowledgement of relay function upload. 6 | /// Message sent by: Integrator 7 | /// Answer: None 8 | /// 9 | public class Mid0218 : Mid, IIOInterface, IIntegrator, IAcknowledge 10 | { 11 | public const int MID = 218; 12 | 13 | public Mid0218() : base(MID, DEFAULT_REVISION) { } 14 | 15 | public Mid0218(Header header) : base(header) 16 | { 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/IOInterface/Mid0222.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.IOInterface 2 | { 3 | /// 4 | /// Digital input function acknowledge 5 | /// Acknowledgement of the digital input function upload. 6 | /// Message sent by: Integrator 7 | /// Answer: None 8 | /// 9 | public class Mid0222 : Mid, IIOInterface, IIntegrator, IAcknowledge 10 | { 11 | public const int MID = 222; 12 | 13 | public Mid0222() : base(MID, DEFAULT_REVISION) { } 14 | 15 | public Mid0222(Header header) : base(header) 16 | { 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/ISubscription.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Contract which every subscription message implements. 5 | /// 6 | public interface ISubscription 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/IUnsubscription.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter 2 | { 3 | /// 4 | /// Contract which every unsubscription message implements. 5 | /// 6 | public interface IUnsubscription 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Job/Advanced/IAdvancedJob.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.Job.Advanced 2 | { 3 | /// 4 | /// Advanced job message category. Every Advanced job mid must implement . 5 | /// 6 | public interface IAdvancedJob 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Job/Advanced/Mid0121.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.Job.Advanced 2 | { 3 | /// 4 | /// Job line control started 5 | /// This message tells the integrator that Job Line control start has been set in the controller. 6 | /// Message sent by: Controller 7 | /// Answer: Job line control info acknowledged 8 | /// 9 | public class Mid0121 : Mid, IAdvancedJob, IController, IAcknowledgeable 10 | { 11 | public const int MID = 121; 12 | 13 | public Mid0121() : base(MID, DEFAULT_REVISION) 14 | { 15 | 16 | } 17 | 18 | public Mid0121(Header header) : base(header) 19 | { 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Job/Advanced/Mid0122.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.Job.Advanced 2 | { 3 | /// 4 | /// Job line control alert 1 5 | /// 6 | /// This message tells the integrator that, for example, 7 | /// a car has reached 80% of the station and that the 8 | /// Job line control alert 1 is set in the controller. 9 | /// 10 | /// 11 | /// Only available when a job has been selected. 12 | /// 13 | /// Message sent by: Controller 14 | /// Answer: Job line control info acknowledged 15 | /// 16 | public class Mid0122 : Mid, IAdvancedJob, IController, IAcknowledgeable 17 | { 18 | public const int MID = 122; 19 | 20 | public Mid0122() : base(MID, DEFAULT_REVISION) 21 | { 22 | 23 | } 24 | 25 | public Mid0122(Header header) : base(header) 26 | { 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Job/Advanced/Mid0123.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.Job.Advanced 2 | { 3 | /// 4 | /// Job line control alert 2 5 | /// This message tells the integrator that the Job line control alert 2 is set in the controller. 6 | /// Only available when a job has been selected. 7 | /// Message sent by: Controller 8 | /// Answer: Job line control info acknowledged 9 | /// 10 | public class Mid0123 : Mid, IAdvancedJob, IController, IAcknowledgeable 11 | { 12 | public const int MID = 123; 13 | 14 | public Mid0123() : base(MID, DEFAULT_REVISION) 15 | { 16 | 17 | } 18 | 19 | public Mid0123(Header header) : base(header) 20 | { 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Job/Advanced/Mid0124.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.Job.Advanced 2 | { 3 | /// 4 | /// Job line control done 5 | /// This message tells the integrator that the Job has been completed before the alert level 2 was reached. 6 | /// Message sent by: Controller 7 | /// Answer: Job line control info acknowledged 8 | /// 9 | public class Mid0124 : Mid, IAdvancedJob, IController, IAcknowledgeable 10 | { 11 | public const int MID = 124; 12 | 13 | public Mid0124() : base(MID, DEFAULT_REVISION) 14 | { 15 | 16 | } 17 | 18 | public Mid0124(Header header) : base(header) 19 | { 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Job/Advanced/Mid0125.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.Job.Advanced 2 | { 3 | /// 4 | /// Job line control info acknowledge 5 | /// Acknowledgement of Job line control info messages , , , and . 6 | /// Message sent by: Integrator 7 | /// Answer: None 8 | /// 9 | public class Mid0125 : Mid, IAdvancedJob, IIntegrator, IAcknowledge 10 | { 11 | public const int MID = 125; 12 | 13 | public Mid0125() : base(MID, DEFAULT_REVISION) 14 | { 15 | 16 | } 17 | 18 | public Mid0125(Header header) : base(header) 19 | { 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Job/Advanced/Mid0126.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace OpenProtocolInterpreter.Job.Advanced 4 | { 5 | /// 6 | /// Job line control info unsubscribe 7 | /// Unsubscribe for the Job line control info messages. 8 | /// Message sent by: Integrator 9 | /// Answer: Command accepted or Command error, Job line control info subscription does not exist 10 | /// 11 | public class Mid0126 : Mid, IAdvancedJob, IIntegrator, IUnsubscription, IAcceptableCommand, IDeclinableCommand 12 | { 13 | public const int MID = 126; 14 | 15 | public IEnumerable DocumentedPossibleErrors => new Error[] { Error.JobLineControlInfoSubscriptionDoesntExists }; 16 | 17 | public Mid0126() : base(MID, DEFAULT_REVISION) { } 18 | 19 | public Mid0126(Header header) : base(header) 20 | { 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Job/Advanced/Mid0127.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.Job.Advanced 2 | { 3 | /// 4 | /// Abort Job 5 | /// Abort the current running job if there is one. 6 | /// Message sent by: Integrator 7 | /// Answer: Command accepted 8 | /// 9 | public class Mid0127 : Mid, IAdvancedJob, IIntegrator, IAcceptableCommand 10 | { 11 | public const int MID = 127; 12 | 13 | public Mid0127() : base(MID, DEFAULT_REVISION) 14 | { 15 | 16 | } 17 | 18 | public Mid0127(Header header) : base(header) 19 | { 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Job/Advanced/Mid0128.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.Job.Advanced 2 | { 3 | /// 4 | /// Job batch increment 5 | /// Increment the Job batch if there is a current running Job. 6 | /// Message sent by: Integrator 7 | /// Answer: Command accepted 8 | /// 9 | public class Mid0128 : Mid, IAdvancedJob, IIntegrator, IAcceptableCommand 10 | { 11 | public const int MID = 128; 12 | 13 | public Mid0128() : base(MID, DEFAULT_REVISION) { } 14 | 15 | public Mid0128(Header header) : base(header) 16 | { 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Job/Advanced/Mid0131.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.Job.Advanced 2 | { 3 | /// 4 | /// Set Job line control start 5 | /// The integrator can set the line control start in the controller with this message. 6 | /// Message sent by: Integrator 7 | /// Answer: Command accepted 8 | /// 9 | public class Mid0131 : Mid, IAdvancedJob, IIntegrator, IAcceptableCommand 10 | { 11 | public const int MID = 131; 12 | 13 | public Mid0131() : base(MID, DEFAULT_REVISION) { } 14 | 15 | public Mid0131(Header header) : base(header) 16 | { 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Job/Advanced/Mid0132.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.Job.Advanced 2 | { 3 | /// 4 | /// Set Job line alert 1 5 | /// The integrator can set the line control alert 1 in the controller with this message. 6 | /// Message sent by: Integrator 7 | /// Answer: Command accepted 8 | /// 9 | public class Mid0132 : Mid, IAdvancedJob, IIntegrator, IAcceptableCommand 10 | { 11 | public const int MID = 132; 12 | 13 | public Mid0132() : base(MID, DEFAULT_REVISION) { } 14 | 15 | public Mid0132(Header header) : base(header) 16 | { 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Job/Advanced/Mid0133.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.Job.Advanced 2 | { 3 | /// 4 | /// Set Job line alert 2 5 | /// The integrator can set the line control alert 2 in the controller with this message. 6 | /// Message sent by: Integrator 7 | /// Answer: Command accepted 8 | /// 9 | public class Mid0133 : Mid, IAdvancedJob, IIntegrator, IAcceptableCommand 10 | { 11 | public const int MID = 133; 12 | 13 | public Mid0133() : base(MID, DEFAULT_REVISION) { } 14 | 15 | public Mid0133(Header header) : base(header) 16 | { 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Job/IJob.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.Job 2 | { 3 | /// 4 | /// Job message category. Every job mid must implement . 5 | /// 6 | public interface IJob 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Job/Mid0030.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.Job 2 | { 3 | /// 4 | /// Job ID upload request 5 | /// 6 | /// This is a request for a transmission of all the valid Job IDs of the controller. 7 | /// The result of this command is a transmission of all the valid Job IDs. 8 | /// 9 | /// Message sent by: Integrator 10 | /// Answer: Job ID upload reply 11 | /// 12 | public class Mid0030 : Mid, IJob, IIntegrator, IAnswerableBy 13 | { 14 | public const int MID = 30; 15 | 16 | public Mid0030() : this(DEFAULT_REVISION) 17 | { 18 | 19 | } 20 | 21 | public Mid0030(Header header) : base(header) 22 | { 23 | } 24 | 25 | public Mid0030(int revision) : base(MID, revision) { } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Job/Mid0036.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.Job 2 | { 3 | /// 4 | /// Job info acknowledge 5 | /// Acknowledgement of a Job info message. 6 | /// Message sent by: Integrator 7 | /// Answer: None 8 | /// 9 | public class Mid0036 : Mid, IJob, IIntegrator, IAcknowledge 10 | { 11 | public const int MID = 36; 12 | 13 | public Mid0036() : this(DEFAULT_REVISION) 14 | { 15 | 16 | } 17 | 18 | public Mid0036(Header header) : base(header) 19 | { 20 | } 21 | 22 | public Mid0036(int revision) : base(MID, revision) { } 23 | } 24 | } -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Job/Mid0037.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace OpenProtocolInterpreter.Job 4 | { 5 | /// 6 | /// Job info unsubscribe 7 | /// Reset the subscription for a Job info message. 8 | /// Message sent by: Integrator 9 | /// Answer: Command accepted or Command error, Job info subscription does not exist 10 | /// 11 | public class Mid0037 : Mid, IJob, IIntegrator, IUnsubscription, IAcceptableCommand, IDeclinableCommand 12 | { 13 | public const int MID = 37; 14 | 15 | public IEnumerable DocumentedPossibleErrors => new Error[] { Error.JobInfoSubscriptionDoesntExists }; 16 | 17 | public Mid0037() : this(DEFAULT_REVISION) 18 | { 19 | 20 | } 21 | 22 | public Mid0037(Header header) : base(header) 23 | { 24 | } 25 | 26 | public Mid0037(int revision) : base(MID, revision) { } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/LinkCommunication/ILinkCommunication.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.LinkCommunication 2 | { 3 | public interface ILinkCommunication 4 | { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/LinkCommunication/LinkCommunicationMessages.cs: -------------------------------------------------------------------------------- 1 | using OpenProtocolInterpreter.Messages; 2 | using System; 3 | using System.Collections.Generic; 4 | 5 | namespace OpenProtocolInterpreter.LinkCommunication 6 | { 7 | internal class LinkCommunicationMessages : MessagesTemplate 8 | { 9 | public LinkCommunicationMessages() : base() 10 | { 11 | _templates = new Dictionary() 12 | { 13 | { Mid9997.MID, new MidCompiledInstance(typeof(Mid9997)) }, 14 | { Mid9998.MID, new MidCompiledInstance(typeof(Mid9998)) } 15 | }; 16 | } 17 | 18 | public LinkCommunicationMessages(IEnumerable selectedMids) : this() 19 | { 20 | FilterSelectedMids(selectedMids); 21 | } 22 | 23 | public LinkCommunicationMessages(InterpreterMode mode) : this() 24 | { 25 | FilterSelectedMids(mode); 26 | } 27 | 28 | public override bool IsAssignableTo(int mid) => mid > 9996 && mid < 9999; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/MotorTuning/IMotorTuning.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.MotorTuning 2 | { 3 | /// 4 | /// Motor tuning message category. Every motor tuning mid must implement . 5 | /// 6 | public interface IMotorTuning 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/MotorTuning/Mid0502.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.MotorTuning 2 | { 3 | /// 4 | /// Motor tuning result data acknowledge 5 | /// Acknowledgement of motor tuning result data. 6 | /// Message sent by: Integrator 7 | /// Answer: None 8 | /// 9 | public class Mid0502 : Mid, IMotorTuning, IIntegrator, IAcknowledge 10 | { 11 | public const int MID = 502; 12 | 13 | public Mid0502() : base(MID, DEFAULT_REVISION) { } 14 | 15 | public Mid0502(Header header) : base(header) 16 | { 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/MotorTuning/Mid0503.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace OpenProtocolInterpreter.MotorTuning 4 | { 5 | /// 6 | /// Motor tuning result data unsubscribe 7 | /// Reset the motor tuning result subscription. 8 | /// Message sent by: Integrator 9 | /// Answer: Command accepted or Command error, Motor Tuning result subscription does not exist 10 | /// 11 | public class Mid0503 : Mid, IMotorTuning, IIntegrator, IUnsubscription, IAcceptableCommand, IDeclinableCommand 12 | { 13 | public const int MID = 503; 14 | 15 | public IEnumerable DocumentedPossibleErrors => new Error[] { Error.SubscriptionDoesntExists}; 16 | 17 | public Mid0503() : base(MID, DEFAULT_REVISION) { } 18 | 19 | public Mid0503(Header header) : base(header) 20 | { 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/MotorTuning/Mid0504.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace OpenProtocolInterpreter.MotorTuning 4 | { 5 | /// 6 | /// Motor tuning request 7 | /// Request the start of the motor tuning. 8 | /// Warning!: This command must be implemented during hard restrictions and customer dependent requirements. 9 | /// Message sent by: Integrator 10 | /// Answer: Command accepted or Command error, Tool motor tuning failed 11 | /// 12 | public class Mid0504 : Mid, IMotorTuning, IIntegrator, IAcceptableCommand, IDeclinableCommand 13 | { 14 | public const int MID = 504; 15 | 16 | public IEnumerable DocumentedPossibleErrors => new Error[] { Error.ToolMotorTuningFailed }; 17 | 18 | public Mid0504() : base(MID, DEFAULT_REVISION) { } 19 | 20 | public Mid0504(Header header) : base(header) 21 | { 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/MultiSpindle/IMultiSpindle.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.MultiSpindle 2 | { 3 | /// 4 | /// Multiple spindle message category. Every multiple spindle mid must implement . 5 | /// 6 | public interface IMultiSpindle 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/MultiSpindle/Mid0092.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.MultiSpindle 2 | { 3 | /// 4 | /// Multi-spindle status acknowledge 5 | /// Message sent by: Integrator 6 | /// Answer : None 7 | /// 8 | public class Mid0092 : Mid, IMultiSpindle, IIntegrator, IAcknowledge 9 | { 10 | public const int MID = 92; 11 | 12 | public Mid0092() : base(MID, DEFAULT_REVISION) { } 13 | 14 | public Mid0092(Header header) : base(header) 15 | { 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/MultiSpindle/Mid0093.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace OpenProtocolInterpreter.MultiSpindle 4 | { 5 | /// 6 | /// Multi-spindle status unsubscribe 7 | /// Reset the subscription for the multi-spindle status. 8 | /// Message sent by: Integrator 9 | /// 10 | /// Answer: Command accepted or 11 | /// Command error, Multi-spindle status subscription does not exist 12 | /// 13 | /// 14 | public class Mid0093 : Mid, IMultiSpindle, IIntegrator, IUnsubscription, IAcceptableCommand, IDeclinableCommand 15 | { 16 | public const int MID = 93; 17 | 18 | public IEnumerable DocumentedPossibleErrors => new Error[] { Error.MultiSpindleStatusSubscriptionDoesntExists }; 19 | 20 | public Mid0093() : base(MID, DEFAULT_REVISION) 21 | { 22 | 23 | } 24 | 25 | public Mid0093(Header header) : base(header) 26 | { 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/MultiSpindle/Mid0102.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.MultiSpindle 2 | { 3 | /// 4 | /// Multi-spindle result acknowledge 5 | /// Message sent by: Integrator 6 | /// Answer: None 7 | /// 8 | public class Mid0102 : Mid, IMultiSpindle, IIntegrator, IAcknowledge 9 | { 10 | public const int MID = 102; 11 | 12 | public Mid0102() : base(MID, DEFAULT_REVISION) { } 13 | 14 | public Mid0102(Header header) : base(header) 15 | { 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/MultiSpindle/Mid0103.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace OpenProtocolInterpreter.MultiSpindle 4 | { 5 | /// 6 | /// Multi-spindle result unsubscribe 7 | /// Reset the subscription for the multi spindle result. 8 | /// Message sent by: Integrator 9 | /// 10 | /// Answer: Command accepted or 11 | /// Command error, Multi spindle result subscription does not exist 12 | /// 13 | /// 14 | public class Mid0103 : Mid, IMultiSpindle, IIntegrator, IUnsubscription, IAcceptableCommand, IDeclinableCommand 15 | { 16 | public const int MID = 103; 17 | 18 | public IEnumerable DocumentedPossibleErrors => new Error[] { Error.MultiSpindleResultSubscriptionDoesntExists }; 19 | 20 | public Mid0103() : base(MID, DEFAULT_REVISION) { } 21 | 22 | public Mid0103(Header header) : base(header) 23 | { 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/MultiSpindle/SpindleOrPressStatus.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.MultiSpindle 2 | { 3 | /// 4 | /// Represents a Spindle or a Press status entity, depending on 5 | /// 6 | public class SpindleOrPressStatus 7 | { 8 | public int SpindleOrPressNumber { get; set; } 9 | public int ChannelId { get; set; } 10 | public bool OverallStatus { get; set; } 11 | public TighteningValueStatus TorqueOrForceStatus { get; set; } 12 | public decimal TorqueOrForce { get; set; } 13 | public bool AngleOrStrokeStatus { get; set; } 14 | public int AngleOrStroke { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/MultiSpindle/SpindleStatus.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.MultiSpindle 2 | { 3 | /// 4 | /// Represents a Spindle Status entity 5 | /// 6 | public class SpindleStatus 7 | { 8 | public int SpindleNumber { get; set; } 9 | public int ChannelId { get; set; } 10 | public bool SyncOverallStatus { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/MultipleIdentifiers/IMultipleIdentifier.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.MultipleIdentifiers 2 | { 3 | /// 4 | /// Multiple identifier message category. Every multiple identifier mid must implement . 5 | /// 6 | public interface IMultipleIdentifier 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/MultipleIdentifiers/Mid0153.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.MultipleIdentifiers 2 | { 3 | /// 4 | /// Multiple identifiers and result parts acknowledge 5 | /// Acknowledgement of multiple identifiers and result parts upload. 6 | /// Message sent by: Integrator 7 | /// Answer: None 8 | /// 9 | public class Mid0153 : Mid, IMultipleIdentifier, IIntegrator, IAcknowledge 10 | { 11 | public const int MID = 153; 12 | 13 | public Mid0153() : base(MID, DEFAULT_REVISION) 14 | { 15 | } 16 | 17 | public Mid0153(Header header) : base(header) 18 | { 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/MultipleIdentifiers/Mid0154.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace OpenProtocolInterpreter.MultipleIdentifiers 4 | { 5 | /// 6 | /// Multiple identifier and result parts unsubscribe 7 | /// Reset the subscription for the multiple identifiers and result parts. 8 | /// Message sent by: Integrator 9 | /// 10 | /// Answer: Command accepted or 11 | /// Command error, Multiple identifiers and result parts subscription does not exist 12 | /// 13 | /// 14 | public class Mid0154 : Mid, IMultipleIdentifier, IIntegrator, IUnsubscription, IAcceptableCommand, IDeclinableCommand 15 | { 16 | public const int MID = 154; 17 | 18 | public IEnumerable DocumentedPossibleErrors => new Error[] { }; 19 | 20 | public Mid0154() : base(MID, DEFAULT_REVISION) 21 | { 22 | } 23 | 24 | public Mid0154(Header header) : base(header) 25 | { 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/MultipleIdentifiers/Mid0155.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.MultipleIdentifiers 2 | { 3 | /// 4 | /// Bypass Identifier 5 | /// This message is used by the integrator to bypass the next identifier expected in the work order. 6 | /// Message sent by: Integrator 7 | /// Answer: Command accepted 8 | /// 9 | public class Mid0155 : Mid, IMultipleIdentifier, IIntegrator, IAcceptableCommand 10 | { 11 | public const int MID = 155; 12 | 13 | public Mid0155() : base(MID, DEFAULT_REVISION) 14 | { 15 | } 16 | 17 | public Mid0155(Header header) : base(header) 18 | { 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/MultipleIdentifiers/Mid0156.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.MultipleIdentifiers 2 | { 3 | /// 4 | /// Reset latest Identifier 5 | /// 6 | /// This message is used by the integrator to reset the latest identifier 7 | /// or bypassed identifier in the work order. 8 | /// 9 | /// Message sent by: Integrator 10 | /// Answer: Command accepted 11 | /// 12 | public class Mid0156 : Mid, IMultipleIdentifier, IIntegrator, IAcceptableCommand 13 | { 14 | public const int MID = 156; 15 | 16 | public Mid0156() : base(MID, DEFAULT_REVISION) 17 | { 18 | } 19 | 20 | public Mid0156(Header header) : base(header) 21 | { 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/MultipleIdentifiers/Mid0157.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.MultipleIdentifiers 2 | { 3 | /// 4 | /// Reset all Identifiers 5 | /// This message is used by the integrator to reset all identifiers in the current work order. 6 | /// Message sent by: Integrator 7 | /// Answer: Command accepted 8 | /// 9 | public class Mid0157 : Mid, IMultipleIdentifier, IIntegrator, IAcceptableCommand 10 | { 11 | public const int MID = 157; 12 | 13 | public Mid0157() : base(MID, DEFAULT_REVISION) 14 | { 15 | } 16 | 17 | public Mid0157(Header header) : base(header) 18 | { 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/OpenProtocolCommandsDisabled/IOpenProtocolCommandsDisabled.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.OpenProtocolCommandsDisabled 2 | { 3 | /// 4 | /// Open protocol commands disabled category. Every open protocol command disabled mid must implement . 5 | /// 6 | public interface IOpenProtocolCommandsDisabled 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/OpenProtocolCommandsDisabled/Mid0422.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.OpenProtocolCommandsDisabled 2 | { 3 | /// 4 | /// Open Protocol commands disabled acknowledge 5 | /// Acknowledgement of Open Protocol commands disabled upload. 6 | /// Message sent by: Integrator 7 | /// Answer: None 8 | /// 9 | public class Mid0422 : Mid, IOpenProtocolCommandsDisabled, IIntegrator, IAcknowledge 10 | { 11 | public const int MID = 422; 12 | 13 | public Mid0422() : base(MID, DEFAULT_REVISION) { } 14 | 15 | public Mid0422(Header header) : base(header) 16 | { 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/OpenProtocolCommandsDisabled/Mid0423.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace OpenProtocolInterpreter.OpenProtocolCommandsDisabled 4 | { 5 | /// 6 | /// Open Protocol commands disabled unsubscribe 7 | /// Reset the subscription for the Open Protocol commands disabled digital input. 8 | /// Message sent by: Integrator 9 | /// 10 | /// Answer: Command accepted or 11 | /// Command error, Open Protocol commands disabled 12 | /// subscription does not exist 13 | /// 14 | /// 15 | public class Mid0423 : Mid, IOpenProtocolCommandsDisabled, IIntegrator, IAcceptableCommand, IDeclinableCommand 16 | { 17 | public const int MID = 423; 18 | 19 | public IEnumerable DocumentedPossibleErrors => new Error[] { Error.OpenProtocolCommandsDisabledSubscriptionDoesntExists }; 20 | 21 | public Mid0423() : base(MID, DEFAULT_REVISION) { } 22 | 23 | public Mid0423(Header header) : base(header) 24 | { 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/PLCUserData/IPLCUserData.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.PLCUserData 2 | { 3 | /// 4 | /// PLC user data message category. Every PLC user data mid must implement . 5 | /// 6 | public interface IPLCUserData 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/PLCUserData/Mid0243.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.PLCUserData 2 | { 3 | /// 4 | /// User data acknowledge 5 | /// Acknowledgement of user data. 6 | /// Message sent by: Integrator 7 | /// Answer: None 8 | /// 9 | public class Mid0243 : Mid, IPLCUserData, IIntegrator, IAcknowledge 10 | { 11 | public const int MID = 243; 12 | 13 | public Mid0243() : base(MID, DEFAULT_REVISION) { } 14 | 15 | public Mid0243(Header header) : base(header) 16 | { 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/PLCUserData/Mid0244.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace OpenProtocolInterpreter.PLCUserData 4 | { 5 | /// 6 | /// User data unsubscribe 7 | /// Unsubscribe for the user data. 8 | /// Message sent by: Integrator 9 | /// 10 | /// Answer: Command accepted or 11 | /// Command error, Subscription already exists 12 | /// 13 | /// 14 | public class Mid0244 : Mid, IPLCUserData, IIntegrator, IUnsubscription, IAcceptableCommand, IDeclinableCommand 15 | { 16 | public const int MID = 244; 17 | 18 | public IEnumerable DocumentedPossibleErrors => new Error[] { Error.SubscriptionDoesntExists }; 19 | 20 | public Mid0244() : base(MID, DEFAULT_REVISION) { } 21 | 22 | public Mid0244(Header header) : base(header) 23 | { 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/ParameterSet/IParameterSet.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.ParameterSet 2 | { 3 | /// 4 | /// Parameter set message category. Every parameter set mid must implement . 5 | /// 6 | public interface IParameterSet 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/ParameterSet/Mid0010.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.ParameterSet 2 | { 3 | /// 4 | /// Parameter set ID upload request 5 | /// A request to get the valid parameter set IDs from the controller. 6 | /// Message sent by: Integrator 7 | /// Answer: Parameter set ID upload reply 8 | /// 9 | public class Mid0010 : Mid, IParameterSet, IIntegrator, IAnswerableBy 10 | { 11 | public const int MID = 10; 12 | 13 | public Mid0010() : this(DEFAULT_REVISION) 14 | { 15 | 16 | } 17 | 18 | public Mid0010(int revision) : base(MID, revision) { } 19 | 20 | public Mid0010(Header header) : base(header) 21 | { 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/ParameterSet/Mid0016.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.ParameterSet 2 | { 3 | /// 4 | /// Parameter set selected acknowledge 5 | /// Acknowledgement for a new parameter set selected. 6 | /// Message sent by: Integrator 7 | /// Answer: None 8 | /// 9 | public class Mid0016 : Mid, IParameterSet, IIntegrator, IAcknowledge 10 | { 11 | public const int MID = 16; 12 | 13 | public Mid0016() : base(MID, DEFAULT_REVISION) { } 14 | 15 | public Mid0016(Header header) : base(header) 16 | { 17 | } 18 | public Mid0016(int revision) : base(MID, revision) { } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/ParameterSet/Mid0017.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace OpenProtocolInterpreter.ParameterSet 4 | { 5 | /// 6 | /// Parameter set selected unsubscribe 7 | /// Reset the subscription for the parameter set selection. 8 | /// Message sent by: Integrator 9 | /// 10 | /// Answer: Command accepted or 11 | /// Command error, Parameter set subscription does not exist 12 | /// 13 | /// 14 | public class Mid0017 : Mid, IParameterSet, IIntegrator, IUnsubscription, IAcceptableCommand, IDeclinableCommand 15 | { 16 | public const int MID = 17; 17 | 18 | public IEnumerable DocumentedPossibleErrors => new Error[] { Error.ParameterSetSelectionSubscriptionDoesntExists }; 19 | 20 | public Mid0017() : base(MID, DEFAULT_REVISION) { } 21 | 22 | public Mid0017(Header header) : base(header) 23 | { 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/ParameterSet/Mid0023.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.ParameterSet 2 | { 3 | /// 4 | /// Lock at batch done upload Acknowledge 5 | /// This message is an acknowledge to . 6 | /// Message sent by: Integrator 7 | /// Answer: Command accepted 8 | /// 9 | public class Mid0023 : Mid, IParameterSet, IIntegrator, IAcknowledge, IAcceptableCommand 10 | { 11 | public const int MID = 23; 12 | 13 | public Mid0023() : base(MID, DEFAULT_REVISION) { } 14 | 15 | public Mid0023(Header header) : base(header) 16 | { 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/ParameterSet/Mid0024.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace OpenProtocolInterpreter.ParameterSet 4 | { 5 | /// 6 | /// Lock at batch done unsubscribe 7 | /// Reset the subscription for Lock at batch done. 8 | /// Message sent by: Integrator 9 | /// 10 | /// Answer: Command accepted or 11 | /// Command error 12 | /// 13 | /// 14 | public class Mid0024 : Mid, IParameterSet, IIntegrator, IUnsubscription, IAcceptableCommand, IDeclinableCommand 15 | { 16 | public const int MID = 24; 17 | 18 | public IEnumerable DocumentedPossibleErrors => new Error[] { Error.LockAtBatchDoneSubscriptionDoesntExists }; 19 | 20 | public Mid0024() : base(MID, DEFAULT_REVISION) { } 21 | 22 | public Mid0024(Header header) : base(header) 23 | { 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/ParameterSet/Mid0025.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.ParameterSet 2 | { 3 | 4 | class Mid0025 5 | { 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/ParameterSet/Mid2500.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.ParameterSet 2 | { 3 | /// 4 | /// MID: Tightening Program Message download 5 | /// Description: 6 | /// Reset the subscription for Lock at batch done. 7 | /// Message sent by: Integrator 8 | /// Answer: MID 0005 Command accepted or MID 0004 Command error 9 | /// 10 | class Mid2500 11 | { 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/ParameterSet/Mid2501.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.ParameterSet 2 | { 3 | /// 4 | /// MID: Tightening Program Message Upload 5 | /// Description: 6 | /// Reset the subscription for Lock at batch done. 7 | /// Message sent by: Integrator 8 | /// Answer: MID 0005 Command accepted or MID 0004 Command error 9 | /// 10 | class Mid2501 11 | { 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/PowerMACS/BoltData.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.PowerMACS 2 | { 3 | /// 4 | /// Represents a Bolt entity 5 | /// 6 | public class BoltData 7 | { 8 | public int OrdinalBoltNumber { get; set; } 9 | public bool SimpleBoltStatus { get; set; } 10 | public TorqueStatus TorqueStatus { get; set; } 11 | public AngleStatus AngleStatus { get; set; } 12 | public decimal BoltTorque { get; set; } 13 | public decimal BoltAngle { get; set; } 14 | public decimal BoltTorqueHighLimit { get; set; } 15 | public decimal BoltTorqueLowLimit { get; set; } 16 | public decimal BoltAngleHighLimit { get; set; } 17 | public decimal BoltAngleLowLimit { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/PowerMACS/BoltResult.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.PowerMACS 2 | { 3 | /// 4 | /// Represents a Bolt Result entity 5 | /// 6 | public class BoltResult 7 | { 8 | public string VariableName { get; set; } 9 | public DataType Type { get; set; } 10 | public object Value { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/PowerMACS/IPowerMACS.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.PowerMACS 2 | { 3 | /// 4 | /// PowerMACs message category. Every PowerMACs mid must implement . 5 | /// 6 | public interface IPowerMACS 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/PowerMACS/Mid0109.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace OpenProtocolInterpreter.PowerMACS 4 | { 5 | /// 6 | /// Last Power MACS tightening result data unsubscribe 7 | /// Reset the last Power MACS tightening result subscription for the rundowns result. 8 | /// Message sent by: Integrator 9 | /// 10 | /// Answer: Command accepted or 11 | /// Command error, Subscription does not exist 12 | /// 13 | /// 14 | public class Mid0109 : Mid, IPowerMACS, IIntegrator, IUnsubscription, IAcceptableCommand, IDeclinableCommand 15 | { 16 | public const int MID = 109; 17 | 18 | public IEnumerable DocumentedPossibleErrors => new Error[] { Error.SubscriptionDoesntExists }; 19 | 20 | public Mid0109() : this(DEFAULT_REVISION) 21 | { 22 | 23 | } 24 | 25 | public Mid0109(int revision) : base(MID, revision) { } 26 | 27 | public Mid0109(Header header) : base(header) 28 | { 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/PowerMACS/StepResult.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.PowerMACS 2 | { 3 | /// 4 | /// Represents a Step Result entity 5 | /// 6 | public class StepResult 7 | { 8 | public string VariableName { get; set; } 9 | public DataType Type { get; set; } 10 | public object Value { get; set; } 11 | public int StepNumber { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Result/IResult.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.Result 2 | { 3 | /// 4 | /// Result message category. Every result mid must implement . 5 | /// 6 | public interface IResult 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Result/Mid1203.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.Result 2 | { 3 | /// 4 | /// Operation result data acknowledge 5 | /// Message sent by: Integrator 6 | /// Answer: None 7 | /// 8 | public class Mid1203 : Mid, IResult, IIntegrator, IAcknowledge 9 | { 10 | public const int MID = 1203; 11 | 12 | public Mid1203() : base(MID, DEFAULT_REVISION) 13 | { 14 | } 15 | 16 | public Mid1203(Header header) : base(header) 17 | { 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Result/ResultMessages.cs: -------------------------------------------------------------------------------- 1 | using OpenProtocolInterpreter.Messages; 2 | using System; 3 | using System.Collections.Generic; 4 | 5 | namespace OpenProtocolInterpreter.Result 6 | { 7 | /// 8 | /// Template for implementers. 9 | /// 10 | internal class ResultMessages : MessagesTemplate 11 | { 12 | public ResultMessages() : base() 13 | { 14 | _templates = new Dictionary() 15 | { 16 | { Mid1201.MID, new MidCompiledInstance(typeof(Mid1201)) }, 17 | { Mid1202.MID, new MidCompiledInstance(typeof(Mid1202)) }, 18 | { Mid1203.MID, new MidCompiledInstance(typeof(Mid1203)) } 19 | }; 20 | } 21 | 22 | public ResultMessages(IEnumerable selectedMids) : this() 23 | { 24 | FilterSelectedMids(selectedMids); 25 | } 26 | 27 | public ResultMessages(InterpreterMode mode) : this() 28 | { 29 | FilterSelectedMids(mode); 30 | } 31 | 32 | public override bool IsAssignableTo(int mid) => mid > 1200 && mid < 1204; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Statistic/IStatistic.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.Statistic 2 | { 3 | /// 4 | /// Statistic message category. Every statistic mid must implement . 5 | /// 6 | public interface IStatistic 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Statistic/StatisticMessages.cs: -------------------------------------------------------------------------------- 1 | using OpenProtocolInterpreter.Messages; 2 | using System; 3 | using System.Collections.Generic; 4 | 5 | namespace OpenProtocolInterpreter.Statistic 6 | { 7 | /// 8 | /// Template for implementers. 9 | /// 10 | internal class StatisticMessages : MessagesTemplate 11 | { 12 | public StatisticMessages() : base() 13 | { 14 | _templates = new Dictionary() 15 | { 16 | { Mid0300.MID, new MidCompiledInstance(typeof(Mid0300)) }, 17 | { Mid0301.MID, new MidCompiledInstance(typeof(Mid0301)) } 18 | }; 19 | } 20 | 21 | public StatisticMessages(IEnumerable selectedMids) : this() 22 | { 23 | FilterSelectedMids(selectedMids); 24 | } 25 | 26 | public StatisticMessages(InterpreterMode mode) : this() 27 | { 28 | FilterSelectedMids(mode); 29 | } 30 | 31 | public override bool IsAssignableTo(int mid) => mid > 299 && mid < 302; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Tightening/ITightening.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.Tightening 2 | { 3 | /// 4 | /// Tightening message category. Every tightening mid must implement . 5 | /// 6 | public interface ITightening 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Tightening/Mid0062.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.Tightening 2 | { 3 | /// 4 | /// Last tightening result data acknowledge 5 | /// Acknowledgement of last tightening result data. 6 | /// Message sent by: Integrator 7 | /// Answer: None 8 | /// 9 | public class Mid0062 : Mid, ITightening, IIntegrator, IAcknowledge 10 | { 11 | public const int MID = 62; 12 | 13 | public Mid0062() : this(DEFAULT_REVISION) 14 | { 15 | 16 | } 17 | 18 | public Mid0062(int revision) : base(MID, revision) 19 | { 20 | 21 | } 22 | 23 | public Mid0062(Header header) : base(header) 24 | { 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Tightening/Mid0063.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace OpenProtocolInterpreter.Tightening 4 | { 5 | /// 6 | /// Last tightening result data unsubscribe 7 | /// Reset the last tightening result subscription. 8 | /// Message sent by: Integrator 9 | /// 10 | /// Answer: Command accepted or 11 | /// Command error, Last tightening result subscription does not exist 12 | /// 13 | /// 14 | public class Mid0063 : Mid, ITightening, IIntegrator, IUnsubscription, IAcceptableCommand, IDeclinableCommand 15 | { 16 | public const int MID = 63; 17 | 18 | public IEnumerable DocumentedPossibleErrors => new Error[] { Error.LastTighteningResultSubscriptionDoesntExists }; 19 | 20 | public Mid0063() : this(DEFAULT_REVISION) 21 | { 22 | 23 | } 24 | 25 | public Mid0063(int revision) : base(MID, revision) 26 | { 27 | 28 | } 29 | 30 | public Mid0063(Header header) : base(header) 31 | { 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Time/ITime.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.Time 2 | { 3 | /// 4 | /// Time message category. Every time mid must implement . 5 | /// 6 | public interface ITime 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Time/Mid0080.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.Time 2 | { 3 | /// 4 | /// Read time upload request 5 | /// Message sent by: Integrator 6 | /// Answer: Read time upload reply 7 | /// 8 | public class Mid0080 : Mid, ITime, IIntegrator, IAnswerableBy 9 | { 10 | public const int MID = 80; 11 | 12 | public Mid0080() : base(MID, DEFAULT_REVISION) 13 | { 14 | 15 | } 16 | 17 | public Mid0080(Header header) : base(header) 18 | { 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Time/TimeMessages.cs: -------------------------------------------------------------------------------- 1 | using OpenProtocolInterpreter.Messages; 2 | using System; 3 | using System.Collections.Generic; 4 | 5 | namespace OpenProtocolInterpreter.Time 6 | { 7 | /// 8 | /// Template for implementers. 9 | /// 10 | internal class TimeMessages : MessagesTemplate 11 | { 12 | public TimeMessages() : base() 13 | { 14 | _templates = new Dictionary() 15 | { 16 | { Mid0080.MID, new MidCompiledInstance(typeof(Mid0080)) }, 17 | { Mid0081.MID, new MidCompiledInstance(typeof(Mid0081)) }, 18 | { Mid0082.MID, new MidCompiledInstance(typeof(Mid0082)) } 19 | }; 20 | } 21 | 22 | public TimeMessages(IEnumerable selectedMids) : this() 23 | { 24 | FilterSelectedMids(selectedMids); 25 | } 26 | 27 | public TimeMessages(InterpreterMode mode) : this() 28 | { 29 | FilterSelectedMids(mode); 30 | } 31 | 32 | public override bool IsAssignableTo(int mid) => mid > 79 && mid < 83; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Tool/ITool.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.Tool 2 | { 3 | /// 4 | /// Tool message category. Every tool mid must implement . 5 | /// 6 | public interface ITool 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/Tool/Mid0700.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.Tool 2 | { 3 | /// 4 | /// Tightening data download status 5 | /// Description: 6 | /// Used by controller to upload the status of tightening data download to an radio connected tool. 7 | /// Must be subscribed for by generic MID 0008 and unsubscribed for with generic MID 0009. 8 | /// No extra data is needed and no historical data is applicable. 9 | /// Message sent by: Controller 10 | /// Answer: MID 0005 Command accepted 11 | /// 12 | class Mid0700 13 | { 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/UserInterface/IUserInterface.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.UserInterface 2 | { 3 | /// 4 | /// User interface message category. Every user interface must implement . 5 | /// 6 | public interface IUserInterface 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/UserInterface/Mid0113.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.UserInterface 2 | { 3 | /// 4 | /// Flash green light on tool 5 | /// 6 | /// By sending this message the integrator can make the green light on the tool flash. 7 | /// The light on the tool will flash until the operator pushes the tool trigger. 8 | /// 9 | /// Message sent by: Integrator 10 | /// Answer: Command accepted 11 | /// 12 | public class Mid0113 : Mid, IUserInterface, IIntegrator, IAcceptableCommand 13 | { 14 | public const int MID = 113; 15 | 16 | public Mid0113() : base(MID, DEFAULT_REVISION) 17 | { 18 | 19 | } 20 | 21 | public Mid0113(Header header) : base(header) 22 | { 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/_internals/Messages/IMessagesTemplate.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace OpenProtocolInterpreter.Messages 5 | { 6 | /// 7 | /// Templates for parsing packages and validating Mid assignability 8 | /// 9 | internal interface IMessagesTemplate 10 | { 11 | void AddOrUpdateTemplate(IDictionary types); 12 | Mid ProcessPackage(int mid, string package); 13 | Mid ProcessPackage(int mid, byte[] package); 14 | bool IsAssignableTo(int mid); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/_internals/Messages/MessageTemplateFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace OpenProtocolInterpreter.Messages 6 | { 7 | internal static class MessageTemplateFactory 8 | { 9 | public static IDictionary Except(this IDictionary defaultMids, IEnumerable selectedMids) 10 | { 11 | if (!selectedMids.Any()) 12 | return defaultMids; 13 | 14 | var unusedMids = defaultMids.Values.Except(selectedMids); 15 | 16 | foreach (var unused in unusedMids) 17 | { 18 | defaultMids.Remove(defaultMids.First(x => x.Value == unused)); 19 | } 20 | 21 | return defaultMids; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/_internals/Messages/MidCompiledInstance.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq.Expressions; 3 | using System.Reflection; 4 | 5 | namespace OpenProtocolInterpreter.Messages 6 | { 7 | internal class MidCompiledInstance 8 | { 9 | public Type Type { get; set; } 10 | public Func CompiledConstructor { get; set; } 11 | 12 | public MidCompiledInstance(Type type) 13 | { 14 | Type = type; 15 | var ctor = type.GetConstructor(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance, null, Type.EmptyTypes, null); 16 | CompiledConstructor = Expression.Lambda>(Expression.New(ctor)).Compile(); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/vin/IVIN.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.Vin 2 | { 3 | /// 4 | /// Vin message category. Every vin mid must implement . 5 | /// 6 | public interface IVin 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/vin/Mid0053.cs: -------------------------------------------------------------------------------- 1 | namespace OpenProtocolInterpreter.Vin 2 | { 3 | /// 4 | /// Vehicle ID Number acknowledge 5 | /// Message sent by: Integrator 6 | /// Answer: None 7 | /// 8 | public class Mid0053 : Mid, IVin, IIntegrator, IAcknowledge 9 | { 10 | public const int MID = 53; 11 | 12 | public Mid0053() : this(DEFAULT_REVISION) 13 | { 14 | 15 | } 16 | 17 | public Mid0053(int revision) : base(MID, revision) 18 | { 19 | 20 | } 21 | 22 | public Mid0053(Header header) : base(header) 23 | { 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/OpenProtocolInterpreter/vin/Mid0054.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace OpenProtocolInterpreter.Vin 4 | { 5 | /// 6 | /// Vehicle ID Number unsubscribe 7 | /// Reset the subscription for the current tightening identifiers. 8 | /// Message sent by: Integrator 9 | /// 10 | /// Answer: Command accepted or 11 | /// Command error, VIN subscription does not exist 12 | /// 13 | /// 14 | public class Mid0054 : Mid, IVin, IIntegrator, IUnsubscription, IAcceptableCommand, IDeclinableCommand 15 | { 16 | public const int MID = 54; 17 | 18 | public IEnumerable DocumentedPossibleErrors => new Error[] { Error.VINUploadSubscriptionDoesntExists }; 19 | 20 | public Mid0054() : this(DEFAULT_REVISION) 21 | { 22 | 23 | } 24 | 25 | public Mid0054(int revision) : base(MID, revision) 26 | { 27 | 28 | } 29 | 30 | public Mid0054(Header header) : base(header) 31 | { 32 | } 33 | } 34 | } 35 | --------------------------------------------------------------------------------