generated from wazzamatazz/csharp-repo-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from wazzamatazz/initial-implementation
Initial implementation
- Loading branch information
Showing
22 changed files
with
3,812 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,16 @@ | ||
<Project> | ||
|
||
<PropertyGroup> | ||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> | ||
<EnablePackageVersionOverride>false</EnablePackageVersionOverride> | ||
<NoWarn>NU1507;$(NoWarn)</NoWarn> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.NET.Test.SDK" Version="17.9.0" /> | ||
<PackageVersion Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" /> | ||
<PackageVersion Include="MSTest.TestAdapter" Version="3.3.1" /> | ||
<PackageVersion Include="MSTest.TestFramework" Version="3.3.1" /> | ||
<PackageVersion Include="System.Text.Json" Version="8.0.4" /> | ||
<PackageVersion Include="Workstation.UaClient" Version="3.2.3" /> | ||
</ItemGroup> | ||
|
||
</Project> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,5 @@ | |
"Major": 0, | ||
"Minor": 1, | ||
"Patch": 0, | ||
"PreRelease": "alpha" | ||
"PreRelease": "" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\src\Jaahas.OpcUa.JsonEncoding\Jaahas.OpcUa.JsonEncoding.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System.Text; | ||
|
||
using Jaahas.OpcUa.JsonEncoding; | ||
|
||
using Workstation.ServiceModel.Ua; | ||
|
||
using var ms = new MemoryStream(); | ||
|
||
var provider = new JsonEncodingProvider(new JsonEncoderOptions() { | ||
UseReversibleEncoding = false, | ||
WriteIndented = true | ||
}); | ||
|
||
using (var encoder = provider.CreateEncoder(ms, context: null, keepStreamOpen: true)) { | ||
encoder.WriteRequest(new ReadRequest() { | ||
MaxAge = 1000, | ||
NodesToRead = [ | ||
new ReadValueId() { | ||
NodeId = NodeId.Parse("ns=2;s=Demo.Static.Scalar.UInt32"), | ||
AttributeId = AttributeIds.Value | ||
}, | ||
new ReadValueId() { | ||
NodeId = NodeId.Parse("ns=2;s=Demo.Static.Scalar.String"), | ||
AttributeId = AttributeIds.Value | ||
} | ||
], | ||
TimestampsToReturn = TimestampsToReturn.Both, | ||
RequestHeader = new RequestHeader() { | ||
AuditEntryId = "Test", | ||
RequestHandle = 42 | ||
} | ||
}); | ||
} | ||
|
||
Console.WriteLine(Encoding.UTF8.GetString(ms.ToArray())); |
51 changes: 51 additions & 0 deletions
51
src/Jaahas.OpcUa.JsonEncoding/Jaahas.OpcUa.JsonEncoding.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFrameworks>netstandard2.1;netstandard2.0</TargetFrameworks> | ||
<LangVersion>10.0</LangVersion> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<NeutralLanguage>en</NeutralLanguage> | ||
<Description>OPC UA JSON encoder and decoder for Workstation.UaClient</Description> | ||
<GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
<PackageReadmeFile>README.md</PackageReadmeFile> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="System.Text.Json" /> | ||
<PackageReference Include="Workstation.UaClient" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<None Update="StatusCodeExtensions.tt"> | ||
<Generator>TextTemplatingFileGenerator</Generator> | ||
<LastGenOutput>StatusCodeExtensions.generated.cs</LastGenOutput> | ||
</None> | ||
<Compile Update="StatusCodeExtensions.generated.cs"> | ||
<DesignTime>True</DesignTime> | ||
<AutoGen>True</AutoGen> | ||
<DependentUpon>StatusCodeExtensions.tt</DependentUpon> | ||
</Compile> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Compile Update="Resources.Designer.cs"> | ||
<DesignTime>True</DesignTime> | ||
<AutoGen>True</AutoGen> | ||
<DependentUpon>Resources.resx</DependentUpon> | ||
</Compile> | ||
<EmbeddedResource Update="Resources.resx"> | ||
<Generator>ResXFileCodeGenerator</Generator> | ||
<LastGenOutput>Resources.Designer.cs</LastGenOutput> | ||
</EmbeddedResource> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<None Include="PACKAGE_README.md" Pack="true" PackagePath="README.md" /> | ||
</ItemGroup> | ||
|
||
</Project> |
Oops, something went wrong.