File tree Expand file tree Collapse file tree 5 files changed +42
-7
lines changed
Opc.Ua.Server/Diagnostics Expand file tree Collapse file tree 5 files changed +42
-7
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,12 @@ public ApplicationConfigurationBuilder(ApplicationInstance applicationInstance)
6666
6767 #region Public Methods
6868 /// <inheritdoc/>
69+ public IApplicationConfigurationBuilderGlobalConfiguration SetHiResClockDisabled ( bool disableHiResClock )
70+ {
71+ ApplicationConfiguration . DisableHiResClock = disableHiResClock ;
72+ return this ;
73+ }
74+ /// <inheritdoc/>
6975 public IApplicationConfigurationBuilderClientSelected AsClient ( )
7076 {
7177 switch ( ApplicationInstance . ApplicationType )
@@ -137,7 +143,7 @@ public IApplicationConfigurationBuilderSecurityOptions AddSecurityConfiguration(
137143 StorePath = DefaultCertificateStorePath ( TrustlistType . IssuerUser , pkiRoot )
138144 } ,
139145 // rejected store
140- RejectedCertificateStore = new CertificateTrustList ( ) {
146+ RejectedCertificateStore = new CertificateStoreIdentifier ( ) {
141147 StoreType = rejectedRootType ,
142148 StorePath = DefaultCertificateStorePath ( TrustlistType . Rejected , rejectedRoot )
143149 } ,
@@ -178,7 +184,7 @@ public IApplicationConfigurationBuilderSecurityOptionStores AddSecurityConfigura
178184 StorePath = DefaultCertificateStorePath ( TrustlistType . Issuer , issuerRoot )
179185 } ,
180186 // rejected store
181- RejectedCertificateStore = new CertificateTrustList ( ) {
187+ RejectedCertificateStore = new CertificateStoreIdentifier ( ) {
182188 StoreType = rejectedRootType ,
183189 StorePath = DefaultCertificateStorePath ( TrustlistType . Rejected , rejectedRoot )
184190 } ,
Original file line number Diff line number Diff line change @@ -450,6 +450,7 @@ string issuerRoot
450450 /// Add security options to the configuration.
451451 /// </summary>
452452 public interface IApplicationConfigurationBuilderSecurityOptions :
453+ IApplicationConfigurationBuilderGlobalConfiguration ,
453454 IApplicationConfigurationBuilderTraceConfiguration ,
454455 IApplicationConfigurationBuilderExtension ,
455456 IApplicationConfigurationBuilderCreate
@@ -542,6 +543,20 @@ public interface IApplicationConfigurationBuilderExtension :
542543 IApplicationConfigurationBuilderExtension AddExtension < T > ( XmlQualifiedName elementName , object value ) ;
543544 }
544545
546+ /// <summary>
547+ /// Add some global configuration settings.
548+ /// </summary>
549+ public interface IApplicationConfigurationBuilderGlobalConfiguration :
550+ IApplicationConfigurationBuilderCreate ,
551+ IApplicationConfigurationBuilderTraceConfiguration
552+ {
553+ /// <summary>
554+ /// Set the high resolution clock to disabled or enabled.
555+ /// </summary>
556+ /// <param name="hiResClockDisabled"><value><c>true</c> if high resolution clock is disabled; otherwise, <c>false</c>.</value></param>
557+ IApplicationConfigurationBuilderGlobalConfiguration SetHiResClockDisabled ( bool hiResClockDisabled ) ;
558+ }
559+
545560 /// <summary>
546561 /// Add the trace configuration.
547562 /// </summary>
Original file line number Diff line number Diff line change @@ -2977,16 +2977,16 @@ protected virtual ServiceResult Call(
29772977 List < ServiceResult > argumentErrors = new List < ServiceResult > ( ) ;
29782978 VariantCollection outputArguments = new VariantCollection ( ) ;
29792979
2980- ServiceResult error = method . Call (
2980+ ServiceResult callResult = method . Call (
29812981 context ,
29822982 methodToCall . ObjectId ,
29832983 methodToCall . InputArguments ,
29842984 argumentErrors ,
29852985 outputArguments ) ;
29862986
2987- if ( ServiceResult . IsBad ( error ) )
2987+ if ( ServiceResult . IsBad ( callResult ) )
29882988 {
2989- return error ;
2989+ return callResult ;
29902990 }
29912991
29922992 // check for argument errors.
@@ -3041,7 +3041,8 @@ protected virtual ServiceResult Call(
30413041 // return output arguments.
30423042 result . OutputArguments = outputArguments ;
30433043
3044- return ServiceResult . Good ;
3044+ // return the actual result of the original call
3045+ return callResult ;
30453046 }
30463047
30473048
Original file line number Diff line number Diff line change @@ -706,7 +706,7 @@ public virtual ServiceResult Call(
706706 }
707707
708708 // copy out arguments.
709- if ( ServiceResult . IsGood ( result ) )
709+ if ( ServiceResult . IsGoodOrUncertain ( result ) )
710710 {
711711 for ( int ii = 0 ; ii < outputs . Count ; ii ++ )
712712 {
Original file line number Diff line number Diff line change @@ -524,6 +524,19 @@ public static bool IsUncertain(ServiceResult status)
524524 return false ;
525525 }
526526
527+ /// <summary>
528+ /// Returns true if the status code is good or uncertain.
529+ /// </summary>
530+ public static bool IsGoodOrUncertain ( ServiceResult status )
531+ {
532+ if ( status != null )
533+ {
534+ return StatusCode . IsGood ( status . m_code ) || StatusCode . IsUncertain ( status . m_code ) ;
535+ }
536+
537+ return false ;
538+ }
539+
527540 /// <summary>
528541 /// Returns true if the status is good or uncertain.
529542 /// </summary>
You can’t perform that action at this time.
0 commit comments