249 строки
10 KiB
XML
249 строки
10 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"
|
|
>
|
|
<!-- A human readable but not necessarily unique name for the application instance -->
|
|
<ApplicationName>Opc.Ua.Client.SampleModule</ApplicationName>
|
|
|
|
<!-- A globally unique identifier for the application instance.
|
|
This is overridden with the value contained in the application certificate. -->
|
|
<ApplicationUri>urn:localhost:OPCFoundation:SampleModule</ApplicationUri>
|
|
|
|
<!-- A globally unique URI for the product (usually assigned by the product vendor) -->
|
|
<ProductUri>http://opcfoundation.org/UA/SampleModule/</ProductUri>
|
|
|
|
<!-- Indicates the type of application (Client, Server or ClientServer). -->
|
|
<ApplicationType>Client_1</ApplicationType>
|
|
|
|
<!-- Specifies security related configuration information -->
|
|
<SecurityConfiguration>
|
|
|
|
<!-- The location of the application instance certificate in the Windows certificate store -->
|
|
<ApplicationCertificate>
|
|
|
|
<!-- The type of store. -->
|
|
<StoreType>Directory</StoreType>
|
|
|
|
<!-- The location of the store.
|
|
Windows store must start with LocalMachine, CurrentUser or CurrentService
|
|
The name of the store is appended.
|
|
Note that the names used in code are difference from what appears in the control panel.
|
|
e.g. My == "Personal", Root == "Trusted Root Certification Authorities" -->
|
|
<StorePath>OPC Foundation/CertificateStores/MachineDefault</StorePath>
|
|
|
|
|
|
<!-- The subject for the certificate
|
|
Note that subject names are complex structures. The text that appears here is the CommonName component.
|
|
A complete distinguished would be something like: 'CN=Opc.Ua.Client.SampleModule, DC=MACHINENAME'
|
|
The first certificate found is used if multiple certificates with the same CommonName exist.
|
|
The Thumbprint should be specified if the CommonName does not uniquely identify a certificate. -->
|
|
<SubjectName>Opc.Ua.Client.SampleModule</SubjectName>
|
|
|
|
<!-- The SHA1 thumbprint for the certificate.
|
|
The thumbprint uniquely identifies a certificate.
|
|
It should be specified in this file, however, the samples rely on quick and
|
|
dirty scripts to create new certificate on each machine. A commerical application
|
|
would generate the initial certificate itself and update the thumbprint accordingly -->
|
|
<!--<Thumbprint>3a35fb798fc6dee8a7e7e4652b0e28fc14c6ee0f</Thumbprint>-->
|
|
|
|
</ApplicationCertificate>
|
|
|
|
<!-- The list of certification authorities.
|
|
|
|
Typical web browsing applications trust any certificate issued by a CA in the
|
|
"Trusted Root Certification Authorities" certificate store. However, this approach is
|
|
not appropriate for UA because Adminstrators have no control over the CAs that get
|
|
placed in that Root store to facilitate web browsing. This means Adminstrators must
|
|
specify a different store that is used only for UA related CAs and/or they must explicitly
|
|
specify the certificate for each trusted certification authority. -->
|
|
<TrustedIssuerCertificates>
|
|
<StoreType>Directory</StoreType>
|
|
<StorePath>OPC Foundation/CertificateStores/UA Certificate Authorities</StorePath>
|
|
</TrustedIssuerCertificates>
|
|
|
|
<!-- The list of trusted certificates.
|
|
|
|
Some UA applications will use self-signed certificates (certificates without a CA)
|
|
which means that every application which communicates with it must be configured to
|
|
trust it.
|
|
|
|
Adminstrators may designate a certificate store that contains trusted UA application
|
|
instance certificates (this store should not be the same as the store used for CAs
|
|
certificates). Alternately, Administrators may enter the certificates explicitly in
|
|
this list.
|
|
|
|
Note that entries in this list may either reference a certificate in the store or
|
|
may contained the entire certificate encoded as base64 data.
|
|
-->
|
|
<TrustedPeerCertificates>
|
|
<StoreType>Directory</StoreType>
|
|
<StorePath>OPC Foundation/CertificateStores/UA Applications</StorePath>
|
|
</TrustedPeerCertificates>
|
|
|
|
<!-- Applications exchange Nonces during the CreateSession. This value specifies the length. Must be >= 32 -->
|
|
<NonceLength>32</NonceLength>
|
|
|
|
<!-- The directory used to store invalid certficates for later review by the administrator. -->
|
|
<RejectedCertificateStore>
|
|
<StoreType>Directory</StoreType>
|
|
<StorePath>OPC Foundation/CertificateStores/RejectedCertificates</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>true</AutoAcceptUntrustedCertificates>
|
|
|
|
</SecurityConfiguration>
|
|
|
|
<TransportConfigurations></TransportConfigurations>
|
|
|
|
<!-- Specifies quotas used to by the transport layer -->
|
|
<TransportQuotas>
|
|
|
|
<!-- The default timeout in milliseconds for operations (used by clients) -->
|
|
<OperationTimeout>120000</OperationTimeout>
|
|
|
|
<!-- The maximum length for a string value in any message -->
|
|
<MaxStringLength>1048576</MaxStringLength>
|
|
|
|
<!-- The maximum length for a byte string value in any message -->
|
|
<MaxByteStringLength>4194304</MaxByteStringLength>
|
|
|
|
<!-- The maximum length for any array in a message.
|
|
Note that some protocols do not distinguish between bytes and arrays.
|
|
In these cases the binding will choose the larger of
|
|
MaxByteStringLength or MaxArrayLength-->
|
|
<MaxArrayLength>65535</MaxArrayLength>
|
|
|
|
<!-- The maximum size of any message -->
|
|
<MaxMessageSize>4194304</MaxMessageSize>
|
|
|
|
<!-- The maximum buffer size
|
|
This value controls how big a block of memory the transport layer allocates.
|
|
Setting this value to a large value will reduce performance and use a lot of RAM -->
|
|
<MaxBufferSize>65535</MaxBufferSize>
|
|
|
|
<!-- The lifetime of a SecureChannel in milliseconds.
|
|
This specifies how long the server will keep a broken channel around while waiting
|
|
for a client to reconnect.
|
|
Not used by HTTP or .NET TCP bindings -->
|
|
<ChannelLifetime>300000</ChannelLifetime>
|
|
|
|
<!-- The lifetime of a SecurityToken in milliseconds.
|
|
This specifies how long a security token can be used without renewal. -->
|
|
<SecurityTokenLifetime>3600000</SecurityTokenLifetime>
|
|
|
|
</TransportQuotas>
|
|
|
|
<!-- This element only needs to be specified for Server or ClientServer applications -->
|
|
<ServerConfiguration/>
|
|
|
|
<!-- 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>
|
|
<ua:String>http://{0}:52601/UADiscovery</ua:String>
|
|
<ua:String>http://{0}/UADiscovery/Default.svc</ua:String>
|
|
</WellKnownDiscoveryUrls>
|
|
|
|
<!-- EndpointDescriptions for system wide discovery servers -->
|
|
<DiscoveryServers></DiscoveryServers>
|
|
|
|
<!-- The file used to save the EndpointDescriptions for servers known to the Client -->
|
|
<EndpointCacheFilePath>Opc.Ua.Client.SampleModule.Endpoints.xml</EndpointCacheFilePath>
|
|
|
|
<!-- 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>
|
|
|
|
<Extensions>
|
|
<ua:XmlElement>
|
|
<ListOfPublishedNodes xmlns="http://opcfoundation.org/UA/SDK/Configuration.xsd">
|
|
<NodeLookup>
|
|
<ua:EndpointUrl>opc.tcp://TODO:Add uri here</ua:EndpointUrl>
|
|
<ua:NodeId>
|
|
<!-- Current Server Time -->
|
|
<ua:Identifier>i=2258</ua:Identifier>
|
|
</ua:NodeId>
|
|
</NodeLookup>
|
|
<NodeLookup>
|
|
<ua:EndpointUrl>opc.tcp://TODO:Add another uri here</ua:EndpointUrl>
|
|
<ua:NodeId>
|
|
<!-- Current Server Time -->
|
|
<ua:Identifier>i=2258</ua:Identifier>
|
|
</ua:NodeId>
|
|
</NodeLookup>
|
|
</ListOfPublishedNodes>
|
|
</ua:XmlElement>
|
|
</Extensions>
|
|
|
|
<!--
|
|
Masks supported by the trace feature.
|
|
Servers will detect changes within 5 seconds.
|
|
|
|
Do not output any messages.
|
|
None = 0x0;
|
|
|
|
Output error messages.
|
|
Error = 0x1;
|
|
|
|
Output informational messages.
|
|
Information = 0x2;
|
|
|
|
Output stack traces.
|
|
StackTrace = 0x4;
|
|
|
|
Output basic messages for service calls.
|
|
Service = 0x8;
|
|
|
|
Output detailed messages for service calls.
|
|
ServiceDetail = 0x10;
|
|
|
|
Output basic messages for each operation.
|
|
Operation = 0x20;
|
|
|
|
Output detailed messages for each operation.
|
|
OperationDetail = 0x40;
|
|
|
|
Output messages related to application initialization or shutdown
|
|
StartStop = 0x80;
|
|
|
|
Output messages related to a call to an external system.
|
|
ExternalSystem = 0x100;
|
|
|
|
Output messages related to security
|
|
Security = 0x200;
|
|
-->
|
|
|
|
<TraceConfiguration>
|
|
<OutputFilePath>Logs/Opc.Ua.Client.SampleModule.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>
|
|
|
|
<!-- Enables the hi-res clock for the process to allows for shorter (<100ms) publishing and sampling intervals. -->
|
|
<!-- QueryPerformanceCounter does not work on all multi-core machines so enabling the hi-res clock by default is not recommended. -->
|
|
<DisableHiResClock>true</DisableHiResClock>
|
|
|
|
</ApplicationConfiguration> |