Skip to content

Commit

Permalink
chore(v0.0.3): Adapt to latest TcHaxx.rplc
Browse files Browse the repository at this point in the history
  • Loading branch information
densogiaichned committed Feb 11, 2024
1 parent b6f0067 commit 65a0267
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 29 deletions.
2 changes: 1 addition & 1 deletion src/TcHaxx.Snappy.CLI/TcHaxx.Snappy.CLI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<Description>A Snapshot Testing framework for TwinCAT 3</Description>
<Copyright>Copyright (c) 2024 densogiaichned</Copyright>
<Title>TwinCAT Snapshot Testing framework</Title>
<Version>0.0.2</Version>
<Version>0.0.3</Version>
<AssemblyVersion>$(Version)</AssemblyVersion>
<FileVersion>$(Version)</FileVersion>
<PackAsTool>True</PackAsTool>
Expand Down
1 change: 1 addition & 0 deletions src/TcHaxx.Snappy.Common/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ public class Constants
public const int DEFAULT_STRING_PARAMETER_LENGTH = 128;
public const int DEFAULT_TEST_NAMES_LENGTH = 256;
public const int DEFAULT_JSON_PARAMETER_LENGTH = 16384;
public const int DEFAULT_VERIFICATION_RESULT_LENGTH = 1024;
public const int MAX_STRING_PARAMETER_LENGTH = ushort.MaxValue;
public static readonly Encoding DEFAULT_STRING_ENCODING = Encoding.UTF8;
}
2 changes: 1 addition & 1 deletion src/TcHaxx.Snappy.Common/Verify/VerificationResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ namespace TcHaxx.Snappy.Common.Verify;
public struct VerificationResult
{
public int HResult;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = Constants.DEFAULT_STRING_PARAMETER_LENGTH)]
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = Constants.DEFAULT_VERIFICATION_RESULT_LENGTH)]
public string Diff;
}
16 changes: 8 additions & 8 deletions src/TcHaxx.Snappy/snappy/GVLs/Param_TcHaxx_Snappy.TcGVL
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
{attribute 'no-analysis'}
{attribute 'global_init_slot' := '49992'}
VAR_GLOBAL CONSTANT
cMaxSizeJsonDocument : UDINT (16#FF..16#8000) := 16#4000;
cSnappyVerifyAmsNetID : T_AmsNetID := TcHaxx.GCL.cLocalAmsNetId;
cSnappyVerifyPort : T_SnappyVerifyPort := 25000;
cSnappyVerifyInstancePath : STRING := 'TcHaxx.Snappy.Verifier.VerifyService';
cSnappyVerifySymbol : STRING := 'Verify';
cSnappyVerificationResultLength : UDINT(16#80..16#4000) := 16#400;
cSnappyVerificationTestSuiteLength : UDINT(16#80..16#400) := 16#100;
cSnappyVerificationTestNameLength : UDINT(16#80..16#400) := 16#100;
cMaxSizeJsonDocument : UDINT (16#FF..16#8000) := 16#4000;
cSnappyVerifyAmsNetID : T_AmsNetID := TcHaxx_rplc.GCL.cLocalAmsNetId;
cSnappyVerifyPort : T_SnappyVerifyPort := 25000;
cSnappyVerifyInstancePath : STRING := 'TcHaxx.Snappy.Verifier.VerifyService';
cSnappyVerifySymbol : STRING := 'Verify';
cSnappyVerificationResultLength : UDINT(16#80..16#4000) := 16#400;
cSnappyVerificationTestSuiteLength : UDINT(16#80..16#400) := 16#100;
cSnappyVerificationTestNameLength : UDINT(16#80..16#400) := 16#100;
END_VAR]]></Declaration>
</GVL>
</TcPlcObject>
4 changes: 2 additions & 2 deletions src/TcHaxx.Snappy/snappy/POUs/internal/RPC/FB_RpcProxy.TcPOU
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ VAR_OUTPUT
END_VAR
VAR
stAdsStatus : TcHaxx.ST_AdsStatus;
stAdsStatus : TcHaxx_rplc.ST_AdsStatus;
END_VAR]]></Declaration>
<Implementation>
<ST><![CDATA[GetVerificationResult := S_PENDING;
Expand Down Expand Up @@ -88,7 +88,7 @@ VAR_INPUT CONSTANT
END_VAR
VAR
hr : HRESULT;
stAdsStatus : TcHaxx.ST_AdsStatus;
stAdsStatus : TcHaxx_rplc.ST_AdsStatus;
sTestSuiteName : STRING(Param_TcHaxx_Snappy.cSnappyVerificationTestSuiteLength) := 'ATestSuiteName';
Expand Down
24 changes: 7 additions & 17 deletions src/TcHaxx.Snappy/snappy/snappy.plcproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<Company>TcHaxx</Company>
<Released>false</Released>
<Title>snappy</Title>
<ProjectVersion>0.0.2.0</ProjectVersion>
<ProjectVersion>0.0.3.0</ProjectVersion>
<LibraryCategories>
<LibraryCategory xmlns="">
<Id>{9c7e50a7-dead-beef-897b-4cdbc169222d}</Id>
Expand All @@ -33,13 +33,13 @@
<Author>densogiaichned</Author>
<Description>A Snapshot Testing framework for TwinCAT 3</Description>
<CompilerDefines>TCUNIT</CompilerDefines>
<DefaultNamespace>tchaxx</DefaultNamespace>
<DefaultNamespace>TcHaxx_Snappy</DefaultNamespace>
<DeploymentEvents>
<Events>
<Event>
<CommandType>Execute</CommandType>
<CommandType>Copy</CommandType>
<DeploymentType>ActivateConfiguration</DeploymentType>
<Command1>cmd /c start TcHaxx.Snappy.CLI verify -l Debug</Command1>
<Command1 />
<Command2 />
</Event>
</Events>
Expand Down Expand Up @@ -107,6 +107,7 @@
</Compile>
<Compile Include="POUs\FB_Snappy.TcPOU">
<SubType>Code</SubType>
<LinkAlways>true</LinkAlways>
</Compile>
<Compile Include="POUs\Helper\FAILED_AND_NOT_PENDING.TcPOU">
<SubType>Code</SubType>
Expand Down Expand Up @@ -160,14 +161,8 @@
</ItemGroup>
<ItemGroup>
<PlaceholderReference Include="rplc">
<DefaultResolution>rplc, * (tchaxx)</DefaultResolution>
<Namespace>TcHaxx</Namespace>
<Parameters>
<Parameter ListName="PARAM_ARGS" xmlns="">
<Key>CMAXARGSBUFFER</Key>
<Value>65535</Value>
</Parameter>
</Parameters>
<DefaultResolution>rplc, * (TcHaxx)</DefaultResolution>
<Namespace>TcHaxx_rplc</Namespace>
</PlaceholderReference>
<PlaceholderReference Include="Tc2_Standard">
<DefaultResolution>Tc2_Standard, * (Beckhoff Automation GmbH)</DefaultResolution>
Expand Down Expand Up @@ -196,11 +191,6 @@
<SubType>Content</SubType>
</None>
</ItemGroup>
<ItemGroup>
<PlaceholderResolution Include="rplc">
<Resolution>rplc, * (tchaxx)</Resolution>
</PlaceholderResolution>
</ItemGroup>
<ProjectExtensions>
<PlcProjectOptions>
<XmlArchive>
Expand Down

0 comments on commit 65a0267

Please sign in to comment.