From ecc9479d5d8144a80fa197d44cdce115ea96842b Mon Sep 17 00:00:00 2001 From: Peter Kurhajec <61538034+PTKu@users.noreply.github.com> Date: Fri, 24 Jan 2025 08:21:57 +0100 Subject: [PATCH] Revert "When writing a string to the PLC and length more than declared exception occurs" --- .../Onliner/CsOnlinerConstructorBuilder.cs | 2 -- .../ax/.g/Onliners/class_all_primitives.g.cs | 36 ------------------- .../class_extended_by_known_type.g.cs | 1 - .../class_with_primitive_members.g.cs | 2 -- .../.g/Onliners/compileromitsattribute.g.cs | 3 -- .../ax/.g/Onliners/configuration.g.cs | 2 -- .../expected/ax/.g/Onliners/makereadonce.g.cs | 4 --- .../expected/ax/.g/Onliners/makereadonly.g.cs | 4 --- .../units/expected/ax/.g/Onliners/misc.g.cs | 2 -- .../Onliners/types_with_name_attributes.g.cs | 1 - .../ax/.g/POCO/class_all_primitives.g.cs | 2 -- .../samples/units/expected/ax/units.csproj | 21 ----------- .../tia/.g/Onliners/class_all_primitives.g.cs | 36 ------------------- .../class_extended_by_known_type.g.cs | 1 - .../class_with_primitive_members.g.cs | 2 -- .../.g/Onliners/compileromitsattribute.g.cs | 3 -- .../tia/.g/Onliners/configuration.g.cs | 2 -- .../tia/.g/Onliners/makereadonce.g.cs | 4 --- .../tia/.g/Onliners/makereadonly.g.cs | 4 --- .../units/expected/tia/.g/Onliners/misc.g.cs | 2 -- .../Onliners/types_with_name_attributes.g.cs | 1 - .../tia/.g/POCO/class_all_primitives.g.cs | 2 -- .../samples/units/expected/tia/units.csproj | 21 ----------- .../samples/units/src/class_all_primitives.st | 2 -- .../BuiltInWrappers/WebApiString.cs | 4 +-- .../BuiltInWrappers/WebApiWString.cs | 4 +-- .../ValueTypes/Onlines/OnlinerString.cs | 6 ---- .../ValueTypes/Onlines/OnlinerWString.cs | 6 ---- 28 files changed, 4 insertions(+), 176 deletions(-) delete mode 100644 src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/units.csproj delete mode 100644 src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/units.csproj diff --git a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/CsOnlinerConstructorBuilder.cs b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/CsOnlinerConstructorBuilder.cs index a6a6b6432..eaba5a7ec 100644 --- a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/CsOnlinerConstructorBuilder.cs +++ b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/CsOnlinerConstructorBuilder.cs @@ -360,8 +360,6 @@ private void AddMemberInitialization(IStringTypeDeclaration type, IStorageDeclar AddToSource($"{field.Name}"); AddToSource($"= @Connector.ConnectorAdapter.AdapterFactory.Create{IecToAdapterExtensions.ToAdapterType(type)}"); AddToSource($"(this, \"{field.GetAttributeNameValue(field.Name)}\", \"{field.Name}\");"); - AddToSource($"{field.Name}.Capacity = {type.Capacity};"); - } // We get warning here about unused method, it is false positive, but we will need to investigate further the object hierarchy. diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_all_primitives.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_all_primitives.g.cs index a15f7ce5b..a6bd7f84b 100644 --- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_all_primitives.g.cs +++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_all_primitives.g.cs @@ -29,8 +29,6 @@ public partial class class_all_primitives : AXSharp.Connector.ITwinObject public OnlinerDateTime myDATE_AND_TIME { get; } public OnlinerString mySTRING { get; } public OnlinerWString myWSTRING { get; } - public OnlinerString mySTRING_25 { get; } - public OnlinerWString myWSTRING_55 { get; } partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail); partial void PostConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail); @@ -63,13 +61,7 @@ public class_all_primitives(AXSharp.Connector.ITwinObject parent, string readabl myTIME_OF_DAY = @Connector.ConnectorAdapter.AdapterFactory.CreateTIME_OF_DAY(this, "myTIME_OF_DAY", "myTIME_OF_DAY"); myDATE_AND_TIME = @Connector.ConnectorAdapter.AdapterFactory.CreateDATE_AND_TIME(this, "myDATE_AND_TIME", "myDATE_AND_TIME"); mySTRING = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "mySTRING", "mySTRING"); - mySTRING.Capacity = 254; myWSTRING = @Connector.ConnectorAdapter.AdapterFactory.CreateWSTRING(this, "myWSTRING", "myWSTRING"); - myWSTRING.Capacity = 254; - mySTRING_25 = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "mySTRING_25", "mySTRING_25"); - mySTRING_25.Capacity = 25; - myWSTRING_55 = @Connector.ConnectorAdapter.AdapterFactory.CreateWSTRING(this, "myWSTRING_55", "myWSTRING_55"); - myWSTRING_55.Capacity = 55; parent.AddChild(this); parent.AddKid(this); PostConstruct(parent, readableTail, symbolTail); @@ -106,8 +98,6 @@ public async virtual Task OnlineToPlain() plain.myDATE_AND_TIME = myDATE_AND_TIME.LastValue; plain.mySTRING = mySTRING.LastValue; plain.myWSTRING = myWSTRING.LastValue; - plain.mySTRING_25 = mySTRING_25.LastValue; - plain.myWSTRING_55 = myWSTRING_55.LastValue; return plain; } @@ -138,8 +128,6 @@ public async virtual Task OnlineToPlain() plain.myDATE_AND_TIME = myDATE_AND_TIME.LastValue; plain.mySTRING = mySTRING.LastValue; plain.myWSTRING = myWSTRING.LastValue; - plain.mySTRING_25 = mySTRING_25.LastValue; - plain.myWSTRING_55 = myWSTRING_55.LastValue; return plain; } @@ -169,8 +157,6 @@ public async virtual Task OnlineToPlain() plain.myDATE_AND_TIME = myDATE_AND_TIME.LastValue; plain.mySTRING = mySTRING.LastValue; plain.myWSTRING = myWSTRING.LastValue; - plain.mySTRING_25 = mySTRING_25.LastValue; - plain.myWSTRING_55 = myWSTRING_55.LastValue; return plain; } @@ -246,12 +232,6 @@ public async Task> PlainToOnlineAsync(global::Pocos. #pragma warning restore CS0612 #pragma warning disable CS0612 myWSTRING.LethargicWrite(plain.myWSTRING); -#pragma warning restore CS0612 -#pragma warning disable CS0612 - mySTRING_25.LethargicWrite(plain.mySTRING_25); -#pragma warning restore CS0612 -#pragma warning disable CS0612 - myWSTRING_55.LethargicWrite(plain.myWSTRING_55); #pragma warning restore CS0612 return await this.WriteAsync(); } @@ -325,12 +305,6 @@ public async Task _PlainToOnlineNoacAsync(global::Pocos.class_all_primitives pla #pragma warning restore CS0612 #pragma warning disable CS0612 myWSTRING.LethargicWrite(plain.myWSTRING); -#pragma warning restore CS0612 -#pragma warning disable CS0612 - mySTRING_25.LethargicWrite(plain.mySTRING_25); -#pragma warning restore CS0612 -#pragma warning disable CS0612 - myWSTRING_55.LethargicWrite(plain.myWSTRING_55); #pragma warning restore CS0612 } @@ -364,8 +338,6 @@ public async virtual Task ShadowToPlain() plain.myDATE_AND_TIME = myDATE_AND_TIME.Shadow; plain.mySTRING = mySTRING.Shadow; plain.myWSTRING = myWSTRING.Shadow; - plain.mySTRING_25 = mySTRING_25.Shadow; - plain.myWSTRING_55 = myWSTRING_55.Shadow; return plain; } @@ -393,8 +365,6 @@ public async virtual Task ShadowToPlain() plain.myDATE_AND_TIME = myDATE_AND_TIME.Shadow; plain.mySTRING = mySTRING.Shadow; plain.myWSTRING = myWSTRING.Shadow; - plain.mySTRING_25 = mySTRING_25.Shadow; - plain.myWSTRING_55 = myWSTRING_55.Shadow; return plain; } @@ -427,8 +397,6 @@ public async Task> PlainToShadowAsync(global::Pocos. myDATE_AND_TIME.Shadow = plain.myDATE_AND_TIME; mySTRING.Shadow = plain.mySTRING; myWSTRING.Shadow = plain.myWSTRING; - mySTRING_25.Shadow = plain.mySTRING_25; - myWSTRING_55.Shadow = plain.myWSTRING_55; return this.RetrievePrimitives(); } @@ -493,10 +461,6 @@ public async Task DetectsAnyChangeAsync(global::Pocos.class_all_primitives somethingChanged = true; if (plain.myWSTRING != myWSTRING.LastValue) somethingChanged = true; - if (plain.mySTRING_25 != mySTRING_25.LastValue) - somethingChanged = true; - if (plain.myWSTRING_55 != myWSTRING_55.LastValue) - somethingChanged = true; plain = latest; return somethingChanged; }); diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_extended_by_known_type.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_extended_by_known_type.g.cs index 03105924f..d6a63b53c 100644 --- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_extended_by_known_type.g.cs +++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_extended_by_known_type.g.cs @@ -156,7 +156,6 @@ public AbstractState(AXSharp.Connector.ITwinObject parent, string readableTail, PreConstruct(parent, readableTail, symbolTail); StateID = @Connector.ConnectorAdapter.AdapterFactory.CreateINT(this, "StateID", "StateID"); StateName = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "StateName", "StateName"); - StateName.Capacity = 254; parent.AddChild(this); parent.AddKid(this); PostConstruct(parent, readableTail, symbolTail); diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_with_primitive_members.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_with_primitive_members.g.cs index 7e6eafad3..ddbb9d537 100644 --- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_with_primitive_members.g.cs +++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/class_with_primitive_members.g.cs @@ -73,9 +73,7 @@ public ClassWithPrimitiveTypes(AXSharp.Connector.ITwinObject parent, string read myCHAR = @Connector.ConnectorAdapter.AdapterFactory.CreateCHAR(this, "myCHAR", "myCHAR"); myWCHAR = @Connector.ConnectorAdapter.AdapterFactory.CreateWCHAR(this, "myWCHAR", "myWCHAR"); mySTRING = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "mySTRING", "mySTRING"); - mySTRING.Capacity = 254; myWSTRING = @Connector.ConnectorAdapter.AdapterFactory.CreateWSTRING(this, "myWSTRING", "myWSTRING"); - myWSTRING.Capacity = 254; parent.AddChild(this); parent.AddKid(this); PostConstruct(parent, readableTail, symbolTail); diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/compileromitsattribute.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/compileromitsattribute.g.cs index 4e73de5e5..da7c3a821 100644 --- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/compileromitsattribute.g.cs +++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/compileromitsattribute.g.cs @@ -245,7 +245,6 @@ public Complex(AXSharp.Connector.ITwinObject parent, string readableTail, string HumanReadable = AXSharp.Connector.Connector.CreateHumanReadable(parent.HumanReadable, readableTail); PreConstruct(parent, readableTail, symbolTail); HelloString = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "HelloString", "HelloString"); - HelloString.Capacity = 254; Id = @Connector.ConnectorAdapter.AdapterFactory.CreateULINT(this, "Id", "Id"); parent.AddChild(this); parent.AddKid(this); @@ -961,7 +960,6 @@ public SomeClass(AXSharp.Connector.ITwinObject parent, string readableTail, stri HumanReadable = AXSharp.Connector.Connector.CreateHumanReadable(parent.HumanReadable, readableTail); PreConstruct(parent, readableTail, symbolTail); SomeClassVariable = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "SomeClassVariable", "SomeClassVariable"); - SomeClassVariable.Capacity = 254; parent.AddChild(this); parent.AddKid(this); PostConstruct(parent, readableTail, symbolTail); @@ -1866,7 +1864,6 @@ public Complex(AXSharp.Connector.ITwinObject parent, string readableTail, string HumanReadable = AXSharp.Connector.Connector.CreateHumanReadable(parent.HumanReadable, readableTail); PreConstruct(parent, readableTail, symbolTail); HelloString = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "HelloString", "HelloString"); - HelloString.Capacity = 254; Id = @Connector.ConnectorAdapter.AdapterFactory.CreateULINT(this, "Id", "Id"); parent.AddChild(this); parent.AddKid(this); diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/configuration.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/configuration.g.cs index d9d1b18a6..49aedcf27 100644 --- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/configuration.g.cs +++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/configuration.g.cs @@ -72,9 +72,7 @@ public ComplexForConfig(AXSharp.Connector.ITwinObject parent, string readableTai myCHAR = @Connector.ConnectorAdapter.AdapterFactory.CreateCHAR(this, "myCHAR", "myCHAR"); myWCHAR = @Connector.ConnectorAdapter.AdapterFactory.CreateWCHAR(this, "myWCHAR", "myWCHAR"); mySTRING = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "mySTRING", "mySTRING"); - mySTRING.Capacity = 254; myWSTRING = @Connector.ConnectorAdapter.AdapterFactory.CreateWSTRING(this, "myWSTRING", "myWSTRING"); - myWSTRING.Capacity = 254; myMotor = new Motor(this, "myMotor", "myMotor"); parent.AddChild(this); parent.AddKid(this); diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/makereadonce.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/makereadonce.g.cs index 8b82476b6..893901e62 100644 --- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/makereadonce.g.cs +++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/makereadonce.g.cs @@ -28,10 +28,8 @@ public MembersWithMakeReadOnce(AXSharp.Connector.ITwinObject parent, string read HumanReadable = AXSharp.Connector.Connector.CreateHumanReadable(parent.HumanReadable, readableTail); PreConstruct(parent, readableTail, symbolTail); makeReadOnceMember = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "makeReadOnceMember", "makeReadOnceMember"); - makeReadOnceMember.Capacity = 254; makeReadOnceMember.MakeReadOnce(); someOtherMember = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "someOtherMember", "someOtherMember"); - someOtherMember.Capacity = 254; makeReadComplexMember = new makereadonce.ComplexMember(this, "makeReadComplexMember", "makeReadComplexMember"); makeReadComplexMember.MakeReadOnce(); someotherComplexMember = new makereadonce.ComplexMember(this, "someotherComplexMember", "someotherComplexMember"); @@ -301,9 +299,7 @@ public ComplexMember(AXSharp.Connector.ITwinObject parent, string readableTail, HumanReadable = AXSharp.Connector.Connector.CreateHumanReadable(parent.HumanReadable, readableTail); PreConstruct(parent, readableTail, symbolTail); someMember = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "someMember", "someMember"); - someMember.Capacity = 254; someOtherMember = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "someOtherMember", "someOtherMember"); - someOtherMember.Capacity = 254; parent.AddChild(this); parent.AddKid(this); PostConstruct(parent, readableTail, symbolTail); diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/makereadonly.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/makereadonly.g.cs index 6b5e3d763..13438aa72 100644 --- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/makereadonly.g.cs +++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/makereadonly.g.cs @@ -28,10 +28,8 @@ public MembersWithMakeReadOnly(AXSharp.Connector.ITwinObject parent, string read HumanReadable = AXSharp.Connector.Connector.CreateHumanReadable(parent.HumanReadable, readableTail); PreConstruct(parent, readableTail, symbolTail); makeReadOnceMember = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "makeReadOnceMember", "makeReadOnceMember"); - makeReadOnceMember.Capacity = 254; makeReadOnceMember.MakeReadOnly(); someOtherMember = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "someOtherMember", "someOtherMember"); - someOtherMember.Capacity = 254; makeReadComplexMember = new makereadonly.ComplexMember(this, "makeReadComplexMember", "makeReadComplexMember"); makeReadComplexMember.MakeReadOnly(); someotherComplexMember = new makereadonly.ComplexMember(this, "someotherComplexMember", "someotherComplexMember"); @@ -301,9 +299,7 @@ public ComplexMember(AXSharp.Connector.ITwinObject parent, string readableTail, HumanReadable = AXSharp.Connector.Connector.CreateHumanReadable(parent.HumanReadable, readableTail); PreConstruct(parent, readableTail, symbolTail); someMember = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "someMember", "someMember"); - someMember.Capacity = 254; someOtherMember = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "someOtherMember", "someOtherMember"); - someOtherMember.Capacity = 254; parent.AddChild(this); parent.AddKid(this); PostConstruct(parent, readableTail, symbolTail); diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/misc.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/misc.g.cs index e190b1017..bec932e89 100644 --- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/misc.g.cs +++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/misc.g.cs @@ -508,7 +508,6 @@ public SomeClass(AXSharp.Connector.ITwinObject parent, string readableTail, stri HumanReadable = AXSharp.Connector.Connector.CreateHumanReadable(parent.HumanReadable, readableTail); PreConstruct(parent, readableTail, symbolTail); SomeClassVariable = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "SomeClassVariable", "SomeClassVariable"); - SomeClassVariable.Capacity = 254; parent.AddChild(this); parent.AddKid(this); PostConstruct(parent, readableTail, symbolTail); @@ -1413,7 +1412,6 @@ public Complex(AXSharp.Connector.ITwinObject parent, string readableTail, string HumanReadable = AXSharp.Connector.Connector.CreateHumanReadable(parent.HumanReadable, readableTail); PreConstruct(parent, readableTail, symbolTail); HelloString = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "HelloString", "HelloString"); - HelloString.Capacity = 254; Id = @Connector.ConnectorAdapter.AdapterFactory.CreateULINT(this, "Id", "Id"); parent.AddChild(this); parent.AddKid(this); diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/types_with_name_attributes.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/types_with_name_attributes.g.cs index c7144d01f..7fbaae04e 100644 --- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/types_with_name_attributes.g.cs +++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/Onliners/types_with_name_attributes.g.cs @@ -471,7 +471,6 @@ public NoAccessModifierClass(AXSharp.Connector.ITwinObject parent, string readab HumanReadable = AXSharp.Connector.Connector.CreateHumanReadable(parent.HumanReadable, readableTail); PreConstruct(parent, readableTail, symbolTail); SomeClassVariable = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "SomeClassVariable", "SomeClassVariable"); - SomeClassVariable.Capacity = 254; parent.AddChild(this); parent.AddKid(this); PostConstruct(parent, readableTail, symbolTail); diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/class_all_primitives.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/class_all_primitives.g.cs index ef3950856..b8b47eef6 100644 --- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/class_all_primitives.g.cs +++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/.g/POCO/class_all_primitives.g.cs @@ -32,7 +32,5 @@ public class_all_primitives() public DateTime myDATE_AND_TIME { get; set; } = new DateTime(1970, 1, 1); public string mySTRING { get; set; } = string.Empty; public string myWSTRING { get; set; } = string.Empty; - public string mySTRING_25 { get; set; } = string.Empty; - public string myWSTRING_55 { get; set; } = string.Empty; } } \ No newline at end of file diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/units.csproj b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/units.csproj deleted file mode 100644 index 8a383de29..000000000 --- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/ax/units.csproj +++ /dev/null @@ -1,21 +0,0 @@ - - - net9.0;net8.0 - enable - enable - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/class_all_primitives.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/class_all_primitives.g.cs index a15f7ce5b..a6bd7f84b 100644 --- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/class_all_primitives.g.cs +++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/class_all_primitives.g.cs @@ -29,8 +29,6 @@ public partial class class_all_primitives : AXSharp.Connector.ITwinObject public OnlinerDateTime myDATE_AND_TIME { get; } public OnlinerString mySTRING { get; } public OnlinerWString myWSTRING { get; } - public OnlinerString mySTRING_25 { get; } - public OnlinerWString myWSTRING_55 { get; } partial void PreConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail); partial void PostConstruct(AXSharp.Connector.ITwinObject parent, string readableTail, string symbolTail); @@ -63,13 +61,7 @@ public class_all_primitives(AXSharp.Connector.ITwinObject parent, string readabl myTIME_OF_DAY = @Connector.ConnectorAdapter.AdapterFactory.CreateTIME_OF_DAY(this, "myTIME_OF_DAY", "myTIME_OF_DAY"); myDATE_AND_TIME = @Connector.ConnectorAdapter.AdapterFactory.CreateDATE_AND_TIME(this, "myDATE_AND_TIME", "myDATE_AND_TIME"); mySTRING = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "mySTRING", "mySTRING"); - mySTRING.Capacity = 254; myWSTRING = @Connector.ConnectorAdapter.AdapterFactory.CreateWSTRING(this, "myWSTRING", "myWSTRING"); - myWSTRING.Capacity = 254; - mySTRING_25 = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "mySTRING_25", "mySTRING_25"); - mySTRING_25.Capacity = 25; - myWSTRING_55 = @Connector.ConnectorAdapter.AdapterFactory.CreateWSTRING(this, "myWSTRING_55", "myWSTRING_55"); - myWSTRING_55.Capacity = 55; parent.AddChild(this); parent.AddKid(this); PostConstruct(parent, readableTail, symbolTail); @@ -106,8 +98,6 @@ public async virtual Task OnlineToPlain() plain.myDATE_AND_TIME = myDATE_AND_TIME.LastValue; plain.mySTRING = mySTRING.LastValue; plain.myWSTRING = myWSTRING.LastValue; - plain.mySTRING_25 = mySTRING_25.LastValue; - plain.myWSTRING_55 = myWSTRING_55.LastValue; return plain; } @@ -138,8 +128,6 @@ public async virtual Task OnlineToPlain() plain.myDATE_AND_TIME = myDATE_AND_TIME.LastValue; plain.mySTRING = mySTRING.LastValue; plain.myWSTRING = myWSTRING.LastValue; - plain.mySTRING_25 = mySTRING_25.LastValue; - plain.myWSTRING_55 = myWSTRING_55.LastValue; return plain; } @@ -169,8 +157,6 @@ public async virtual Task OnlineToPlain() plain.myDATE_AND_TIME = myDATE_AND_TIME.LastValue; plain.mySTRING = mySTRING.LastValue; plain.myWSTRING = myWSTRING.LastValue; - plain.mySTRING_25 = mySTRING_25.LastValue; - plain.myWSTRING_55 = myWSTRING_55.LastValue; return plain; } @@ -246,12 +232,6 @@ public async Task> PlainToOnlineAsync(global::Pocos. #pragma warning restore CS0612 #pragma warning disable CS0612 myWSTRING.LethargicWrite(plain.myWSTRING); -#pragma warning restore CS0612 -#pragma warning disable CS0612 - mySTRING_25.LethargicWrite(plain.mySTRING_25); -#pragma warning restore CS0612 -#pragma warning disable CS0612 - myWSTRING_55.LethargicWrite(plain.myWSTRING_55); #pragma warning restore CS0612 return await this.WriteAsync(); } @@ -325,12 +305,6 @@ public async Task _PlainToOnlineNoacAsync(global::Pocos.class_all_primitives pla #pragma warning restore CS0612 #pragma warning disable CS0612 myWSTRING.LethargicWrite(plain.myWSTRING); -#pragma warning restore CS0612 -#pragma warning disable CS0612 - mySTRING_25.LethargicWrite(plain.mySTRING_25); -#pragma warning restore CS0612 -#pragma warning disable CS0612 - myWSTRING_55.LethargicWrite(plain.myWSTRING_55); #pragma warning restore CS0612 } @@ -364,8 +338,6 @@ public async virtual Task ShadowToPlain() plain.myDATE_AND_TIME = myDATE_AND_TIME.Shadow; plain.mySTRING = mySTRING.Shadow; plain.myWSTRING = myWSTRING.Shadow; - plain.mySTRING_25 = mySTRING_25.Shadow; - plain.myWSTRING_55 = myWSTRING_55.Shadow; return plain; } @@ -393,8 +365,6 @@ public async virtual Task ShadowToPlain() plain.myDATE_AND_TIME = myDATE_AND_TIME.Shadow; plain.mySTRING = mySTRING.Shadow; plain.myWSTRING = myWSTRING.Shadow; - plain.mySTRING_25 = mySTRING_25.Shadow; - plain.myWSTRING_55 = myWSTRING_55.Shadow; return plain; } @@ -427,8 +397,6 @@ public async Task> PlainToShadowAsync(global::Pocos. myDATE_AND_TIME.Shadow = plain.myDATE_AND_TIME; mySTRING.Shadow = plain.mySTRING; myWSTRING.Shadow = plain.myWSTRING; - mySTRING_25.Shadow = plain.mySTRING_25; - myWSTRING_55.Shadow = plain.myWSTRING_55; return this.RetrievePrimitives(); } @@ -493,10 +461,6 @@ public async Task DetectsAnyChangeAsync(global::Pocos.class_all_primitives somethingChanged = true; if (plain.myWSTRING != myWSTRING.LastValue) somethingChanged = true; - if (plain.mySTRING_25 != mySTRING_25.LastValue) - somethingChanged = true; - if (plain.myWSTRING_55 != myWSTRING_55.LastValue) - somethingChanged = true; plain = latest; return somethingChanged; }); diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/class_extended_by_known_type.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/class_extended_by_known_type.g.cs index 03105924f..d6a63b53c 100644 --- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/class_extended_by_known_type.g.cs +++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/class_extended_by_known_type.g.cs @@ -156,7 +156,6 @@ public AbstractState(AXSharp.Connector.ITwinObject parent, string readableTail, PreConstruct(parent, readableTail, symbolTail); StateID = @Connector.ConnectorAdapter.AdapterFactory.CreateINT(this, "StateID", "StateID"); StateName = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "StateName", "StateName"); - StateName.Capacity = 254; parent.AddChild(this); parent.AddKid(this); PostConstruct(parent, readableTail, symbolTail); diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/class_with_primitive_members.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/class_with_primitive_members.g.cs index 7e6eafad3..ddbb9d537 100644 --- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/class_with_primitive_members.g.cs +++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/class_with_primitive_members.g.cs @@ -73,9 +73,7 @@ public ClassWithPrimitiveTypes(AXSharp.Connector.ITwinObject parent, string read myCHAR = @Connector.ConnectorAdapter.AdapterFactory.CreateCHAR(this, "myCHAR", "myCHAR"); myWCHAR = @Connector.ConnectorAdapter.AdapterFactory.CreateWCHAR(this, "myWCHAR", "myWCHAR"); mySTRING = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "mySTRING", "mySTRING"); - mySTRING.Capacity = 254; myWSTRING = @Connector.ConnectorAdapter.AdapterFactory.CreateWSTRING(this, "myWSTRING", "myWSTRING"); - myWSTRING.Capacity = 254; parent.AddChild(this); parent.AddKid(this); PostConstruct(parent, readableTail, symbolTail); diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/compileromitsattribute.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/compileromitsattribute.g.cs index 4e73de5e5..da7c3a821 100644 --- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/compileromitsattribute.g.cs +++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/compileromitsattribute.g.cs @@ -245,7 +245,6 @@ public Complex(AXSharp.Connector.ITwinObject parent, string readableTail, string HumanReadable = AXSharp.Connector.Connector.CreateHumanReadable(parent.HumanReadable, readableTail); PreConstruct(parent, readableTail, symbolTail); HelloString = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "HelloString", "HelloString"); - HelloString.Capacity = 254; Id = @Connector.ConnectorAdapter.AdapterFactory.CreateULINT(this, "Id", "Id"); parent.AddChild(this); parent.AddKid(this); @@ -961,7 +960,6 @@ public SomeClass(AXSharp.Connector.ITwinObject parent, string readableTail, stri HumanReadable = AXSharp.Connector.Connector.CreateHumanReadable(parent.HumanReadable, readableTail); PreConstruct(parent, readableTail, symbolTail); SomeClassVariable = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "SomeClassVariable", "SomeClassVariable"); - SomeClassVariable.Capacity = 254; parent.AddChild(this); parent.AddKid(this); PostConstruct(parent, readableTail, symbolTail); @@ -1866,7 +1864,6 @@ public Complex(AXSharp.Connector.ITwinObject parent, string readableTail, string HumanReadable = AXSharp.Connector.Connector.CreateHumanReadable(parent.HumanReadable, readableTail); PreConstruct(parent, readableTail, symbolTail); HelloString = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "HelloString", "HelloString"); - HelloString.Capacity = 254; Id = @Connector.ConnectorAdapter.AdapterFactory.CreateULINT(this, "Id", "Id"); parent.AddChild(this); parent.AddKid(this); diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/configuration.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/configuration.g.cs index d9d1b18a6..49aedcf27 100644 --- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/configuration.g.cs +++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/configuration.g.cs @@ -72,9 +72,7 @@ public ComplexForConfig(AXSharp.Connector.ITwinObject parent, string readableTai myCHAR = @Connector.ConnectorAdapter.AdapterFactory.CreateCHAR(this, "myCHAR", "myCHAR"); myWCHAR = @Connector.ConnectorAdapter.AdapterFactory.CreateWCHAR(this, "myWCHAR", "myWCHAR"); mySTRING = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "mySTRING", "mySTRING"); - mySTRING.Capacity = 254; myWSTRING = @Connector.ConnectorAdapter.AdapterFactory.CreateWSTRING(this, "myWSTRING", "myWSTRING"); - myWSTRING.Capacity = 254; myMotor = new Motor(this, "myMotor", "myMotor"); parent.AddChild(this); parent.AddKid(this); diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/makereadonce.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/makereadonce.g.cs index 8b82476b6..893901e62 100644 --- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/makereadonce.g.cs +++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/makereadonce.g.cs @@ -28,10 +28,8 @@ public MembersWithMakeReadOnce(AXSharp.Connector.ITwinObject parent, string read HumanReadable = AXSharp.Connector.Connector.CreateHumanReadable(parent.HumanReadable, readableTail); PreConstruct(parent, readableTail, symbolTail); makeReadOnceMember = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "makeReadOnceMember", "makeReadOnceMember"); - makeReadOnceMember.Capacity = 254; makeReadOnceMember.MakeReadOnce(); someOtherMember = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "someOtherMember", "someOtherMember"); - someOtherMember.Capacity = 254; makeReadComplexMember = new makereadonce.ComplexMember(this, "makeReadComplexMember", "makeReadComplexMember"); makeReadComplexMember.MakeReadOnce(); someotherComplexMember = new makereadonce.ComplexMember(this, "someotherComplexMember", "someotherComplexMember"); @@ -301,9 +299,7 @@ public ComplexMember(AXSharp.Connector.ITwinObject parent, string readableTail, HumanReadable = AXSharp.Connector.Connector.CreateHumanReadable(parent.HumanReadable, readableTail); PreConstruct(parent, readableTail, symbolTail); someMember = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "someMember", "someMember"); - someMember.Capacity = 254; someOtherMember = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "someOtherMember", "someOtherMember"); - someOtherMember.Capacity = 254; parent.AddChild(this); parent.AddKid(this); PostConstruct(parent, readableTail, symbolTail); diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/makereadonly.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/makereadonly.g.cs index 6b5e3d763..13438aa72 100644 --- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/makereadonly.g.cs +++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/makereadonly.g.cs @@ -28,10 +28,8 @@ public MembersWithMakeReadOnly(AXSharp.Connector.ITwinObject parent, string read HumanReadable = AXSharp.Connector.Connector.CreateHumanReadable(parent.HumanReadable, readableTail); PreConstruct(parent, readableTail, symbolTail); makeReadOnceMember = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "makeReadOnceMember", "makeReadOnceMember"); - makeReadOnceMember.Capacity = 254; makeReadOnceMember.MakeReadOnly(); someOtherMember = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "someOtherMember", "someOtherMember"); - someOtherMember.Capacity = 254; makeReadComplexMember = new makereadonly.ComplexMember(this, "makeReadComplexMember", "makeReadComplexMember"); makeReadComplexMember.MakeReadOnly(); someotherComplexMember = new makereadonly.ComplexMember(this, "someotherComplexMember", "someotherComplexMember"); @@ -301,9 +299,7 @@ public ComplexMember(AXSharp.Connector.ITwinObject parent, string readableTail, HumanReadable = AXSharp.Connector.Connector.CreateHumanReadable(parent.HumanReadable, readableTail); PreConstruct(parent, readableTail, symbolTail); someMember = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "someMember", "someMember"); - someMember.Capacity = 254; someOtherMember = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "someOtherMember", "someOtherMember"); - someOtherMember.Capacity = 254; parent.AddChild(this); parent.AddKid(this); PostConstruct(parent, readableTail, symbolTail); diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/misc.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/misc.g.cs index e190b1017..bec932e89 100644 --- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/misc.g.cs +++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/misc.g.cs @@ -508,7 +508,6 @@ public SomeClass(AXSharp.Connector.ITwinObject parent, string readableTail, stri HumanReadable = AXSharp.Connector.Connector.CreateHumanReadable(parent.HumanReadable, readableTail); PreConstruct(parent, readableTail, symbolTail); SomeClassVariable = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "SomeClassVariable", "SomeClassVariable"); - SomeClassVariable.Capacity = 254; parent.AddChild(this); parent.AddKid(this); PostConstruct(parent, readableTail, symbolTail); @@ -1413,7 +1412,6 @@ public Complex(AXSharp.Connector.ITwinObject parent, string readableTail, string HumanReadable = AXSharp.Connector.Connector.CreateHumanReadable(parent.HumanReadable, readableTail); PreConstruct(parent, readableTail, symbolTail); HelloString = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "HelloString", "HelloString"); - HelloString.Capacity = 254; Id = @Connector.ConnectorAdapter.AdapterFactory.CreateULINT(this, "Id", "Id"); parent.AddChild(this); parent.AddKid(this); diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/types_with_name_attributes.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/types_with_name_attributes.g.cs index c7144d01f..7fbaae04e 100644 --- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/types_with_name_attributes.g.cs +++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/Onliners/types_with_name_attributes.g.cs @@ -471,7 +471,6 @@ public NoAccessModifierClass(AXSharp.Connector.ITwinObject parent, string readab HumanReadable = AXSharp.Connector.Connector.CreateHumanReadable(parent.HumanReadable, readableTail); PreConstruct(parent, readableTail, symbolTail); SomeClassVariable = @Connector.ConnectorAdapter.AdapterFactory.CreateSTRING(this, "SomeClassVariable", "SomeClassVariable"); - SomeClassVariable.Capacity = 254; parent.AddChild(this); parent.AddKid(this); PostConstruct(parent, readableTail, symbolTail); diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/POCO/class_all_primitives.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/POCO/class_all_primitives.g.cs index 6fe0f8ba0..422a2a2d1 100644 --- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/POCO/class_all_primitives.g.cs +++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/.g/POCO/class_all_primitives.g.cs @@ -32,7 +32,5 @@ public class_all_primitives() public DateTime myDATE_AND_TIME { get; set; } = new DateTime(1990, 1, 1); public string mySTRING { get; set; } = string.Empty; public string myWSTRING { get; set; } = string.Empty; - public string mySTRING_25 { get; set; } = string.Empty; - public string myWSTRING_55 { get; set; } = string.Empty; } } \ No newline at end of file diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/units.csproj b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/units.csproj deleted file mode 100644 index 8a383de29..000000000 --- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/tia/units.csproj +++ /dev/null @@ -1,21 +0,0 @@ - - - net9.0;net8.0 - enable - enable - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/src/class_all_primitives.st b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/src/class_all_primitives.st index 66a9c4baf..d80e1a9e8 100644 --- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/src/class_all_primitives.st +++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/src/class_all_primitives.st @@ -28,7 +28,5 @@ CLASS class_all_primitives // myWCHAR : WCHAR ; mySTRING : STRING ; myWSTRING : WSTRING ; - mySTRING_25 : STRING[25] ; - myWSTRING_55 : WSTRING[55] ; END_VAR END_CLASS \ No newline at end of file diff --git a/src/AXSharp.connectors/src/AXSharp.Connector.S71500.WebAPI/BuiltInWrappers/WebApiString.cs b/src/AXSharp.connectors/src/AXSharp.Connector.S71500.WebAPI/BuiltInWrappers/WebApiString.cs index bcd7c5c45..87c748ded 100644 --- a/src/AXSharp.connectors/src/AXSharp.Connector.S71500.WebAPI/BuiltInWrappers/WebApiString.cs +++ b/src/AXSharp.connectors/src/AXSharp.Connector.S71500.WebAPI/BuiltInWrappers/WebApiString.cs @@ -40,7 +40,7 @@ public WebApiString(ITwinObject parent, ApiPlcReadRequest IWebApiPrimitive.PeekPlcReadRequestData => _plcReadRequestData ?? WebApiConnector.CreateReadRequest(Symbol, _webApiConnector.DBName); /// - ApiPlcWriteRequest IWebApiPrimitive.PeekPlcWriteRequestData => _plcWriteRequestData ?? WebApiConnector.CreateWriteRequest(Symbol, CyclicToWrite.Substring(0, this.Capacity - 1), _webApiConnector.DBName); + ApiPlcWriteRequest IWebApiPrimitive.PeekPlcWriteRequestData => _plcWriteRequestData ?? WebApiConnector.CreateWriteRequest(Symbol, CyclicToWrite, _webApiConnector.DBName); /// ApiPlcReadRequest IWebApiPrimitive.PlcReadRequestData @@ -78,6 +78,6 @@ public override async Task GetAsync() /// public override async Task SetAsync(string value) { - return await _webApiConnector.WriteAsync(this, value.Substring(0, this.Capacity - 1)); + return await _webApiConnector.WriteAsync(this, value); } } \ No newline at end of file diff --git a/src/AXSharp.connectors/src/AXSharp.Connector.S71500.WebAPI/BuiltInWrappers/WebApiWString.cs b/src/AXSharp.connectors/src/AXSharp.Connector.S71500.WebAPI/BuiltInWrappers/WebApiWString.cs index 3bf5ee8ae..df81f147f 100644 --- a/src/AXSharp.connectors/src/AXSharp.Connector.S71500.WebAPI/BuiltInWrappers/WebApiWString.cs +++ b/src/AXSharp.connectors/src/AXSharp.Connector.S71500.WebAPI/BuiltInWrappers/WebApiWString.cs @@ -40,7 +40,7 @@ public WebApiWString(ITwinObject parent, ApiPlcReadRequest IWebApiPrimitive.PeekPlcReadRequestData => _plcReadRequestData ?? WebApiConnector.CreateReadRequest(Symbol, _webApiConnector.DBName); /// - ApiPlcWriteRequest IWebApiPrimitive.PeekPlcWriteRequestData => _plcWriteRequestData ?? WebApiConnector.CreateWriteRequest(Symbol, CyclicToWrite.Substring(0, this.Capacity - 1), _webApiConnector.DBName); + ApiPlcWriteRequest IWebApiPrimitive.PeekPlcWriteRequestData => _plcWriteRequestData ?? WebApiConnector.CreateWriteRequest(Symbol, CyclicToWrite, _webApiConnector.DBName); /// ApiPlcReadRequest IWebApiPrimitive.PlcReadRequestData @@ -79,6 +79,6 @@ public override async Task GetAsync() /// public override async Task SetAsync(string value) { - return await _webApiConnector.WriteAsync(this, value.Substring(0, this.Capacity - 1)); + return await _webApiConnector.WriteAsync(this, value); } } \ No newline at end of file diff --git a/src/AXSharp.connectors/src/AXSharp.Connector/ValueTypes/Onlines/OnlinerString.cs b/src/AXSharp.connectors/src/AXSharp.Connector/ValueTypes/Onlines/OnlinerString.cs index 7b34229f6..09e33eb3c 100644 --- a/src/AXSharp.connectors/src/AXSharp.Connector/ValueTypes/Onlines/OnlinerString.cs +++ b/src/AXSharp.connectors/src/AXSharp.Connector/ValueTypes/Onlines/OnlinerString.cs @@ -93,10 +93,4 @@ public override async Task SetAsync(string value) return value; }); } - - /// - /// Gets or sets the capacity of the . - /// Or, the declared size of the string. - /// - public int Capacity { get; set; } } \ No newline at end of file diff --git a/src/AXSharp.connectors/src/AXSharp.Connector/ValueTypes/Onlines/OnlinerWString.cs b/src/AXSharp.connectors/src/AXSharp.Connector/ValueTypes/Onlines/OnlinerWString.cs index eab693421..95099f517 100644 --- a/src/AXSharp.connectors/src/AXSharp.Connector/ValueTypes/Onlines/OnlinerWString.cs +++ b/src/AXSharp.connectors/src/AXSharp.Connector/ValueTypes/Onlines/OnlinerWString.cs @@ -113,10 +113,4 @@ public override async Task SetAsync(string value) return value; }); } - - /// - /// Gets or sets the capacity of the . - /// Or, the declared size of the string. - /// - public int Capacity { get; set; } } \ No newline at end of file