From 002b4d40ecb48d1d9fea5594de2fcb87c682902d Mon Sep 17 00:00:00 2001 From: Timothy Nunnink <46979634+tnunnink@users.noreply.github.com> Date: Fri, 3 Nov 2023 09:26:20 -0500 Subject: [PATCH] FBD development and updates to the L5X primary API --- src/.idea/.idea.L5Sharp/.idea/workspace.xml | 135 ++++---- src/L5Sharp.sln.DotSettings | 3 + src/L5Sharp/Common/Argument.cs | 34 +- src/L5Sharp/Common/ComponentKey.cs | 34 +- .../CrossReference.cs} | 93 ++++-- src/L5Sharp/Common/Instruction.cs | 43 ++- src/L5Sharp/Common/NeutralText.cs | 7 +- src/L5Sharp/Common/TagName.cs | 14 +- src/L5Sharp/Components/AddOnInstruction.cs | 8 +- src/L5Sharp/Components/DataType.cs | 6 +- ...nstruction.cs => AddOnInstructionBlock.cs} | 42 +-- .../{DiagramAttachment.cs => Attachment.cs} | 17 +- src/L5Sharp/Elements/Block.cs | 111 +++++++ src/L5Sharp/Elements/Chart.cs | 44 +++ src/L5Sharp/Elements/ConnectorBlock.cs | 64 ++++ src/L5Sharp/Elements/DataTypeMember.cs | 17 +- src/L5Sharp/Elements/Diagram.cs | 208 +++++++++++++ src/L5Sharp/Elements/DiagramBlock.cs | 95 +++--- src/L5Sharp/Elements/DiagramConnector.cs | 42 +-- src/L5Sharp/Elements/DiagramElement.cs | 79 ----- src/L5Sharp/Elements/DiagramFunction.cs | 60 ---- src/L5Sharp/Elements/DiagramRoutine.cs | 88 ------ src/L5Sharp/Elements/DiagramWire.cs | 73 ----- src/L5Sharp/Elements/Function.cs | 50 +++ src/L5Sharp/Elements/FunctionBlock.cs | 41 +++ src/L5Sharp/Elements/JsrBlock.cs | 62 ++++ src/L5Sharp/Elements/Line.cs | 10 +- src/L5Sharp/Elements/Parameter.cs | 2 +- ...{DiagramReference.cs => ReferenceBlock.cs} | 46 +-- src/L5Sharp/Elements/RoutineBlock.cs | 61 ++++ src/L5Sharp/Elements/Rung.cs | 45 ++- src/L5Sharp/Elements/SbrBlock.cs | 62 ++++ src/L5Sharp/Elements/SequenceBlock.cs | 43 +++ src/L5Sharp/Elements/Sheet.cs | 118 +++---- .../Elements/{DiagramStep.cs => Step.cs} | 35 ++- .../Elements/{DiagramText.cs => TextBox.cs} | 21 +- src/L5Sharp/Elements/Wire.cs | 96 ++++++ src/L5Sharp/Enums/DiagramType.cs | 50 +++ src/L5Sharp/Enums/ParameterType.cs | 24 ++ src/L5Sharp/ILogixReferencable.cs | 7 +- src/L5Sharp/L5X.cs | 290 ++++++++++++------ src/L5Sharp/LogixCode.cs | 61 +--- src/L5Sharp/LogixComponent.cs | 45 +-- src/L5Sharp/LogixContainer.cs | 71 +++-- src/L5Sharp/LogixElement.cs | 212 +++++++++++-- src/L5Sharp/LogixSerializer.cs | 63 +--- src/L5Sharp/Utilities/L5XExtensions.cs | 85 +---- tests/L5Sharp.Samples/Known.cs | 2 +- tests/L5Sharp.Samples/Routines/FBD.L5X | 107 +++++-- tests/L5Sharp.Samples/Routines/SFC.L5X | 138 ++++++++- tests/L5Sharp.Tests/Common/ArgumentTests.cs | 1 - .../L5Sharp.Tests/Common/ComponentKeyTests.cs | 98 ++++++ .../L5Sharp.Tests/Components/DataTypeTests.cs | 8 +- tests/L5Sharp.Tests/Components/TagTests.cs | 2 +- tests/L5Sharp.Tests/Elements/LineTests.cs | 8 +- ...efOverloaded_ShouldBeVerified.verified.txt | 1 + ...efOverloaded_ShouldBeVerified.verified.txt | 1 + .../Elements/ReferenceBlockTests.cs | 157 ++++++++++ ...ksOutOfOrder_ShouldBeVerified.verified.txt | 5 + tests/L5Sharp.Tests/Elements/SheetTests.cs | 114 ++----- tests/L5Sharp.Tests/Examples.cs | 2 +- tests/L5Sharp.Tests/L5Sharp.Tests.csproj | 6 + tests/L5Sharp.Tests/L5XBasicTests.cs | 22 +- tests/L5Sharp.Tests/L5XDataTypeTests.cs | 4 +- tests/L5Sharp.Tests/L5XReferenceTests.cs | 2 +- tests/L5Sharp.Tests/L5XTemplateTests.cs | 14 + 66 files changed, 2396 insertions(+), 1213 deletions(-) rename src/L5Sharp/{LogixReference.cs => Common/CrossReference.cs} (57%) rename src/L5Sharp/Elements/{DiagramInstruction.cs => AddOnInstructionBlock.cs} (64%) rename src/L5Sharp/Elements/{DiagramAttachment.cs => Attachment.cs} (65%) create mode 100644 src/L5Sharp/Elements/Block.cs create mode 100644 src/L5Sharp/Elements/Chart.cs create mode 100644 src/L5Sharp/Elements/ConnectorBlock.cs create mode 100644 src/L5Sharp/Elements/Diagram.cs delete mode 100644 src/L5Sharp/Elements/DiagramElement.cs delete mode 100644 src/L5Sharp/Elements/DiagramFunction.cs delete mode 100644 src/L5Sharp/Elements/DiagramRoutine.cs delete mode 100644 src/L5Sharp/Elements/DiagramWire.cs create mode 100644 src/L5Sharp/Elements/Function.cs create mode 100644 src/L5Sharp/Elements/FunctionBlock.cs create mode 100644 src/L5Sharp/Elements/JsrBlock.cs rename src/L5Sharp/Elements/{DiagramReference.cs => ReferenceBlock.cs} (52%) create mode 100644 src/L5Sharp/Elements/RoutineBlock.cs create mode 100644 src/L5Sharp/Elements/SbrBlock.cs create mode 100644 src/L5Sharp/Elements/SequenceBlock.cs rename src/L5Sharp/Elements/{DiagramStep.cs => Step.cs} (78%) rename src/L5Sharp/Elements/{DiagramText.cs => TextBox.cs} (62%) create mode 100644 src/L5Sharp/Elements/Wire.cs create mode 100644 src/L5Sharp/Enums/DiagramType.cs create mode 100644 src/L5Sharp/Enums/ParameterType.cs create mode 100644 tests/L5Sharp.Tests/Common/ComponentKeyTests.cs create mode 100644 tests/L5Sharp.Tests/Elements/ReferenceBlockTests.New_IRefOverloaded_ShouldBeVerified.verified.txt create mode 100644 tests/L5Sharp.Tests/Elements/ReferenceBlockTests.New_ORefOverloaded_ShouldBeVerified.verified.txt create mode 100644 tests/L5Sharp.Tests/Elements/ReferenceBlockTests.cs create mode 100644 tests/L5Sharp.Tests/Elements/SheetTests.Add_BlocksOutOfOrder_ShouldBeVerified.verified.txt diff --git a/src/.idea/.idea.L5Sharp/.idea/workspace.xml b/src/.idea/.idea.L5Sharp/.idea/workspace.xml index e8308295..c0a3d6bb 100644 --- a/src/.idea/.idea.L5Sharp/.idea/workspace.xml +++ b/src/.idea/.idea.L5Sharp/.idea/workspace.xml @@ -9,41 +9,72 @@ - - - + + + + + + + + + + + + + + + + + + - + + + + + - - - + + + + + + + + + + - - - - + + + - - + + + + + - + + - - - - + + + + + + - + + - - - - - - - - - - - - + - - - - - - - - - +