mirror of
https://github.com/OPCFoundation/UA-.NETStandard.git
synced 2026-10-21 17:16:16 +08:00
39dca2c103
Adds a complex type system client library extension for custom enumerations and structure types based on a server dictionary or DataTypeDefinition using emitted classes at runtime.
- Custom types are added to the session factory, not to the global factory. Types are loaded when the session connects by adding
` var complexTypeSystem = new ComplexTypeSystem(session);
await complexTypeSystem.Load();
`
- Custom type properties can be accessed with an accessor [propertyname] or [index]. Direct access through the properties is possible, but some cases do not update the optional or union flags correctly.
- Support includes V1.03 dictionaries and V1.04 DataTypeDefinitions (--> known issues).
- NetCoreComplexClient can be used for quick testing servers. It prints out all custom types with content and subscribes to all. Also includes sample how to write back complex type variables and how to output JSON.
- The UA Sample Client and the Quickstart Data Type client can be used for testing with UI. Many issues were adressed to be able to read and write complex types, however some support is limited, e.g. only editing simple fields is currently working (help wanted).
- Caveat: The complex type libaries for .Net Core must be built for .netcoreapp, so it needs a seperate nuget package for the complex type client extension.
- Support for a factory type builder class to allow to plugin other type builder methods (e.g. Codedom etc...)
- Added JSON test case and include the complex types client in the testing shell script, so the complex types lib is tested on mac/linux too.
- Few fixes in the JSON encoder.
Finding enough servers with custom types is an issue, so if you find servers with unsupported custom types please provide feedback.
Known limitations:
- Only V1.03 OPC binary dictionaries are supported (no XML Schema dictionaries).
- V1.03 dictionary structure definitions are only supported if they can be mapped to a V1.04 DataTypeDefinition. Nested types and cross dictionary refs should work.
- OptionSet is only partially implemented. Only shows the byte arrays, not the flags.
- Opaque Types in dictionaries are ignored.
99 lines
4.1 KiB
XML
99 lines
4.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<ApplicationConfiguration
|
|
xmlns:ua="http://opcfoundation.org/UA/2008/02/Types.xsd"
|
|
xmlns="http://opcfoundation.org/UA/SDK/Configuration.xsd"
|
|
schemaLocation="./Schema/ApplicationConfiguration.xsd"
|
|
>
|
|
<ApplicationName>UA Core Complex Client</ApplicationName>
|
|
<ApplicationUri>urn:localhost:OPCFoundation:CoreComplexClient</ApplicationUri>
|
|
<ProductUri>http://opcfoundation.org/UA/CoreComplexClient</ProductUri>
|
|
<ApplicationType>Client_1</ApplicationType>
|
|
|
|
<SecurityConfiguration>
|
|
|
|
<!-- Where the application instance certificate is stored (MachineDefault) -->
|
|
<ApplicationCertificate>
|
|
<StoreType>X509Store</StoreType>
|
|
<StorePath>CurrentUser\My</StorePath>
|
|
<SubjectName>CN=UA Core Complex Client, C=US, S=Arizona, O=OPC Foundation, DC=localhost</SubjectName>
|
|
</ApplicationCertificate>
|
|
|
|
<!-- Where the issuer certificate are stored (certificate authorities) -->
|
|
<TrustedIssuerCertificates>
|
|
<StoreType>Directory</StoreType>
|
|
<StorePath>%LocalApplicationData%/OPC Foundation/pki/issuer</StorePath>
|
|
</TrustedIssuerCertificates>
|
|
|
|
<!-- Where the trust list is stored (UA Applications) -->
|
|
<TrustedPeerCertificates>
|
|
<StoreType>Directory</StoreType>
|
|
<StorePath>%LocalApplicationData%/OPC Foundation/pki/trusted</StorePath>
|
|
</TrustedPeerCertificates>
|
|
|
|
<!-- The directory used to store invalid certficates for later review by the administrator. -->
|
|
<RejectedCertificateStore>
|
|
<StoreType>Directory</StoreType>
|
|
<StorePath>%LocalApplicationData%/OPC Foundation/pki/rejected</StorePath>
|
|
</RejectedCertificateStore>
|
|
|
|
<!-- WARNING: The following setting (to automatically accept untrusted certificates) should be used
|
|
for easy debugging purposes ONLY and turned off for production deployments! -->
|
|
<AutoAcceptUntrustedCertificates>false</AutoAcceptUntrustedCertificates>
|
|
|
|
</SecurityConfiguration>
|
|
|
|
<TransportConfigurations/>
|
|
|
|
<TransportQuotas>
|
|
<OperationTimeout>600000</OperationTimeout>
|
|
<MaxStringLength>1048576</MaxStringLength>
|
|
<MaxByteStringLength>4194304</MaxByteStringLength>
|
|
<MaxArrayLength>65535</MaxArrayLength>
|
|
<MaxMessageSize>4194304</MaxMessageSize>
|
|
<MaxBufferSize>65535</MaxBufferSize>
|
|
<ChannelLifetime>300000</ChannelLifetime>
|
|
<SecurityTokenLifetime>3600000</SecurityTokenLifetime>
|
|
</TransportQuotas>
|
|
|
|
<!-- This element is only required for Client and ClientServer applications -->
|
|
<ClientConfiguration>
|
|
|
|
<!-- The default timeout for new sessions -->
|
|
<DefaultSessionTimeout>600000</DefaultSessionTimeout>
|
|
|
|
<!-- The well-known URLs for the local discovery servers
|
|
URLs are tested in the order they appear in this list. -->
|
|
<WellKnownDiscoveryUrls>
|
|
<ua:String>opc.tcp://{0}:4840/UADiscovery</ua:String>
|
|
</WellKnownDiscoveryUrls>
|
|
|
|
<!-- EndpointDescriptions for system wide discovery servers -->
|
|
<DiscoveryServers></DiscoveryServers>
|
|
|
|
<!-- The minimum subscription lifetime.
|
|
This ensures subscriptions are not set to expire too quickly. The requesed lifetime count
|
|
and keep alive count are calculated using this value and the request publishing interval -->
|
|
<MinSubscriptionLifetime>10000</MinSubscriptionLifetime>
|
|
</ClientConfiguration>
|
|
|
|
<TraceConfiguration>
|
|
<OutputFilePath>%LocalApplicationData%/Logs/Opc.Ua.CoreComplexClient.log.txt</OutputFilePath>
|
|
<DeleteOnLoad>true</DeleteOnLoad>
|
|
<!-- Show Only Errors -->
|
|
<!-- <TraceMasks>1</TraceMasks> -->
|
|
<!-- Show Only Security and Errors -->
|
|
<!-- <TraceMasks>513</TraceMasks> -->
|
|
<!-- Show Only Security, Errors and Trace -->
|
|
<!-- <TraceMasks>515</TraceMasks> -->
|
|
<!-- Show Only Security, COM Calls, Errors and Trace -->
|
|
<!-- <TraceMasks>771</TraceMasks> -->
|
|
<!-- Show Only Security, Service Calls, Errors and Trace -->
|
|
<!-- <TraceMasks>523</TraceMasks> -->
|
|
<!-- Show Only Security, ServiceResultExceptions, Errors and Trace -->
|
|
<!-- <TraceMasks>519</TraceMasks> -->
|
|
</TraceConfiguration>
|
|
|
|
<!-- Disables the hi-res clock if the QueryPerformanceCounter does work on a particular machine. -->
|
|
<DisableHiResClock>true</DisableHiResClock>
|
|
|
|
</ApplicationConfiguration> |