├── .gitignore ├── .gitmodules ├── AggregateTester.sln ├── AggregateTester ├── Aggregate Tester.csproj ├── Aggregate Tester.csproj.user ├── Aggregates │ ├── AggregateCalculator.cs │ ├── Aggregators.cs │ ├── AverageAggregateCalculator.cs │ ├── CountAggregateCalculator.cs │ ├── IAggregateCalculator.cs │ ├── MinMaxAggregateCalculator.cs │ ├── ServerAggregateFilter.cs │ ├── StartEndAggregateCalculator.cs │ ├── StatusAggregateCalculator.cs │ └── StdDevAggregateCalculator.cs ├── App.ico ├── ClientUtils.cs ├── DefaultData.xml ├── ExceptionDlg.Designer.cs ├── ExceptionDlg.cs ├── ExceptionDlg.resx ├── MainForm.Designer.cs ├── MainForm.cs ├── MainForm.resx ├── Program.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── TestData.cs ├── TestData.xml ├── TestData.xsd ├── TestDataHelpers.cs └── app.config ├── CertificateGenerator Solution.sln ├── CertificateGenerator ├── Application.cpp ├── Application.h ├── BuildVersion.h ├── CommandLineArgs.cpp ├── CommandLineArgs.h ├── Main.cpp ├── ReadMe.txt ├── Resource.rc ├── StatusCodeException.h ├── UA Certificate Generator.vcproj ├── UA Certificate Generator.vcxproj ├── UA Certificate Generator.vcxproj.filters ├── Version.h ├── core │ ├── opcua.h │ ├── opcua_base64.c │ ├── opcua_base64.h │ ├── opcua_buffer.c │ ├── opcua_buffer.h │ ├── opcua_config.h │ ├── opcua_core.c │ ├── opcua_core.h │ ├── opcua_core.vcproj │ ├── opcua_core.vcxproj │ ├── opcua_core.vcxproj.filters │ ├── opcua_cryptofactory.h │ ├── opcua_datetime.c │ ├── opcua_datetime.h │ ├── opcua_errorhandling.h │ ├── opcua_exclusions.h │ ├── opcua_guid.c │ ├── opcua_guid.h │ ├── opcua_list.c │ ├── opcua_list.h │ ├── opcua_memory.c │ ├── opcua_memory.h │ ├── opcua_memorystream.c │ ├── opcua_memorystream.h │ ├── opcua_mutex.h │ ├── opcua_pkifactory.h │ ├── opcua_platformdefs.h │ ├── opcua_proxystub.c │ ├── opcua_proxystub.h │ ├── opcua_semaphore.h │ ├── opcua_socket.h │ ├── opcua_stackstatuscodes.h │ ├── opcua_statuscodes.h │ ├── opcua_string.c │ ├── opcua_string.h │ ├── opcua_thread.c │ ├── opcua_thread.h │ ├── opcua_threadpool.c │ ├── opcua_threadpool.h │ ├── opcua_timer.c │ ├── opcua_timer.h │ ├── opcua_trace.c │ ├── opcua_trace.h │ ├── opcua_utilities.c │ ├── opcua_utilities.h │ ├── opcua_xmldefs.h │ ├── opcua_xmlreader.c │ ├── opcua_xmlreader.h │ ├── opcua_xmlwriter.c │ └── opcua_xmlwriter.h ├── opcua_certficates.cpp ├── opcua_certificates.h ├── platforms │ └── win32 │ │ ├── UA AnsiC Win32 Platform Layer (VC8).sln │ │ ├── UA AnsiC Win32 Platform Layer DLL.c │ │ ├── UA AnsiC Win32 Platform Layer DLL.def │ │ ├── UA AnsiC Win32 Platform Layer DLL.h │ │ ├── UA AnsiC Win32 Platform Layer.sln │ │ ├── UA AnsiC Win32 Platform Layer.vcproj │ │ ├── UA AnsiC Win32 Platform Layer.vcxproj │ │ ├── UA AnsiC Win32 Platform Layer.vcxproj.filters │ │ ├── UA AnsiC Win32 Platform Layer.vcxproj.user │ │ ├── opcua_p_binary.c │ │ ├── opcua_p_binary.h │ │ ├── opcua_p_compilerinfo.h │ │ ├── opcua_p_crypto.h │ │ ├── opcua_p_cryptofactory.c │ │ ├── opcua_p_cryptofactory.h │ │ ├── opcua_p_datetime.c │ │ ├── opcua_p_datetime.h │ │ ├── opcua_p_guid.c │ │ ├── opcua_p_guid.h │ │ ├── opcua_p_interface.c │ │ ├── opcua_p_interface.h │ │ ├── opcua_p_internal.c │ │ ├── opcua_p_internal.h │ │ ├── opcua_p_libxml2.c │ │ ├── opcua_p_libxml2.h │ │ ├── opcua_p_libxml2_xmlreader.c │ │ ├── opcua_p_libxml2_xmlwriter.c │ │ ├── opcua_p_memory.c │ │ ├── opcua_p_memory.h │ │ ├── opcua_p_mutex.c │ │ ├── opcua_p_mutex.h │ │ ├── opcua_p_openssl.c │ │ ├── opcua_p_openssl.h │ │ ├── opcua_p_openssl_3des.c │ │ ├── opcua_p_openssl_aes.c │ │ ├── opcua_p_openssl_ecdsa.c │ │ ├── opcua_p_openssl_ed25519.c │ │ ├── opcua_p_openssl_ed448.c │ │ ├── opcua_p_openssl_hmac_sha.c │ │ ├── opcua_p_openssl_pki.c │ │ ├── opcua_p_openssl_pki.h │ │ ├── opcua_p_openssl_random.c │ │ ├── opcua_p_openssl_rsa.c │ │ ├── opcua_p_openssl_sha.c │ │ ├── opcua_p_openssl_x509.c │ │ ├── opcua_p_pki.h │ │ ├── opcua_p_pki_nosecurity.c │ │ ├── opcua_p_pki_nosecurity.h │ │ ├── opcua_p_pkifactory.c │ │ ├── opcua_p_pkifactory.h │ │ ├── opcua_p_securitypolicy_none.c │ │ ├── opcua_p_securitypolicy_none.h │ │ ├── opcua_p_semaphore.c │ │ ├── opcua_p_semaphore.h │ │ ├── opcua_p_socket.c │ │ ├── opcua_p_socket.h │ │ ├── opcua_p_socket_interface.c │ │ ├── opcua_p_socket_interface.h │ │ ├── opcua_p_socket_internal.c │ │ ├── opcua_p_socket_internal.h │ │ ├── opcua_p_string.c │ │ ├── opcua_p_string.h │ │ ├── opcua_p_thread.c │ │ ├── opcua_p_thread.h │ │ ├── opcua_p_timer.c │ │ ├── opcua_p_timer.h │ │ ├── opcua_p_trace.c │ │ ├── opcua_p_trace.h │ │ ├── opcua_p_types.h │ │ ├── opcua_p_utilities.c │ │ ├── opcua_p_utilities.h │ │ ├── opcua_p_win32_pki.c │ │ ├── opcua_p_win32_pki.h │ │ ├── opcua_p_wincrypt.h │ │ ├── opcua_p_wincrypt_random.c │ │ └── opcua_platformdefs.h ├── resource.h ├── stackcore │ ├── opcua_attributes.h │ ├── opcua_binarydecoder.c │ ├── opcua_binaryencoder.c │ ├── opcua_binaryencoder.h │ ├── opcua_binaryencoderinternal.h │ ├── opcua_browsenames.h │ ├── opcua_builtintypes.c │ ├── opcua_builtintypes.h │ ├── opcua_connection.c │ ├── opcua_connection.h │ ├── opcua_credentials.h │ ├── opcua_crypto.c │ ├── opcua_crypto.h │ ├── opcua_decoder.c │ ├── opcua_decoder.h │ ├── opcua_encodeableobject.c │ ├── opcua_encodeableobject.h │ ├── opcua_encoder.c │ ├── opcua_encoder.h │ ├── opcua_enumeratedtype.c │ ├── opcua_enumeratedtype.h │ ├── opcua_extensionobject.c │ ├── opcua_extensionobject.h │ ├── opcua_identifiers.h │ ├── opcua_listener.c │ ├── opcua_listener.h │ ├── opcua_messagecontext.c │ ├── opcua_messagecontext.h │ ├── opcua_pki.c │ ├── opcua_pki.h │ ├── opcua_securechannel.c │ ├── opcua_securechannel.h │ ├── opcua_stackcore.vcproj │ ├── opcua_stackcore.vcxproj │ ├── opcua_stackcore.vcxproj.filters │ ├── opcua_stackcore.vcxproj.user │ ├── opcua_stream.c │ ├── opcua_stream.h │ ├── opcua_stringtable.c │ ├── opcua_stringtable.h │ ├── opcua_types.c │ └── opcua_types.h ├── targetver.h └── utils.cpp ├── README.md ├── Stack └── Core │ ├── Properties │ ├── AssemblyInfo.cs │ └── AssemblyVersionInfo.cs │ ├── Schema │ ├── ApplicationConfiguration.cs │ ├── ApplicationConfiguration.xsd │ ├── AttributeIds.csv │ ├── BuildSchema.bat │ ├── NodeIds.csv │ ├── Opc.Ua.Endpoints.wsdl │ ├── Opc.Ua.NodeSet.xml │ ├── Opc.Ua.NodeSet2.xml │ ├── Opc.Ua.Services.wsdl │ ├── Opc.Ua.StatusCodes.csv │ ├── Opc.Ua.Types.bsd │ ├── Opc.Ua.Types.xsd │ ├── SecuredApplication.cs │ ├── SecuredApplication.xsd │ ├── SecuredApplicationHelpers.cs │ ├── UANodeSet.cs │ ├── UANodeSet.xsd │ ├── UANodeSetHelpers.cs │ └── UAVariant.xsd │ ├── Security │ ├── AccessControl │ │ ├── AccessTemplateManager.cs │ │ ├── ApplicationAccessRule.cs │ │ ├── HttpAccessRule.cs │ │ └── UserRoleManager.cs │ ├── Audit.cs │ ├── Certificates │ │ ├── CertificateFactory.cs │ │ ├── CertificateIdentifier.cs │ │ ├── CertificateStoreIdentifier.cs │ │ ├── CertificateTrustList.cs │ │ ├── CertificateValidator.cs │ │ ├── DirectoryCertificateStore.cs │ │ ├── EncryptedData.cs │ │ ├── ICertificate.cs │ │ ├── ICertificateStore.cs │ │ ├── RsaUtils.cs │ │ ├── SecurityConfiguration.cs │ │ ├── Win32.cs │ │ ├── WindowsCertificateStore.cs │ │ ├── X509AuthorityKeyIdentifierExtension.cs │ │ ├── X509CRL.cs │ │ └── X509SubjectAltNameExtension.cs │ └── Constants │ │ ├── SecurityConstants.cs │ │ └── SecurityPolicies.cs │ ├── SilverlightDefs.cs │ ├── Stack │ ├── Bindings │ │ ├── ArraySegmentStream.cs │ │ ├── BaseBinding.cs │ │ ├── BindingFactory.cs │ │ ├── BufferManager.cs │ │ ├── UaHttpsSoapBinding.cs │ │ ├── UaSoapXmlBinding.cs │ │ ├── UaSoapXmlOverPipeBinding.cs │ │ ├── UaSoapXmlOverTcpBinding.cs │ │ └── UaTcpBinding.cs │ ├── Client │ │ ├── ClientBase.cs │ │ ├── DiscoveryClient.cs │ │ ├── IChannelBase.cs │ │ ├── IServiceRequest.cs │ │ ├── IUserIdentity.cs │ │ ├── InvokeServiceMessage.cs │ │ ├── RegistrationClient.cs │ │ ├── SessionChannel.cs │ │ ├── UserIdentity.cs │ │ └── WcfChannelBase.cs │ ├── Configuration │ │ ├── ApplicationConfiguration.cs │ │ ├── ConfigurationWatcher.cs │ │ ├── ConfiguredEndpoints.cs │ │ ├── EndpointConfiguration.cs │ │ ├── EndpointDescription.cs │ │ ├── ISecurityConfigurationManager.cs │ │ ├── SecurityConfigurationManager.cs │ │ └── ServerProperties.cs │ ├── Constants │ │ ├── ConditionStateNames.cs │ │ ├── DataTypes.Helpers.cs │ │ ├── Namespaces.cs │ │ └── ReferenceTypes.Helpers.cs │ ├── Generated │ │ ├── Opc.Ua.Channels.cs │ │ ├── Opc.Ua.Classes.cs │ │ ├── Opc.Ua.Client.cs │ │ ├── Opc.Ua.Constants.cs │ │ ├── Opc.Ua.DataTypes.cs │ │ ├── Opc.Ua.Endpoints.cs │ │ ├── Opc.Ua.Interfaces.cs │ │ ├── Opc.Ua.Messages.cs │ │ ├── Opc.Ua.NodeSet2.Part10.xml │ │ ├── Opc.Ua.NodeSet2.Part11.xml │ │ ├── Opc.Ua.NodeSet2.Part12.xml │ │ ├── Opc.Ua.NodeSet2.Part13.xml │ │ ├── Opc.Ua.NodeSet2.Part3.xml │ │ ├── Opc.Ua.NodeSet2.Part4.xml │ │ ├── Opc.Ua.NodeSet2.Part5.xml │ │ ├── Opc.Ua.NodeSet2.Part8.xml │ │ ├── Opc.Ua.NodeSet2.Part9.xml │ │ ├── Opc.Ua.NodeSet2.Part999.xml │ │ ├── Opc.Ua.NodeSet2.xml │ │ ├── Opc.Ua.PredefinedNodes.uanodes │ │ ├── Opc.Ua.PredefinedNodes.xml │ │ └── Opc.Ua.ServerBase.cs │ ├── Https │ │ ├── HttpsListener.cs │ │ └── HttpsTransportChannel.cs │ ├── Nodes │ │ ├── ContentFilter.cs │ │ ├── IFilterTarget.cs │ │ ├── INode.cs │ │ ├── IOperationContext.cs │ │ ├── Node.cs │ │ ├── NodeSet.cs │ │ ├── NodeTable.cs │ │ ├── ReferenceTable.cs │ │ ├── TypeTable.cs │ │ └── ViewTable.cs │ ├── Server │ │ ├── ClientAccessPolicy.xml │ │ ├── EndpointBase.cs │ │ ├── IEndpointBase.cs │ │ ├── IServerBase.cs │ │ ├── NonHttpEndpoint.cs │ │ ├── SecureChannelContext.cs │ │ ├── ServerBase.cs │ │ ├── ServiceHost.cs │ │ └── ServiceMessageContextBehaviorAttribute.cs │ ├── State │ │ ├── AcknowledgeableConditionState.cs │ │ ├── AlarmConditionState.cs │ │ ├── AuditEventState.cs │ │ ├── BaseEventState.cs │ │ ├── BaseInstanceState.cs │ │ ├── BaseInstanceStateSnapshot.cs │ │ ├── BaseObjectState.cs │ │ ├── BaseObjectTypeState.cs │ │ ├── BaseTypeState.cs │ │ ├── BaseVariableState.cs │ │ ├── BaseVariableTypeState.cs │ │ ├── ConditionState.cs │ │ ├── DataTypeState.cs │ │ ├── DialogConditionState.cs │ │ ├── ExclusiveLimitAlarmState.cs │ │ ├── ExclusiveLimitStateMachineState.cs │ │ ├── FiniteStateMachineState.cs │ │ ├── ISystemContext.cs │ │ ├── LimitAlarmState.cs │ │ ├── MethodState.cs │ │ ├── NodeBrowser.cs │ │ ├── NodeState.cs │ │ ├── NodeStateCollection.cs │ │ ├── NonExclusiveLimitAlarmState.cs │ │ ├── ProgramStateMachineState.cs │ │ ├── ReferenceTypeState.cs │ │ ├── ShelvedStateMachineState.cs │ │ └── ViewState.cs │ ├── Tcp │ │ ├── TcpAsyncOperation.cs │ │ ├── TcpChannel.Asymmetric.cs │ │ ├── TcpChannel.Rsa.cs │ │ ├── TcpChannel.Symmetric.cs │ │ ├── TcpChannel.cs │ │ ├── TcpChannelQuotas.cs │ │ ├── TcpChannelToken.cs │ │ ├── TcpClientChannel.cs │ │ ├── TcpListener.cs │ │ ├── TcpMessageSocket.cs │ │ ├── TcpMessageType.cs │ │ ├── TcpServerChannel.cs │ │ ├── TcpTransportChannel.cs │ │ └── Wcf │ │ │ ├── BinaryEncodingMessageFormatter.cs │ │ │ ├── IBinaryEncodingCapabilities.cs │ │ │ ├── IUaTcpSecureChannel.cs │ │ │ ├── InvokeServiceBodyWriter.cs │ │ │ ├── StreamSecurityBindingElement.cs │ │ │ ├── UaTcpChannelFactory.cs │ │ │ ├── UaTcpChannelListener.cs │ │ │ ├── UaTcpReplyChannel.cs │ │ │ ├── UaTcpRequestChannel.cs │ │ │ └── UaTcpTransportBindingElement.cs │ ├── Transport │ │ ├── AsyncResultBase.cs │ │ ├── ITransportChannel.cs │ │ ├── ITransportListener.cs │ │ ├── ITransportListenerCallback.cs │ │ ├── TransportChannelSettings.cs │ │ └── TransportListenerSettings.cs │ └── Types │ │ ├── Argument.cs │ │ ├── BrowseDescription.cs │ │ ├── BrowsePath.cs │ │ ├── CallMethodRequest.cs │ │ ├── ContentFilter.Evaluate.cs │ │ ├── EUInformation.cs │ │ ├── EventFieldList.cs │ │ ├── HistoryReadValueId.cs │ │ ├── HistoryUpdateDetails.cs │ │ ├── MonitoredItemCreateRequest.cs │ │ ├── MonitoredItemCreateResult.cs │ │ ├── MonitoredItemModifyRequest.cs │ │ ├── MonitoredItemNotification.cs │ │ ├── MonitoringFilter.cs │ │ ├── NotificationMessage.cs │ │ ├── QueryDataSet.cs │ │ ├── Range.cs │ │ ├── ReadValueId.cs │ │ ├── ReferenceDescription.cs │ │ ├── ServiceFault.cs │ │ ├── SoftwareCertficate.cs │ │ ├── StatusResult.cs │ │ ├── UserIdentityToken.cs │ │ ├── UserTokenPolicy.cs │ │ ├── VariableAttributes.cs │ │ ├── ViewDescription.cs │ │ └── WriteValue.cs │ ├── Types │ ├── BuiltIn │ │ ├── AttributeValues.cs │ │ ├── BuiltInTypeCollections.cs │ │ ├── DataValue.cs │ │ ├── DiagnosticInfo.cs │ │ ├── DiagnosticMasks.cs │ │ ├── ExpandedNodeId.cs │ │ ├── ExtensionObject.cs │ │ ├── ITranslatableObject.cs │ │ ├── ITypeTable.cs │ │ ├── LocalizedText.cs │ │ ├── MessageContextExtension.cs │ │ ├── NodeId.cs │ │ ├── QualifiedName.cs │ │ ├── StatusCode.cs │ │ ├── Uuid.cs │ │ └── Variant.cs │ ├── Constants │ │ ├── Attributes.Helpers.cs │ │ └── StatusCodes.Helpers.cs │ ├── Encoders │ │ ├── BinaryDecoder.cs │ │ ├── BinaryEncoder.cs │ │ ├── EncodableObject.cs │ │ ├── EncodeableFactory.cs │ │ ├── IDecoder.cs │ │ ├── IEncodable.cs │ │ ├── IEncoder.cs │ │ ├── XmlDecoder.cs │ │ └── XmlEncoder.cs │ ├── Generated │ │ ├── Opc.Ua.Attributes.cs │ │ └── Opc.Ua.StatusCodes.cs │ ├── Schemas │ │ ├── BinarySchema.cs │ │ ├── BinarySchemaValidator.cs │ │ ├── BuiltInTypes.bsd │ │ ├── BuiltInTypes.xml │ │ ├── OPCBinarySchema.cs │ │ ├── OPCBinarySchema.xsd │ │ ├── SchemaValidator.cs │ │ ├── StandardTypes.bsd │ │ └── XmlSchemaValidator.cs │ └── Utils │ │ ├── DataComparer.cs │ │ ├── DataGenerator.cs │ │ ├── HiResClock.cs │ │ ├── LocalizedData.txt │ │ ├── Lock.cs │ │ ├── NamespaceTable.cs │ │ ├── NumericRange.cs │ │ ├── ReadOnlyList.cs │ │ ├── RelativePath.cs │ │ ├── ServiceMessageContext.cs │ │ ├── ServiceResult.cs │ │ ├── ServiceResultException.cs │ │ ├── TypeInfo.cs │ │ └── Utils.cs │ └── UA Core Library.csproj ├── build_certificate-generator.bat ├── fetch_openssl.bat └── third-party ├── build_openssl.bat └── readme.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Object files 2 | *.o 3 | *.ko 4 | *.obj 5 | *.elf 6 | obj/ 7 | 8 | # Precompiled Headers 9 | *.gch 10 | *.pch 11 | 12 | # Libraries 13 | *.lib 14 | *.a 15 | *.la 16 | *.lo 17 | 18 | # Shared objects (inc. Windows DLLs) 19 | *.dll 20 | *.so 21 | *.so.* 22 | *.dylib 23 | 24 | # Executables 25 | *.exe 26 | *.out 27 | *.app 28 | *.i*86 29 | *.x86_64 30 | *.hex 31 | 32 | # Debug files 33 | *.dSYM/ 34 | Debug/ 35 | 36 | # Release files 37 | Release/ 38 | 39 | # Visual Studio cache 40 | *.opensdf 41 | *.sdf 42 | *.suo -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "CertificateGenerator/stack"] 2 | path = CertificateGenerator/stack 3 | url = https://github.com/OPCFoundation/UA-AnsiC 4 | -------------------------------------------------------------------------------- /AggregateTester.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aggregate Tester", "AggregateTester\Aggregate Tester.csproj", "{4CEAC8D5-55C1-489E-B1AE-37EBE0D56BAC}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UA Core Library", "Stack\Core\UA Core Library.csproj", "{7543AFCB-F5AF-44AF-83C9-23164474C1E9}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Debug|Mixed Platforms = Debug|Mixed Platforms 14 | Debug|Win32 = Debug|Win32 15 | Release|Any CPU = Release|Any CPU 16 | Release|Mixed Platforms = Release|Mixed Platforms 17 | Release|Win32 = Release|Win32 18 | EndGlobalSection 19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 20 | {4CEAC8D5-55C1-489E-B1AE-37EBE0D56BAC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {4CEAC8D5-55C1-489E-B1AE-37EBE0D56BAC}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {4CEAC8D5-55C1-489E-B1AE-37EBE0D56BAC}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU 23 | {4CEAC8D5-55C1-489E-B1AE-37EBE0D56BAC}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU 24 | {4CEAC8D5-55C1-489E-B1AE-37EBE0D56BAC}.Debug|Win32.ActiveCfg = Debug|Any CPU 25 | {4CEAC8D5-55C1-489E-B1AE-37EBE0D56BAC}.Release|Any CPU.ActiveCfg = Release|Any CPU 26 | {4CEAC8D5-55C1-489E-B1AE-37EBE0D56BAC}.Release|Any CPU.Build.0 = Release|Any CPU 27 | {4CEAC8D5-55C1-489E-B1AE-37EBE0D56BAC}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU 28 | {4CEAC8D5-55C1-489E-B1AE-37EBE0D56BAC}.Release|Mixed Platforms.Build.0 = Release|Any CPU 29 | {4CEAC8D5-55C1-489E-B1AE-37EBE0D56BAC}.Release|Win32.ActiveCfg = Release|Any CPU 30 | {7543AFCB-F5AF-44AF-83C9-23164474C1E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 31 | {7543AFCB-F5AF-44AF-83C9-23164474C1E9}.Debug|Any CPU.Build.0 = Debug|Any CPU 32 | {7543AFCB-F5AF-44AF-83C9-23164474C1E9}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU 33 | {7543AFCB-F5AF-44AF-83C9-23164474C1E9}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU 34 | {7543AFCB-F5AF-44AF-83C9-23164474C1E9}.Debug|Win32.ActiveCfg = Debug|Any CPU 35 | {7543AFCB-F5AF-44AF-83C9-23164474C1E9}.Debug|Win32.Build.0 = Debug|Any CPU 36 | {7543AFCB-F5AF-44AF-83C9-23164474C1E9}.Release|Any CPU.ActiveCfg = Release|Any CPU 37 | {7543AFCB-F5AF-44AF-83C9-23164474C1E9}.Release|Any CPU.Build.0 = Release|Any CPU 38 | {7543AFCB-F5AF-44AF-83C9-23164474C1E9}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU 39 | {7543AFCB-F5AF-44AF-83C9-23164474C1E9}.Release|Mixed Platforms.Build.0 = Release|Any CPU 40 | {7543AFCB-F5AF-44AF-83C9-23164474C1E9}.Release|Win32.ActiveCfg = Release|Any CPU 41 | {7543AFCB-F5AF-44AF-83C9-23164474C1E9}.Release|Win32.Build.0 = Release|Any CPU 42 | EndGlobalSection 43 | GlobalSection(SolutionProperties) = preSolution 44 | HideSolutionNode = FALSE 45 | EndGlobalSection 46 | EndGlobal 47 | -------------------------------------------------------------------------------- /AggregateTester/Aggregate Tester.csproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | en-US 11 | false 12 | 13 | -------------------------------------------------------------------------------- /AggregateTester/Aggregates/IAggregateCalculator.cs: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2011 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Foundation MIT License 1.00 5 | * 6 | * Permission is hereby granted, free of charge, to any person 7 | * obtaining a copy of this software and associated documentation 8 | * files (the "Software"), to deal in the Software without 9 | * restriction, including without limitation the rights to use, 10 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the 12 | * Software is furnished to do so, subject to the following 13 | * conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be 16 | * included in all copies or substantial portions of the Software. 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 19 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 24 | * OTHER DEALINGS IN THE SOFTWARE. 25 | * 26 | * The complete license agreement can be found here: 27 | * http://opcfoundation.org/License/MIT/1.00/ 28 | * ======================================================================*/ 29 | 30 | using System; 31 | using System.Collections.Generic; 32 | using System.Text; 33 | 34 | namespace Opc.Ua.Server 35 | { 36 | /// 37 | /// An interface that captures the original active API of the AggregateCalculator class 38 | /// required to integrate with the subscription code. 39 | /// 40 | public interface IAggregateCalculator 41 | { 42 | /// 43 | /// The aggregate function applied by the calculator. 44 | /// 45 | NodeId AggregateId { get; } 46 | 47 | /// 48 | /// Pushes the next raw value into the stream. 49 | /// 50 | /// The data value to append to the stream. 51 | /// True if successful, false if the source timestamp has been superceeded by values already in the stream. 52 | bool QueueRawValue(DataValue value); 53 | 54 | /// 55 | /// Returns the next processed value. 56 | /// 57 | /// If true a partial interval should be processed. 58 | /// The processed value. Null if nothing available and returnPartial is false. 59 | DataValue GetProcessedValue(bool returnPartial); 60 | 61 | /// 62 | /// Returns true if the specified time is later than the end of the current interval. 63 | /// 64 | /// Return true if time flows forward and the time is later than the end time. 65 | bool HasEndTimePassed(DateTime currentTime); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /AggregateTester/Aggregates/ServerAggregateFilter.cs: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2011 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Foundation MIT License 1.00 5 | * 6 | * Permission is hereby granted, free of charge, to any person 7 | * obtaining a copy of this software and associated documentation 8 | * files (the "Software"), to deal in the Software without 9 | * restriction, including without limitation the rights to use, 10 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the 12 | * Software is furnished to do so, subject to the following 13 | * conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be 16 | * included in all copies or substantial portions of the Software. 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 19 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 24 | * OTHER DEALINGS IN THE SOFTWARE. 25 | * 26 | * The complete license agreement can be found here: 27 | * http://opcfoundation.org/License/MIT/1.00/ 28 | * ======================================================================*/ 29 | 30 | using System; 31 | using System.Collections.Generic; 32 | using System.Text; 33 | using System.Globalization; 34 | 35 | namespace Opc.Ua.Server 36 | { 37 | /// 38 | /// A aggregate filter with additional state information. 39 | /// 40 | public class ServerAggregateFilter : AggregateFilter 41 | { 42 | /// 43 | /// Whether the variable requires stepped interpolation. 44 | /// 45 | public bool Stepped { get; set; } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /AggregateTester/App.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OPCFoundation/Misc-Tools/de1a15d7feb7f2f1daf93c095309882d02895a8c/AggregateTester/App.ico -------------------------------------------------------------------------------- /AggregateTester/Program.cs: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2011 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Foundation MIT License 1.00 5 | * 6 | * Permission is hereby granted, free of charge, to any person 7 | * obtaining a copy of this software and associated documentation 8 | * files (the "Software"), to deal in the Software without 9 | * restriction, including without limitation the rights to use, 10 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the 12 | * Software is furnished to do so, subject to the following 13 | * conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be 16 | * included in all copies or substantial portions of the Software. 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 19 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 24 | * OTHER DEALINGS IN THE SOFTWARE. 25 | * 26 | * The complete license agreement can be found here: 27 | * http://opcfoundation.org/License/MIT/1.00/ 28 | * ======================================================================*/ 29 | 30 | using System; 31 | using System.Collections.Generic; 32 | using System.Linq; 33 | using System.Windows.Forms; 34 | 35 | namespace Quickstarts 36 | { 37 | static class Program 38 | { 39 | /// 40 | /// The main entry point for the application. 41 | /// 42 | [STAThread] 43 | static void Main() 44 | { 45 | Application.EnableVisualStyles(); 46 | Application.SetCompatibleTextRenderingDefault(false); 47 | Application.Run(new MainForm()); 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /AggregateTester/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2011 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Foundation MIT License 1.00 5 | * 6 | * Permission is hereby granted, free of charge, to any person 7 | * obtaining a copy of this software and associated documentation 8 | * files (the "Software"), to deal in the Software without 9 | * restriction, including without limitation the rights to use, 10 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the 12 | * Software is furnished to do so, subject to the following 13 | * conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be 16 | * included in all copies or substantial portions of the Software. 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 19 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 24 | * OTHER DEALINGS IN THE SOFTWARE. 25 | * 26 | * The complete license agreement can be found here: 27 | * http://opcfoundation.org/License/MIT/1.00/ 28 | * ======================================================================*/ 29 | 30 | using System.Reflection; 31 | using System.Runtime.CompilerServices; 32 | using System.Runtime.InteropServices; 33 | 34 | // General Information about an assembly is controlled through the following 35 | // set of attributes. Change these attribute values to modify the information 36 | // associated with an assembly. 37 | [assembly: AssemblyTitle("Opc.Ua.AggregateTester")] 38 | [assembly: AssemblyDescription("OPC UA Aggregate Tester")] 39 | [assembly: AssemblyConfiguration("")] 40 | [assembly: AssemblyCompany("OPC Foundation")] 41 | [assembly: AssemblyProduct("Opc.Ua.AggregateTester")] 42 | [assembly: AssemblyCopyright("Copyright © OPC Foundation 2011-2013")] 43 | [assembly: AssemblyTrademark("")] 44 | [assembly: AssemblyCulture("")] 45 | 46 | // Setting ComVisible to false makes the types in this assembly not visible 47 | // to COM components. If you need to access a type in this assembly from 48 | // COM, set the ComVisible attribute to true on that type. 49 | [assembly: ComVisible(false)] 50 | 51 | // The following GUID is for the ID of the typelib if this project is exposed to COM 52 | [assembly: Guid("8b300711-57c7-42f1-9d4d-d3b2f0d02c4e")] 53 | 54 | // Version information for an assembly consists of the following four values: 55 | // 56 | // Major Version 57 | // Minor Version 58 | // Build Number 59 | // Revision 60 | // 61 | // You can specify all the values or you can default the Build and Revision Numbers 62 | // by using the '*' as shown below: 63 | // [assembly: AssemblyVersion("1.0.*")] 64 | [assembly: AssemblyVersion("1.0.0.0")] 65 | [assembly: AssemblyFileVersion("1.0.0.0")] 66 | -------------------------------------------------------------------------------- /AggregateTester/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Opc.Ua.AggregateTester.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Opc.Ua.AggregateTester.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /AggregateTester/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Opc.Ua.AggregateTester.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /AggregateTester/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AggregateTester/TestData.xsd: -------------------------------------------------------------------------------- 1 |  2 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /AggregateTester/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /CertificateGenerator/Application.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2011 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Foundation MIT License 1.00 5 | * 6 | * Permission is hereby granted, free of charge, to any person 7 | * obtaining a copy of this software and associated documentation 8 | * files (the "Software"), to deal in the Software without 9 | * restriction, including without limitation the rights to use, 10 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the 12 | * Software is furnished to do so, subject to the following 13 | * conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be 16 | * included in all copies or substantial portions of the Software. 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 19 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 24 | * OTHER DEALINGS IN THE SOFTWARE. 25 | * 26 | * The complete license agreement can be found here: 27 | * http://opcfoundation.org/License/MIT/1.00/ 28 | * ======================================================================*/ 29 | 30 | #pragma once 31 | 32 | // Stores information associated with a UA application instance. 33 | class Application 34 | { 35 | public: 36 | 37 | // Constructor 38 | Application(void); 39 | 40 | // Destructor 41 | ~Application(void); 42 | 43 | // Initializes the stack and application. 44 | virtual void Initialize(void); 45 | 46 | // Frees all resources used by the stack and application. 47 | virtual void Uninitialize(void); 48 | 49 | // Issues a new certificate. 50 | void Issue(CommandLineArgs& args); 51 | 52 | // Revokes a certificate. 53 | void Revoke(CommandLineArgs& args); 54 | 55 | // Converts a certificate. 56 | void Convert(CommandLineArgs& args); 57 | 58 | // Replaces a certificates in a PFX file. 59 | void Replace(CommandLineArgs& args); 60 | 61 | // Create a certificate signing request. 62 | void CreateRequest(CommandLineArgs& args); 63 | 64 | // Process a certificate signing request. 65 | void ProcessRequest(CommandLineArgs& args); 66 | 67 | // Change a password. 68 | void ChangePassword(CommandLineArgs& args); 69 | 70 | private: 71 | 72 | // Logs a message. 73 | void Log(OpcUa_UInt32 uTraceLevel, OpcUa_CharA* sFormat, ...); 74 | 75 | OpcUa_Handle m_hPlatformLayer; 76 | OpcUa_ProxyStubConfiguration m_tConfiguration; 77 | }; 78 | -------------------------------------------------------------------------------- /CertificateGenerator/BuildVersion.h: -------------------------------------------------------------------------------- 1 | #define BUILD_NUMBER 123 2 | -------------------------------------------------------------------------------- /CertificateGenerator/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | CONSOLE APPLICATION : certificategenerator Project Overview 3 | ======================================================================== 4 | 5 | AppWizard has created this certificategenerator application for you. 6 | 7 | This file contains a summary of what you will find in each of the files that 8 | make up your certificategenerator application. 9 | 10 | 11 | certificategenerator.vcproj 12 | This is the main project file for VC++ projects generated using an Application Wizard. 13 | It contains information about the version of Visual C++ that generated the file, and 14 | information about the platforms, configurations, and project features selected with the 15 | Application Wizard. 16 | 17 | certificategenerator.cpp 18 | This is the main application source file. 19 | 20 | ///////////////////////////////////////////////////////////////////////////// 21 | Other standard files: 22 | 23 | StdAfx.h, StdAfx.cpp 24 | These files are used to build a precompiled header (PCH) file 25 | named certificategenerator.pch and a precompiled types file named StdAfx.obj. 26 | 27 | ///////////////////////////////////////////////////////////////////////////// 28 | Other notes: 29 | 30 | AppWizard uses "TODO:" comments to indicate parts of the source code you 31 | should add to or customize. 32 | 33 | ///////////////////////////////////////////////////////////////////////////// 34 | -------------------------------------------------------------------------------- /CertificateGenerator/Resource.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OPCFoundation/Misc-Tools/de1a15d7feb7f2f1daf93c095309882d02895a8c/CertificateGenerator/Resource.rc -------------------------------------------------------------------------------- /CertificateGenerator/StatusCodeException.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2011 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Foundation MIT License 1.00 5 | * 6 | * Permission is hereby granted, free of charge, to any person 7 | * obtaining a copy of this software and associated documentation 8 | * files (the "Software"), to deal in the Software without 9 | * restriction, including without limitation the rights to use, 10 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the 12 | * Software is furnished to do so, subject to the following 13 | * conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be 16 | * included in all copies or substantial portions of the Software. 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 19 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 24 | * OTHER DEALINGS IN THE SOFTWARE. 25 | * 26 | * The complete license agreement can be found here: 27 | * http://opcfoundation.org/License/MIT/1.00/ 28 | * ======================================================================*/ 29 | 30 | #pragma once 31 | 32 | // Stores a status code and message that can be thrown as an exception. 33 | class StatusCodeException 34 | { 35 | public: 36 | 37 | // Creates a default exception. 38 | StatusCodeException() 39 | { 40 | m_code = OpcUa_Bad; 41 | } 42 | 43 | // Creates a new instance of the exception. 44 | StatusCodeException(int code) 45 | { 46 | m_code = code; 47 | } 48 | 49 | // Creates a new instance of the exception. 50 | StatusCodeException(int code, std::string message) 51 | { 52 | m_code = code; 53 | m_message = message; 54 | } 55 | 56 | // Frees all resources used by the exception. 57 | ~StatusCodeException(void) 58 | { 59 | } 60 | 61 | // Returns the status code associated with the exception. 62 | int GetCode(void) 63 | { 64 | return m_code; 65 | } 66 | 67 | // Returns the message associated with the exception. 68 | std::string GetMessage(void) 69 | { 70 | return m_message; 71 | } 72 | 73 | private: 74 | 75 | int m_code; 76 | std::string m_message; 77 | }; 78 | 79 | #define ThrowIfBad(xStatus,xMessage) if (OpcUa_IsBad(xStatus)) throw StatusCodeException(xStatus,xMessage); 80 | #define ThrowIfAllocFailed(xBuffer) if (xBuffer == NULL) throw StatusCodeException(OpcUa_BadOutOfMemory,"Memory allocation failed."); 81 | #define ThrowIfCallFailed(xStatus,xFunction) if (OpcUa_IsBad(xStatus)) throw StatusCodeException(xStatus,#xFunction " call failed."); -------------------------------------------------------------------------------- /CertificateGenerator/UA Certificate Generator.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | Source Files 29 | 30 | 31 | Source Files 32 | 33 | 34 | 35 | 36 | Header Files 37 | 38 | 39 | Header Files 40 | 41 | 42 | Header Files 43 | 44 | 45 | Header Files 46 | 47 | 48 | Header Files 49 | 50 | 51 | Header Files 52 | 53 | 54 | Header Files 55 | 56 | 57 | Header Files 58 | 59 | 60 | 61 | 62 | Resource Files 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /CertificateGenerator/Version.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2011 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Foundation MIT License 1.00 5 | * 6 | * Permission is hereby granted, free of charge, to any person 7 | * obtaining a copy of this software and associated documentation 8 | * files (the "Software"), to deal in the Software without 9 | * restriction, including without limitation the rights to use, 10 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the 12 | * Software is furnished to do so, subject to the following 13 | * conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be 16 | * included in all copies or substantial portions of the Software. 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 19 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 24 | * OTHER DEALINGS IN THE SOFTWARE. 25 | * 26 | * The complete license agreement can be found here: 27 | * http://opcfoundation.org/License/MIT/1.00/ 28 | * ======================================================================*/ 29 | 30 | /* Copyright (C) OPC Foundation, 2009. All rights reserved. */ 31 | /****************************************************************************/ 32 | 33 | #define SDK_COPYRIGHT_NOTICE "Copyright (c) 2004-2011 OPC Foundation, Inc" 34 | 35 | //---------------------------------------------------------------------------- 36 | // Product name and version. 37 | // 38 | #define SDK_MAJOR 1 39 | #define SDK_MINOR 01 40 | #define SDK_BUILD 333 41 | #define SDK_REVISION 0 42 | #define SDK_PATCH 0 43 | 44 | // Convert numbers to strings: 45 | #define chSTR(x) #x 46 | #define chSTR2(x) chSTR(x) 47 | 48 | #define SDK_VERSION SDK_MAJOR,SDK_MINOR,SDK_BUILD,SDK_PATCH 49 | #define SDK_VERSION_STR chSTR2(SDK_MAJOR) "." chSTR2(SDK_MINOR) "." chSTR2(SDK_BUILD) "." chSTR2(SDK_REVISION) 50 | 51 | #define SDK_FILEVERSION SDK_MAJOR,SDK_MINOR,SDK_BUILD,SDK_PATCH 52 | #define SDK_FILEVERSION_STR chSTR2(SDK_MAJOR) "." chSTR2(SDK_MINOR) "." chSTR2(SDK_BUILD) "." chSTR2(SDK_PATCH) 53 | //---------------------------------------------------------------------------- 54 | 55 | //---------------------------------------------------------------------------- 56 | // OpcUaComServerHost 57 | // 58 | #define COMHOST_FILEVERSION SDK_FILEVERSION 59 | #define COMHOST_FILEVERSION_STR SDK_FILEVERSION_STR 60 | //---------------------------------------------------------------------------- 61 | 62 | //---------------------------------------------------------------------------- 63 | // StackTest 64 | // 65 | #define STACKTEST_FILEVERSION SDK_FILEVERSION 66 | #define STACKTEST_FILEVERSION_STR SDK_FILEVERSION_STR 67 | //---------------------------------------------------------------------------- 68 | -------------------------------------------------------------------------------- /CertificateGenerator/core/opcua_base64.h: -------------------------------------------------------------------------------- 1 | /** 2 | @file opcua_base64.h 3 | @brief Defines BASE64 handling functions. 4 | 5 | (c) Copyright 2005-2008 The OPC Foundation 6 | ALL RIGHTS RESERVED. 7 | 8 | DISCLAIMER: 9 | This code is provided by the OPC Foundation solely to assist in 10 | understanding and use of the appropriate OPC Specification(s) and may be 11 | used as set forth in the License Grant section of the OPC Specification. 12 | This code is provided as-is and without warranty or support of any sort 13 | and is subject to the Warranty and Liability Disclaimers which appear 14 | in the printed OPC Specification. 15 | */ 16 | 17 | #ifndef _OpcUa_Base64_H_ 18 | #define _OpcUa_Base64_H_ 1 19 | 20 | #ifdef OPCUA_HAVE_BASE64 21 | 22 | OPCUA_BEGIN_EXTERN_C 23 | 24 | OpcUa_StatusCode OpcUa_Base64_Encode( 25 | OpcUa_Byte* a_pBytes, 26 | OpcUa_Int32 a_iByteCount, 27 | OpcUa_StringA* a_psString); 28 | 29 | OpcUa_StatusCode OpcUa_Base64_Decode( 30 | OpcUa_StringA a_sString, 31 | OpcUa_Int32* a_piByteCount, 32 | OpcUa_Byte** a_ppBytes); 33 | 34 | OPCUA_END_EXTERN_C 35 | 36 | #endif /* OPCUA_HAVE_BASE64 */ 37 | #endif /* _OpcUa_Base64_H_ */ 38 | -------------------------------------------------------------------------------- /CertificateGenerator/core/opcua_cryptofactory.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2011 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Foundation MIT License 1.00 5 | * 6 | * Permission is hereby granted, free of charge, to any person 7 | * obtaining a copy of this software and associated documentation 8 | * files (the "Software"), to deal in the Software without 9 | * restriction, including without limitation the rights to use, 10 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the 12 | * Software is furnished to do so, subject to the following 13 | * conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be 16 | * included in all copies or substantial portions of the Software. 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 19 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 24 | * OTHER DEALINGS IN THE SOFTWARE. 25 | * 26 | * The complete license agreement can be found here: 27 | * http://opcfoundation.org/License/MIT/1.00/ 28 | * ======================================================================*/ 29 | 30 | #ifndef _OpcUa_CryptoFactory_H_ 31 | #define _OpcUa_CryptoFactory_H_ 1 32 | 33 | OPCUA_BEGIN_EXTERN_C 34 | 35 | #define OPCUA_P_CRYPTOFACTORY_CREATECRYPTOPROVIDER OpcUa_ProxyStub_g_PlatformLayerCalltable->CreateCryptoProvider 36 | #define OPCUA_P_CRYPTOFACTORY_DELETECRYPTOPROVIDER OpcUa_ProxyStub_g_PlatformLayerCalltable->DeleteCryptoProvider 37 | #define OPCUA_P_CRYPTOFACTORY_GETENCRYPTIONMETHODS OpcUa_ProxyStub_g_PlatformLayerCalltable->GetEncryptionMethods 38 | #define OPCUA_P_CRYPTOFACTORY_GETSIGNATUREMETHODS OpcUa_ProxyStub_g_PlatformLayerCalltable->GetSignatureMethods 39 | 40 | OPCUA_END_EXTERN_C 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /CertificateGenerator/core/opcua_memory.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2011 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Foundation MIT License 1.00 5 | * 6 | * Permission is hereby granted, free of charge, to any person 7 | * obtaining a copy of this software and associated documentation 8 | * files (the "Software"), to deal in the Software without 9 | * restriction, including without limitation the rights to use, 10 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the 12 | * Software is furnished to do so, subject to the following 13 | * conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be 16 | * included in all copies or substantial portions of the Software. 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 19 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 24 | * OTHER DEALINGS IN THE SOFTWARE. 25 | * 26 | * The complete license agreement can be found here: 27 | * http://opcfoundation.org/License/MIT/1.00/ 28 | * ======================================================================*/ 29 | 30 | #ifndef _OpcUa_Memory_H_ 31 | #define _OpcUa_Memory_H_ 1 32 | 33 | OPCUA_BEGIN_EXTERN_C 34 | 35 | /** 36 | * @brief Allocates a new block of memory. 37 | * 38 | * @param nSize [in] The size of the block to allocate. 39 | */ 40 | OPCUA_EXPORT OpcUa_Void* OPCUA_DLLCALL OpcUa_Memory_Alloc(OpcUa_UInt32 nSize); 41 | 42 | /** 43 | * @brief Reallocates a block of memory 44 | * 45 | * @param pBuffer [in] The existing memory block. 46 | * @param nSize [in] The size of the block to allocate. 47 | */ 48 | OPCUA_EXPORT OpcUa_Void* OPCUA_DLLCALL OpcUa_Memory_ReAlloc(OpcUa_Void* pBuffer, 49 | OpcUa_UInt32 nSize); 50 | 51 | /** 52 | * @brief Frees a block of memory. 53 | * 54 | * @param pvBuffer [in] The existing memory block. 55 | */ 56 | OPCUA_EXPORT OpcUa_Void OPCUA_DLLCALL OpcUa_Memory_Free(OpcUa_Void* pvBuffer); 57 | 58 | /** 59 | * @brief Copies a block of memory. 60 | * 61 | * @param pBuffer [in] The destination memory block. 62 | * @param nSizeInBytes [in] The size of the destination memory block. 63 | * @param pSource [in] The memory block being copied. 64 | * @param nCount [in] The number of bytes to copy. 65 | * 66 | * @return StatusCode: 67 | * OpcUa_BadInvalidArgument if Buffer or Source equals OpcUa_Null; 68 | * OpcUa_BadOutOfRange if number of bytes to copy greater nSizeInBytes 69 | */ 70 | OPCUA_EXPORT OpcUa_StatusCode OPCUA_DLLCALL OpcUa_Memory_MemCpy( OpcUa_Void* pBuffer, 71 | OpcUa_UInt32 nSizeInBytes, 72 | OpcUa_Void* pSource, 73 | OpcUa_UInt32 nCount); 74 | 75 | OPCUA_END_EXTERN_C 76 | 77 | #endif /* _OpcUa_Memory_H_ */ 78 | -------------------------------------------------------------------------------- /CertificateGenerator/core/opcua_mutex.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2011 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Foundation MIT License 1.00 5 | * 6 | * Permission is hereby granted, free of charge, to any person 7 | * obtaining a copy of this software and associated documentation 8 | * files (the "Software"), to deal in the Software without 9 | * restriction, including without limitation the rights to use, 10 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the 12 | * Software is furnished to do so, subject to the following 13 | * conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be 16 | * included in all copies or substantial portions of the Software. 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 19 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 24 | * OTHER DEALINGS IN THE SOFTWARE. 25 | * 26 | * The complete license agreement can be found here: 27 | * http://opcfoundation.org/License/MIT/1.00/ 28 | * ======================================================================*/ 29 | 30 | #if OPCUA_MUTEX_ERROR_CHECKING 31 | #define OPCUA_P_MUTEX_CREATE(xMutex) OpcUa_ProxyStub_g_PlatformLayerCalltable->MutexCreate( xMutex, __FILE__, __LINE__) 32 | #define OPCUA_P_MUTEX_DELETE(xMutex) OpcUa_ProxyStub_g_PlatformLayerCalltable->MutexDelete( xMutex, __FILE__, __LINE__) 33 | #define OPCUA_P_MUTEX_LOCK(xMutex) OpcUa_ProxyStub_g_PlatformLayerCalltable->MutexLock( xMutex, __FILE__, __LINE__) 34 | #define OPCUA_P_MUTEX_UNLOCK(xMutex) OpcUa_ProxyStub_g_PlatformLayerCalltable->MutexUnlock( xMutex, __FILE__, __LINE__) 35 | #else /* OPCUA_MUTEX_ERROR_CHECKING */ 36 | #if OPCUA_USE_SYNCHRONISATION 37 | #define OPCUA_P_MUTEX_CREATE OpcUa_ProxyStub_g_PlatformLayerCalltable->MutexCreate 38 | #define OPCUA_P_MUTEX_DELETE OpcUa_ProxyStub_g_PlatformLayerCalltable->MutexDelete 39 | #define OPCUA_P_MUTEX_LOCK OpcUa_ProxyStub_g_PlatformLayerCalltable->MutexLock 40 | #define OPCUA_P_MUTEX_UNLOCK OpcUa_ProxyStub_g_PlatformLayerCalltable->MutexUnlock 41 | #else /* OPCUA_USE_SYNCHRONISATION */ 42 | #define OPCUA_P_MUTEX_CREATE(xMutex) OpcUa_Good 43 | #define OPCUA_P_MUTEX_DELETE(xMutex) 44 | #define OPCUA_P_MUTEX_LOCK(xMutex) 45 | #define OPCUA_P_MUTEX_UNLOCK(xMutex) 46 | #endif /* OPCUA_USE_SYNCHRONISATION */ 47 | #endif /* OPCUA_MUTEX_ERROR_CHECKING */ 48 | -------------------------------------------------------------------------------- /CertificateGenerator/core/opcua_pkifactory.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2011 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Foundation MIT License 1.00 5 | * 6 | * Permission is hereby granted, free of charge, to any person 7 | * obtaining a copy of this software and associated documentation 8 | * files (the "Software"), to deal in the Software without 9 | * restriction, including without limitation the rights to use, 10 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the 12 | * Software is furnished to do so, subject to the following 13 | * conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be 16 | * included in all copies or substantial portions of the Software. 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 19 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 24 | * OTHER DEALINGS IN THE SOFTWARE. 25 | * 26 | * The complete license agreement can be found here: 27 | * http://opcfoundation.org/License/MIT/1.00/ 28 | * ======================================================================*/ 29 | 30 | #ifndef _OpcUa_PKIFactory_H_ 31 | #define _OpcUa_PKIFactory_H_ 1 32 | 33 | OPCUA_BEGIN_EXTERN_C 34 | 35 | #define OPCUA_P_PKIFACTORY_CREATEPKIPROVIDER OpcUa_ProxyStub_g_PlatformLayerCalltable->CreatePKIProvider 36 | #define OPCUA_P_PKIFACTORY_DELETEPKIPROVIDER OpcUa_ProxyStub_g_PlatformLayerCalltable->DeletePKIProvider 37 | 38 | OPCUA_END_EXTERN_C 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /CertificateGenerator/core/opcua_semaphore.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2011 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Foundation MIT License 1.00 5 | * 6 | * Permission is hereby granted, free of charge, to any person 7 | * obtaining a copy of this software and associated documentation 8 | * files (the "Software"), to deal in the Software without 9 | * restriction, including without limitation the rights to use, 10 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the 12 | * Software is furnished to do so, subject to the following 13 | * conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be 16 | * included in all copies or substantial portions of the Software. 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 19 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 24 | * OTHER DEALINGS IN THE SOFTWARE. 25 | * 26 | * The complete license agreement can be found here: 27 | * http://opcfoundation.org/License/MIT/1.00/ 28 | * ======================================================================*/ 29 | 30 | #if OPCUA_USE_SYNCHRONISATION 31 | # define OPCUA_P_SEMAPHORE_CREATE OpcUa_ProxyStub_g_PlatformLayerCalltable->SemaphoreCreate 32 | # define OPCUA_P_SEMAPHORE_DELETE OpcUa_ProxyStub_g_PlatformLayerCalltable->SemaphoreDelete 33 | # define OPCUA_P_SEMAPHORE_WAIT OpcUa_ProxyStub_g_PlatformLayerCalltable->SemaphoreWait 34 | # define OPCUA_P_SEMAPHORE_TIMEDWAIT OpcUa_ProxyStub_g_PlatformLayerCalltable->SemaphoreTimedWait 35 | # define OPCUA_P_SEMAPHORE_POST OpcUa_ProxyStub_g_PlatformLayerCalltable->SemaphorePost 36 | #else /* OPCUA_USE_SYNCHRONISATION */ 37 | # define OPCUA_P_SEMAPHORE_CREATE(a, b, c) OpcUa_Good;OpcUa_ReferenceParameter(a);OpcUa_ReferenceParameter(b);OpcUa_ReferenceParameter(c); 38 | # define OPCUA_P_SEMAPHORE_DELETE(a) OpcUa_ReferenceParameter(a); 39 | # define OPCUA_P_SEMAPHORE_WAIT(a) OpcUa_Good;OpcUa_ReferenceParameter(a); 40 | # define OPCUA_P_SEMAPHORE_TIMEDWAIT(a, b) OpcUa_Good;OpcUa_ReferenceParameter(a);OpcUa_ReferenceParameter(b); 41 | # define OPCUA_P_SEMAPHORE_POST(a, b) OpcUa_Good;OpcUa_ReferenceParameter(a);OpcUa_ReferenceParameter(b); 42 | #endif /* OPCUA_USE_SYNCHRONISATION */ 43 | -------------------------------------------------------------------------------- /CertificateGenerator/core/opcua_socket.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2011 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Foundation MIT License 1.00 5 | * 6 | * Permission is hereby granted, free of charge, to any person 7 | * obtaining a copy of this software and associated documentation 8 | * files (the "Software"), to deal in the Software without 9 | * restriction, including without limitation the rights to use, 10 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the 12 | * Software is furnished to do so, subject to the following 13 | * conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be 16 | * included in all copies or substantial portions of the Software. 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 19 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 24 | * OTHER DEALINGS IN THE SOFTWARE. 25 | * 26 | * The complete license agreement can be found here: 27 | * http://opcfoundation.org/License/MIT/1.00/ 28 | * ======================================================================*/ 29 | 30 | #ifndef _OpcUa_Socket_H_ 31 | #define _OpcUa_Socket_H_ 1 32 | 33 | OPCUA_BEGIN_EXTERN_C 34 | 35 | #define OPCUA_P_SOCKETMANAGER_CREATE OpcUa_ProxyStub_g_PlatformLayerCalltable->SocketManagerCreate 36 | #define OPCUA_P_SOCKETMANAGER_DELETE OpcUa_ProxyStub_g_PlatformLayerCalltable->SocketManagerDelete 37 | #define OPCUA_P_SOCKETMANAGER_CREATESERVER OpcUa_ProxyStub_g_PlatformLayerCalltable->SocketManagerCreateServer 38 | #define OPCUA_P_SOCKETMANAGER_CREATECLIENT OpcUa_ProxyStub_g_PlatformLayerCalltable->SocketManagerCreateClient 39 | #define OPCUA_P_SOCKETMANAGER_SIGNALEVENT OpcUa_ProxyStub_g_PlatformLayerCalltable->SocketManagerSignalEvent 40 | #define OPCUA_P_SOCKETMANAGER_SERVELOOP OpcUa_ProxyStub_g_PlatformLayerCalltable->SocketManagerServeLoop 41 | 42 | #define OPCUA_P_SOCKET_READ OpcUa_ProxyStub_g_PlatformLayerCalltable->SocketRead 43 | #define OPCUA_P_SOCKET_WRITE OpcUa_ProxyStub_g_PlatformLayerCalltable->SocketWrite 44 | #define OPCUA_P_SOCKET_CLOSE OpcUa_ProxyStub_g_PlatformLayerCalltable->SocketClose 45 | #define OPCUA_P_SOCKET_GETPEERINFO OpcUa_ProxyStub_g_PlatformLayerCalltable->SocketGetPeerInfo 46 | #define OPCUA_P_SOCKET_CHANGEEVENTLIST /* Todo */ 47 | #define OPCUA_P_SOCKET_GETLASTERROR OpcUa_ProxyStub_g_PlatformLayerCalltable->SocketGetLastError 48 | 49 | #define OPCUA_P_INITIALIZENETWORK OpcUa_ProxyStub_g_PlatformLayerCalltable->NetworkInitialize 50 | #define OPCUA_P_CLEANUPNETWORK OpcUa_ProxyStub_g_PlatformLayerCalltable->NetworkCleanup 51 | 52 | OPCUA_END_EXTERN_C 53 | 54 | #endif /* _OpcUa_Socket_H_ */ 55 | -------------------------------------------------------------------------------- /CertificateGenerator/core/opcua_threadpool.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2011 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Foundation MIT License 1.00 5 | * 6 | * Permission is hereby granted, free of charge, to any person 7 | * obtaining a copy of this software and associated documentation 8 | * files (the "Software"), to deal in the Software without 9 | * restriction, including without limitation the rights to use, 10 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the 12 | * Software is furnished to do so, subject to the following 13 | * conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be 16 | * included in all copies or substantial portions of the Software. 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 19 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 24 | * OTHER DEALINGS IN THE SOFTWARE. 25 | * 26 | * The complete license agreement can be found here: 27 | * http://opcfoundation.org/License/MIT/1.00/ 28 | * ======================================================================*/ 29 | 30 | #ifndef _OpcUa_ThreadPool_H_ 31 | #define _OpcUa_ThreadPool_H_ 1 32 | 33 | #if OPCUA_HAVE_THREADPOOL 34 | 35 | /** 36 | * @brief Threadpool Handle. 37 | */ 38 | typedef OpcUa_Void* OpcUa_ThreadPool; 39 | 40 | OPCUA_BEGIN_EXTERN_C 41 | 42 | /** 43 | * @brief Create a thread pool with uMinThreads static threads and uMaxThreads - uMinThreads dynamic threads. 44 | */ 45 | OPCUA_EXPORT OpcUa_StatusCode OPCUA_DLLCALL OpcUa_ThreadPool_Create( OpcUa_ThreadPool* phThreadPool, 46 | OpcUa_UInt32 uMinThreads, 47 | OpcUa_UInt32 uMaxThreads, 48 | OpcUa_UInt32 uMaxJobs, 49 | OpcUa_Boolean bBlockIfFull, 50 | OpcUa_UInt32 uTimeout); 51 | 52 | /** 53 | * @brief Destroy a thread pool. 54 | */ 55 | OPCUA_EXPORT OpcUa_Void OPCUA_DLLCALL OpcUa_ThreadPool_Delete( OpcUa_ThreadPool* phThreadPool); 56 | 57 | /** 58 | * @brief Assing a job to a thread pool. The job may be queued for later execution. 59 | */ 60 | OPCUA_EXPORT OpcUa_StatusCode OPCUA_DLLCALL OpcUa_ThreadPool_AddJob( OpcUa_ThreadPool hThreadPool, 61 | OpcUa_PfnThreadMain* pFunction, 62 | OpcUa_Void* pArgument); 63 | 64 | OPCUA_END_EXTERN_C 65 | 66 | #endif /* OPCUA_HAVE_THREADPOOL */ 67 | 68 | #endif /* _OpcUa_ThreadPool_H_ */ 69 | -------------------------------------------------------------------------------- /CertificateGenerator/core/opcua_timer.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2011 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Reciprocal Community License ("RCL") Version 1.00 5 | * 6 | * Unless explicitly acquired and licensed from Licensor under another 7 | * license, the contents of this file are subject to the Reciprocal 8 | * Community License ("RCL") Version 1.00, or subsequent versions as 9 | * allowed by the RCL, and You may not copy or use this file in either 10 | * source code or executable form, except in compliance with the terms and 11 | * conditions of the RCL. 12 | * 13 | * All software distributed under the RCL is provided strictly on an 14 | * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, 15 | * AND LICENSOR HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT 16 | * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 17 | * PURPOSE, QUIET ENJOYMENT, OR NON-INFRINGEMENT. See the RCL for specific 18 | * language governing rights and limitations under the RCL. 19 | * 20 | * The complete license agreement can be found here: 21 | * http://opcfoundation.org/License/RCL/1.00/ 22 | * ======================================================================*/ 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | #include 29 | 30 | /*============================================================================ 31 | * Delete A Timer 32 | *===========================================================================*/ 33 | OpcUa_StatusCode OPCUA_DLLCALL OpcUa_Timer_Delete(OpcUa_Timer* a_phTimer) 34 | { 35 | return OPCUA_P_TIMER_DELETE(a_phTimer); 36 | } 37 | 38 | 39 | /*============================================================================ 40 | * Create A Timer 41 | *===========================================================================*/ 42 | OpcUa_StatusCode OPCUA_DLLCALL OpcUa_Timer_Create( OpcUa_Timer* a_phTimer, 43 | OpcUa_UInt32 a_msecInterval, 44 | OpcUa_Timer_Callback* a_fpTimerCallback, 45 | OpcUa_Timer_Callback* a_fpKillCallback, 46 | OpcUa_Void* a_pvCallbackData) 47 | { 48 | return OPCUA_P_TIMER_CREATE( a_phTimer, 49 | a_msecInterval, 50 | a_fpTimerCallback, 51 | a_fpKillCallback, 52 | a_pvCallbackData); 53 | } 54 | -------------------------------------------------------------------------------- /CertificateGenerator/core/opcua_timer.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2011 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Foundation MIT License 1.00 5 | * 6 | * Permission is hereby granted, free of charge, to any person 7 | * obtaining a copy of this software and associated documentation 8 | * files (the "Software"), to deal in the Software without 9 | * restriction, including without limitation the rights to use, 10 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the 12 | * Software is furnished to do so, subject to the following 13 | * conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be 16 | * included in all copies or substantial portions of the Software. 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 19 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 24 | * OTHER DEALINGS IN THE SOFTWARE. 25 | * 26 | * The complete license agreement can be found here: 27 | * http://opcfoundation.org/License/MIT/1.00/ 28 | * ======================================================================*/ 29 | 30 | #ifndef _OpcUa_Timer_H_ 31 | #define _OpcUa_Timer_H_ 1 32 | 33 | OPCUA_BEGIN_EXTERN_C 34 | 35 | #define OPCUA_P_TIMER_CREATE OpcUa_ProxyStub_g_PlatformLayerCalltable->TimerCreate 36 | #define OPCUA_P_TIMER_DELETE OpcUa_ProxyStub_g_PlatformLayerCalltable->TimerDelete 37 | #define OPCUA_P_CLEANUPTIMERS OpcUa_ProxyStub_g_PlatformLayerCalltable->TimersCleanup 38 | 39 | typedef OpcUa_StatusCode (OPCUA_DLLCALL OpcUa_Timer_Callback)( OpcUa_Void* pvCallbackData, 40 | OpcUa_Timer hTimer, 41 | OpcUa_UInt32 msecElapsed); 42 | 43 | OPCUA_EXPORT OpcUa_StatusCode OPCUA_DLLCALL OpcUa_Timer_Create( OpcUa_Timer* hTimer, 44 | OpcUa_UInt32 msecInterval, 45 | OpcUa_Timer_Callback* fpTimerCallback, 46 | OpcUa_Timer_Callback* fpKillCallback, 47 | OpcUa_Void* pvCallbackData); 48 | 49 | OPCUA_EXPORT OpcUa_StatusCode OPCUA_DLLCALL OpcUa_Timer_Delete( OpcUa_Timer* phTimer); 50 | 51 | OPCUA_END_EXTERN_C 52 | 53 | #endif /*_OpcUa_Timer_H_ */ 54 | -------------------------------------------------------------------------------- /CertificateGenerator/core/opcua_xmldefs.h: -------------------------------------------------------------------------------- 1 | /** 2 | @file opcua_xmldefs.h 3 | @brief 4 | 5 | (c) Copyright 2008 The OPC Foundation 6 | ALL RIGHTS RESERVED. 7 | 8 | DISCLAIMER: 9 | This code is provided by the OPC Foundation solely to assist in 10 | understanding and use of the appropriate OPC Specification(s) and may be 11 | used as set forth in the License Grant section of the OPC Specification. 12 | This code is provided as-is and without warranty or support of any sort 13 | and is subject to the Warranty and Liability Disclaimers which appear 14 | in the printed OPC Specification. 15 | */ 16 | 17 | #ifndef _OpcUa_XmlDefs_H_ 18 | #define _OpcUa_XmlDefs_H_ 1 19 | 20 | OPCUA_BEGIN_EXTERN_C 21 | 22 | #define OPCUA_URI_XML "http://www.w3.org/XML/1998/namespace" 23 | #define OPCUA_URI_XML_NAMESPACE "http://www.w3.org/2000/xmlns/" 24 | #define OPCUA_URI_XML_SCHEMA "http://www.w3.org/2001/XMLSchema" 25 | #define OPCUA_URI_XML_SCHEMA_INSTANCE "http://www.w3.org/2001/XMLSchema-instance" 26 | #define OPCUA_URI_SOAP_ENVELOPE "http://www.w3.org/2003/05/soap-envelope" 27 | #define OPCUA_URI_UA_XML_SCHEMA "http://opcfoundation.org/UA/2008/02/Types.xsd" 28 | #define OPCUA_URI_UA_STATUS_CODES "http://www.opcfoundation.org/UAPart6/StatusCodes" 29 | 30 | #define OPCUA_NAMESPACE_PREFIX_XML "xml" 31 | #define OPCUA_NAMESPACE_PREFIX_XMLNS "xmlns" 32 | #define OPCUA_NAMESPACE_PREFIX_XSI "xsi" 33 | #define OPCUA_NAMESPACE_PREFIX_SOAP "soap" 34 | #define OPCUA_NAMESPACE_PREFIX_OPC "opc" 35 | 36 | OPCUA_END_EXTERN_C 37 | 38 | #endif /* _OpcUa_XmlDefs_H_ */ -------------------------------------------------------------------------------- /CertificateGenerator/platforms/win32/UA AnsiC Win32 Platform Layer (VC8).sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 9.00 3 | # Visual Studio 2005 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UA AnsiC Win32 Platform Layer", "UA AnsiC Win32 Platform Layer (VC8).vcproj", "{AA4FD480-DA45-44D0-8F1C-CF54FC3010D6}" 5 | ProjectSection(ProjectDependencies) = postProject 6 | {2C157AD3-C7D6-4836-80A0-32170243EA2A} = {2C157AD3-C7D6-4836-80A0-32170243EA2A} 7 | EndProjectSection 8 | EndProject 9 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UA AnsiC Win32 Platform Layer DLL", "UA AnsiC Win32 Platform Layer DLL (VC8).vcproj", "{2C157AD3-C7D6-4836-80A0-32170243EA2A}" 10 | EndProject 11 | Global 12 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 13 | Debug|Win32 = Debug|Win32 14 | Release|Win32 = Release|Win32 15 | EndGlobalSection 16 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 17 | {AA4FD480-DA45-44D0-8F1C-CF54FC3010D6}.Debug|Win32.ActiveCfg = Debug|Win32 18 | {AA4FD480-DA45-44D0-8F1C-CF54FC3010D6}.Debug|Win32.Build.0 = Debug|Win32 19 | {AA4FD480-DA45-44D0-8F1C-CF54FC3010D6}.Release|Win32.ActiveCfg = Release|Win32 20 | {AA4FD480-DA45-44D0-8F1C-CF54FC3010D6}.Release|Win32.Build.0 = Release|Win32 21 | {2C157AD3-C7D6-4836-80A0-32170243EA2A}.Debug|Win32.ActiveCfg = Debug|Win32 22 | {2C157AD3-C7D6-4836-80A0-32170243EA2A}.Debug|Win32.Build.0 = Debug|Win32 23 | {2C157AD3-C7D6-4836-80A0-32170243EA2A}.Release|Win32.ActiveCfg = Release|Win32 24 | {2C157AD3-C7D6-4836-80A0-32170243EA2A}.Release|Win32.Build.0 = Release|Win32 25 | EndGlobalSection 26 | GlobalSection(SolutionProperties) = preSolution 27 | HideSolutionNode = FALSE 28 | EndGlobalSection 29 | EndGlobal 30 | -------------------------------------------------------------------------------- /CertificateGenerator/platforms/win32/UA AnsiC Win32 Platform Layer DLL.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2009 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Foundation MIT License 1.00 5 | * 6 | * Permission is hereby granted, free of charge, to any person 7 | * obtaining a copy of this software and associated documentation 8 | * files (the "Software"), to deal in the Software without 9 | * restriction, including without limitation the rights to use, 10 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the 12 | * Software is furnished to do so, subject to the following 13 | * conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be 16 | * included in all copies or substantial portions of the Software. 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 19 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 24 | * OTHER DEALINGS IN THE SOFTWARE. 25 | * 26 | * The complete license agreement can be found here: 27 | * http://opcfoundation.org/License/MIT/1.00/ 28 | * ======================================================================*/ 29 | 30 | /* System Headers */ 31 | #include 32 | 33 | /*============================================================================ 34 | * main DLL Entry function 35 | *===========================================================================*/ 36 | #ifdef _MANAGED 37 | #pragma managed(push, off) 38 | #endif 39 | 40 | #if 0 41 | DLL_PROCESS_ATTACH 42 | /* lpReserved NULL dynamic LoadLibrary() */ 43 | /* lpReserved non-NULL static */ 44 | DLL_THREAD_ATTACH 45 | DLL_PROCESS_DETACH 46 | /* lpReserved NULL FreeLibrary() */ 47 | /* lpReserved non-NULL terminated */ 48 | DLL_THREAD_DETACH 49 | #endif 50 | 51 | BOOL APIENTRY DllMain( HMODULE hModule, 52 | DWORD ul_reason_for_call, 53 | LPVOID lpReserved) 54 | { 55 | (void)(hModule); 56 | (void)(ul_reason_for_call); 57 | (void)(lpReserved); 58 | 59 | return TRUE; 60 | } 61 | 62 | #ifdef _MANAGED 63 | #pragma managed(pop) 64 | #endif 65 | -------------------------------------------------------------------------------- /CertificateGenerator/platforms/win32/UA AnsiC Win32 Platform Layer DLL.def: -------------------------------------------------------------------------------- 1 | LIBRARY "opcua_win32" 2 | 3 | EXPORTS 4 | OpcUa_P_Initialize 5 | OpcUa_P_Clean 6 | -------------------------------------------------------------------------------- /CertificateGenerator/platforms/win32/UA AnsiC Win32 Platform Layer DLL.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2009 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Foundation MIT License 1.00 5 | * 6 | * Permission is hereby granted, free of charge, to any person 7 | * obtaining a copy of this software and associated documentation 8 | * files (the "Software"), to deal in the Software without 9 | * restriction, including without limitation the rights to use, 10 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the 12 | * Software is furnished to do so, subject to the following 13 | * conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be 16 | * included in all copies or substantial portions of the Software. 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 19 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 24 | * OTHER DEALINGS IN THE SOFTWARE. 25 | * 26 | * The complete license agreement can be found here: 27 | * http://opcfoundation.org/License/MIT/1.00/ 28 | * ======================================================================*/ 29 | 30 | #pragma once 31 | 32 | // Modify the following defines if you have to target a platform prior to the ones specified below. 33 | // Refer to MSDN for the latest info on corresponding values for different platforms. 34 | #ifndef WINVER // Allow use of features specific to Windows XP or later. 35 | #define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows. 36 | #endif 37 | 38 | #ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later. 39 | #define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows. 40 | #endif 41 | 42 | #ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later. 43 | #define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later. 44 | #endif 45 | 46 | #ifndef _WIN32_IE // Allow use of features specific to IE 6.0 or later. 47 | #define _WIN32_IE 0x0600 // Change this to the appropriate value to target other versions of IE. 48 | #endif 49 | 50 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers 51 | -------------------------------------------------------------------------------- /CertificateGenerator/platforms/win32/UA AnsiC Win32 Platform Layer.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual Studio 2008 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UA AnsiC Win32 Platform Layer", "UA AnsiC Win32 Platform Layer.vcproj", "{AA4FD480-DA45-44D0-8F1C-CF54FC3010D6}" 5 | EndProject 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UA AnsiC Win32 Platform Layer DLL", "UA AnsiC Win32 Platform Layer DLL.vcproj", "{2C157AD3-C7D6-4836-80A0-32170243EA2A}" 7 | ProjectSection(ProjectDependencies) = postProject 8 | {AA4FD480-DA45-44D0-8F1C-CF54FC3010D6} = {AA4FD480-DA45-44D0-8F1C-CF54FC3010D6} 9 | EndProjectSection 10 | EndProject 11 | Global 12 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 13 | Debug|Win32 = Debug|Win32 14 | Release|Win32 = Release|Win32 15 | EndGlobalSection 16 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 17 | {AA4FD480-DA45-44D0-8F1C-CF54FC3010D6}.Debug|Win32.ActiveCfg = Debug|Win32 18 | {AA4FD480-DA45-44D0-8F1C-CF54FC3010D6}.Debug|Win32.Build.0 = Debug|Win32 19 | {AA4FD480-DA45-44D0-8F1C-CF54FC3010D6}.Release|Win32.ActiveCfg = Release|Win32 20 | {AA4FD480-DA45-44D0-8F1C-CF54FC3010D6}.Release|Win32.Build.0 = Release|Win32 21 | {2C157AD3-C7D6-4836-80A0-32170243EA2A}.Debug|Win32.ActiveCfg = Debug|Win32 22 | {2C157AD3-C7D6-4836-80A0-32170243EA2A}.Debug|Win32.Build.0 = Debug|Win32 23 | {2C157AD3-C7D6-4836-80A0-32170243EA2A}.Release|Win32.ActiveCfg = Release|Win32 24 | {2C157AD3-C7D6-4836-80A0-32170243EA2A}.Release|Win32.Build.0 = Release|Win32 25 | EndGlobalSection 26 | GlobalSection(SolutionProperties) = preSolution 27 | HideSolutionNode = FALSE 28 | EndGlobalSection 29 | EndGlobal 30 | -------------------------------------------------------------------------------- /CertificateGenerator/platforms/win32/UA AnsiC Win32 Platform Layer.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /CertificateGenerator/platforms/win32/opcua_p_compilerinfo.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2011 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Foundation MIT License 1.00 5 | * 6 | * Permission is hereby granted, free of charge, to any person 7 | * obtaining a copy of this software and associated documentation 8 | * files (the "Software"), to deal in the Software without 9 | * restriction, including without limitation the rights to use, 10 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the 12 | * Software is furnished to do so, subject to the following 13 | * conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be 16 | * included in all copies or substantial portions of the Software. 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 19 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 24 | * OTHER DEALINGS IN THE SOFTWARE. 25 | * 26 | * The complete license agreement can be found here: 27 | * http://opcfoundation.org/License/MIT/1.00/ 28 | * ======================================================================*/ 29 | 30 | #ifndef _OpcUa_P_CompilerInfo_H_ 31 | #define _OpcUa_P_CompilerInfo_H_ 1 32 | 33 | /* compiler information constants */ 34 | #define OPCUA_P_COMPILERNAME_UNKNOWN "Unknown Compiler" 35 | #define OPCUA_P_COMPILERNAME_MSVC "Microsoft Visual C/C++" 36 | #define OPCUA_P_COMPILERNAME_MINGNUW "GNU C++/MINGW" 37 | #define OPCUA_P_COMPILERNAME_GNU "GNU C++" 38 | #define OPCUA_P_COMPILERNAME_INTEL "Intel C++" 39 | 40 | /* check for known compilers */ 41 | #if defined(_MSC_VER) 42 | 43 | /* compiler name */ 44 | # if defined(__INTEL_COMPILER) 45 | # define OPCUA_P_COMPILERNAME OPCUA_P_COMPILERNAME_INTEL 46 | # else 47 | # define OPCUA_P_COMPILERNAME OPCUA_P_COMPILERNAME_MSVC 48 | # endif 49 | /* compiler version */ 50 | # define OPCUA_P_COMPILERVERSION OPCUA_TOSTRING(_MSC_VER) 51 | 52 | #elif defined(__GNUC__) 53 | 54 | /* compiler name */ 55 | # if defined(__MINGW32__) 56 | # define OPCUA_P_COMPILERNAME OPCUA_P_COMPILERNAME_MINGNUW 57 | # elif defined(__INTEL_COMPILER) 58 | # define OPCUA_P_COMPILERNAME OPCUA_P_COMPILERNAME_INTEL 59 | # else 60 | # define OPCUA_P_COMPILERNAME OPCUA_P_COMPILERNAME_GNU 61 | # endif 62 | /* compiler version */ 63 | # define OPCUA_P_COMPILERVERSION OPCUA_TOSTRING(__GNUC__)"."OPCUA_TOSTRING(__GNUC_MINOR__) 64 | 65 | #else /* compiler */ 66 | 67 | /* compiler unknown */ 68 | # define OPCUA_P_COMPILERNAME OPCUA_P_COMPILERNAME_UNKNOWN 69 | # define OPCUA_P_COMPILERVERSION "0" 70 | 71 | #endif /* compiler */ 72 | 73 | /* create defines used by the stack */ 74 | #define OPCUA_P_COMPILERINFO OPCUA_P_COMPILERNAME " " OPCUA_P_COMPILERVERSION 75 | 76 | #endif /* _OpcUa_P_CompilerInfo_H_ */ 77 | -------------------------------------------------------------------------------- /CertificateGenerator/platforms/win32/opcua_p_cryptofactory.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2011 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Foundation MIT License 1.00 5 | * 6 | * Permission is hereby granted, free of charge, to any person 7 | * obtaining a copy of this software and associated documentation 8 | * files (the "Software"), to deal in the Software without 9 | * restriction, including without limitation the rights to use, 10 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the 12 | * Software is furnished to do so, subject to the following 13 | * conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be 16 | * included in all copies or substantial portions of the Software. 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 19 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 24 | * OTHER DEALINGS IN THE SOFTWARE. 25 | * 26 | * The complete license agreement can be found here: 27 | * http://opcfoundation.org/License/MIT/1.00/ 28 | * ======================================================================*/ 29 | 30 | #ifndef _OpcUa_P_CryptoFactory_H_ 31 | #define _OpcUa_P_CryptoFactory_H_ 1 32 | 33 | OPCUA_BEGIN_EXTERN_C 34 | 35 | /** 36 | @brief OpcUa_CryptoFactory_CreateCryptoProvider. 37 | 38 | @param securityPolicy [in] The security policy. 39 | @param pProvider [out] The resulting CryptoProvider. 40 | */ 41 | OpcUa_StatusCode OPCUA_DLLCALL OpcUa_P_CryptoFactory_CreateCryptoProvider( OpcUa_StringA Uri, 42 | OpcUa_CryptoProvider* pProvider); 43 | 44 | /** 45 | @brief OpcUa_CryptoFactory_DeleteCryptoProvider. 46 | 47 | @param pProvider [out] The resulting CryptoProvider. 48 | */ 49 | OpcUa_StatusCode OPCUA_DLLCALL OpcUa_P_CryptoFactory_DeleteCryptoProvider( OpcUa_CryptoProvider* pProvider); 50 | 51 | /*============================================================================ 52 | * The OpcUa_CryptoProvider interface. 53 | *===========================================================================*/ 54 | 55 | typedef struct _OpcUa_CryptoProviderConfig 56 | { 57 | OpcUa_Int32 SymmetricKeyLength; 58 | OpcUa_UInt32 MinimumAsymmetricKeyLength; 59 | OpcUa_UInt32 MaximumAsymmetricKeyLength; 60 | OpcUa_UInt32 DerivedEncryptionKeyLength; 61 | OpcUa_UInt32 DerivedSignatureKeyLength; 62 | 63 | OpcUa_Void* WindowsCryptoProvHandle; /* Windows CryptoProvider Handle ->wincrypt.h */ 64 | } 65 | OpcUa_CryptoProviderConfig; 66 | 67 | 68 | OPCUA_END_EXTERN_C 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /CertificateGenerator/platforms/win32/opcua_p_guid.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2011 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Foundation MIT License 1.00 5 | * 6 | * Permission is hereby granted, free of charge, to any person 7 | * obtaining a copy of this software and associated documentation 8 | * files (the "Software"), to deal in the Software without 9 | * restriction, including without limitation the rights to use, 10 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the 12 | * Software is furnished to do so, subject to the following 13 | * conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be 16 | * included in all copies or substantial portions of the Software. 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 19 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 24 | * OTHER DEALINGS IN THE SOFTWARE. 25 | * 26 | * The complete license agreement can be found here: 27 | * http://opcfoundation.org/License/MIT/1.00/ 28 | * ======================================================================*/ 29 | 30 | /******************************************************************************************************/ 31 | /* Platform Portability Layer */ 32 | /* Modify the content of this file according to the socket implementation on your system. */ 33 | /******************************************************************************************************/ 34 | 35 | /*============================================================================ 36 | * CreateGuid 37 | *===========================================================================*/ 38 | /** 39 | * Create a GUID in binary format. 40 | */ 41 | OpcUa_Guid* OPCUA_DLLCALL OpcUa_P_Guid_Create(OpcUa_Guid* Guid); 42 | -------------------------------------------------------------------------------- /CertificateGenerator/platforms/win32/opcua_p_libxml2.c: -------------------------------------------------------------------------------- 1 | /*============================================================================ 2 | @file opcua_p_libxml2.c 3 | 4 | (c) Copyright 2005-2008 The OPC Foundation 5 | ALL RIGHTS RESERVED. 6 | 7 | DISCLAIMER: 8 | This code is provided by the OPC Foundation solely to assist in 9 | understanding and use of the appropriate OPC Specification(s) and may be 10 | used as set forth in the License Grant section of the OPC Specification. 11 | This code is provided as-is and without warranty or support of any sort 12 | and is subject to the Warranty and Liability Disclaimers which appear 13 | in the printed OPC Specification. 14 | */ 15 | 16 | /* UA platform definitions */ 17 | #include 18 | 19 | #ifdef OPCUA_HAVE_XMLAPI 20 | 21 | /* Libxml2 headers */ 22 | #include 23 | 24 | /* own header */ 25 | #include 26 | 27 | /*============================================================================ 28 | * OpcUa_P_Libxml2_Initialize 29 | *===========================================================================*/ 30 | OpcUa_Void OpcUa_P_Libxml2_Initialize() 31 | { 32 | LIBXML_TEST_VERSION 33 | } 34 | 35 | /*============================================================================ 36 | * OpcUa_P_Libxml2_Cleanup 37 | *===========================================================================*/ 38 | OpcUa_Void OpcUa_P_Libxml2_Cleanup() 39 | { 40 | xmlCleanupParser(); 41 | } 42 | 43 | #endif /* OPCUA_HAVE_XMLAPI */ -------------------------------------------------------------------------------- /CertificateGenerator/platforms/win32/opcua_p_memory.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2011 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Foundation MIT License 1.00 5 | * 6 | * Permission is hereby granted, free of charge, to any person 7 | * obtaining a copy of this software and associated documentation 8 | * files (the "Software"), to deal in the Software without 9 | * restriction, including without limitation the rights to use, 10 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the 12 | * Software is furnished to do so, subject to the following 13 | * conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be 16 | * included in all copies or substantial portions of the Software. 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 19 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 24 | * OTHER DEALINGS IN THE SOFTWARE. 25 | * 26 | * The complete license agreement can be found here: 27 | * http://opcfoundation.org/License/MIT/1.00/ 28 | * ======================================================================*/ 29 | 30 | #ifndef _OpcUa_P_Memory_H_ 31 | #define _OpcUa_P_Memory_H_ 1 32 | 33 | OPCUA_BEGIN_EXTERN_C 34 | 35 | /** 36 | * @see OpcUa_Memory_Alloc 37 | */ 38 | OpcUa_Void* OPCUA_DLLCALL OpcUa_P_Memory_Alloc( OpcUa_UInt32 nSize); 39 | 40 | /** 41 | * @brief Reallocates a new block of memory 42 | * 43 | * @param pBuffer [in] The existing memory block. 44 | * @param nSize [in] The size of the block to allocate. 45 | */ 46 | OpcUa_Void* OPCUA_DLLCALL OpcUa_P_Memory_ReAlloc( OpcUa_Void* pBuffer, 47 | OpcUa_UInt32 nSize); 48 | 49 | /** 50 | * @see OpcUa_Memory_Free 51 | */ 52 | OpcUa_Void OPCUA_DLLCALL OpcUa_P_Memory_Free( OpcUa_Void* pvBuffer); 53 | 54 | /** 55 | * @see OpcUa_Memory_MemCpy 56 | */ 57 | OpcUa_StatusCode OPCUA_DLLCALL OpcUa_P_Memory_MemCpy( OpcUa_Void* pBuffer, 58 | OpcUa_UInt32 nSizeInBytes, 59 | OpcUa_Void* pSource, 60 | OpcUa_UInt32 nCount); 61 | 62 | OPCUA_END_EXTERN_C 63 | 64 | #endif /* _OpcUa_P_Memory_H_ */ 65 | -------------------------------------------------------------------------------- /CertificateGenerator/platforms/win32/opcua_p_pkifactory.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2011 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Foundation MIT License 1.00 5 | * 6 | * Permission is hereby granted, free of charge, to any person 7 | * obtaining a copy of this software and associated documentation 8 | * files (the "Software"), to deal in the Software without 9 | * restriction, including without limitation the rights to use, 10 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the 12 | * Software is furnished to do so, subject to the following 13 | * conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be 16 | * included in all copies or substantial portions of the Software. 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 19 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 24 | * OTHER DEALINGS IN THE SOFTWARE. 25 | * 26 | * The complete license agreement can be found here: 27 | * http://opcfoundation.org/License/MIT/1.00/ 28 | * ======================================================================*/ 29 | 30 | #ifndef _OpcUa_P_PKIFactory_H_ 31 | #define _OpcUa_P_PKIFactory_H_ 1 32 | 33 | OPCUA_BEGIN_EXTERN_C 34 | /** 35 | @brief 36 | */ 37 | OpcUa_StatusCode OPCUA_DLLCALL OpcUa_P_PKIFactory_CreatePKIProvider( OpcUa_Void* pCertificateStoreConfig, 38 | OpcUa_PKIProvider* pProvider); 39 | 40 | /** 41 | @brief 42 | */ 43 | OpcUa_StatusCode OPCUA_DLLCALL OpcUa_P_PKIFactory_DeletePKIProvider( OpcUa_PKIProvider* pProvider); 44 | 45 | OPCUA_END_EXTERN_C 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /CertificateGenerator/platforms/win32/opcua_p_semaphore.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2011 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Foundation MIT License 1.00 5 | * 6 | * Permission is hereby granted, free of charge, to any person 7 | * obtaining a copy of this software and associated documentation 8 | * files (the "Software"), to deal in the Software without 9 | * restriction, including without limitation the rights to use, 10 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the 12 | * Software is furnished to do so, subject to the following 13 | * conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be 16 | * included in all copies or substantial portions of the Software. 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 19 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 24 | * OTHER DEALINGS IN THE SOFTWARE. 25 | * 26 | * The complete license agreement can be found here: 27 | * http://opcfoundation.org/License/MIT/1.00/ 28 | * ======================================================================*/ 29 | 30 | /******************************************************************************************************/ 31 | /* Platform Portability Layer */ 32 | /******************************************************************************************************/ 33 | 34 | 35 | OpcUa_StatusCode OPCUA_DLLCALL OpcUa_P_Semaphore_Create( OpcUa_Semaphore* phRawSemaphore, 36 | OpcUa_UInt32 uInitalValue, 37 | OpcUa_UInt32 uMaxRange); 38 | 39 | OpcUa_Void OPCUA_DLLCALL OpcUa_P_Semaphore_Delete( OpcUa_Semaphore* phRawSemaphore); 40 | 41 | OpcUa_StatusCode OPCUA_DLLCALL OpcUa_P_Semaphore_Wait( OpcUa_Semaphore hRawSemaphore); 42 | 43 | OpcUa_StatusCode OPCUA_DLLCALL OpcUa_P_Semaphore_TimedWait(OpcUa_Semaphore hRawSemaphore, 44 | OpcUa_UInt32 msecTimeout); 45 | 46 | OpcUa_StatusCode OPCUA_DLLCALL OpcUa_P_Semaphore_Post( OpcUa_Semaphore hRawSemaphore, 47 | OpcUa_UInt32 uReleaseCount); 48 | -------------------------------------------------------------------------------- /CertificateGenerator/platforms/win32/opcua_p_trace.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2011 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Foundation MIT License 1.00 5 | * 6 | * Permission is hereby granted, free of charge, to any person 7 | * obtaining a copy of this software and associated documentation 8 | * files (the "Software"), to deal in the Software without 9 | * restriction, including without limitation the rights to use, 10 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the 12 | * Software is furnished to do so, subject to the following 13 | * conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be 16 | * included in all copies or substantial portions of the Software. 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 19 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 24 | * OTHER DEALINGS IN THE SOFTWARE. 25 | * 26 | * The complete license agreement can be found here: 27 | * http://opcfoundation.org/License/MIT/1.00/ 28 | * ======================================================================*/ 29 | 30 | /******************************************************************************************************/ 31 | /* Platform Portability Layer */ 32 | /******************************************************************************************************/ 33 | 34 | /*============================================================================ 35 | * Trace Initialize 36 | *===========================================================================*/ 37 | /** 38 | * Initialize all ressources needed for tracing. 39 | */ 40 | OpcUa_StatusCode OPCUA_DLLCALL OpcUa_P_Trace_Initialize(void); 41 | 42 | /*============================================================================ 43 | * Trace Initialize 44 | *===========================================================================*/ 45 | /** 46 | * Clear all ressources needed for tracing. 47 | */ 48 | OpcUa_Void OPCUA_DLLCALL OpcUa_P_Trace_Clear(void); 49 | 50 | /*============================================================================ 51 | * Tracefunction 52 | *===========================================================================*/ 53 | /** 54 | * Writes the given string to the trace device, if the given trace level is 55 | * activated in the header file. 56 | */ 57 | OpcUa_Void OPCUA_DLLCALL OpcUa_P_Trace(OpcUa_CharA* sFormat); 58 | -------------------------------------------------------------------------------- /CertificateGenerator/platforms/win32/opcua_p_utilities.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2011 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Foundation MIT License 1.00 5 | * 6 | * Permission is hereby granted, free of charge, to any person 7 | * obtaining a copy of this software and associated documentation 8 | * files (the "Software"), to deal in the Software without 9 | * restriction, including without limitation the rights to use, 10 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the 12 | * Software is furnished to do so, subject to the following 13 | * conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be 16 | * included in all copies or substantial portions of the Software. 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 19 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 24 | * OTHER DEALINGS IN THE SOFTWARE. 25 | * 26 | * The complete license agreement can be found here: 27 | * http://opcfoundation.org/License/MIT/1.00/ 28 | * ======================================================================*/ 29 | 30 | #ifndef _OpcUa_P_Utilities_H_ 31 | #define _OpcUa_P_Utilities_H_ 1 32 | 33 | OPCUA_BEGIN_EXTERN_C 34 | 35 | /** 36 | * @see OpcUa_P_QSort 37 | */ 38 | OpcUa_Void OPCUA_DLLCALL OpcUa_P_QSort( OpcUa_Void* pElements, 39 | OpcUa_UInt32 nElementCount, 40 | OpcUa_UInt32 nElementSize, 41 | OpcUa_PfnCompare* pfnCompare, 42 | OpcUa_Void* pContext); 43 | 44 | /** 45 | * @see OpcUa_P_BSearch 46 | */ 47 | OpcUa_Void* OPCUA_DLLCALL OpcUa_P_BSearch( OpcUa_Void* pKey, 48 | OpcUa_Void* pElements, 49 | OpcUa_UInt32 nElementCount, 50 | OpcUa_UInt32 nElementSize, 51 | OpcUa_PfnCompare* pfnCompare, 52 | OpcUa_Void* pContext); 53 | 54 | /** 55 | * @see OpcUa_P_GetLastError 56 | */ 57 | OpcUa_UInt32 OPCUA_DLLCALL OpcUa_P_GetLastError(void); 58 | 59 | /** 60 | * @see OpcUa_P_GetTickCount 61 | */ 62 | OpcUa_UInt32 OPCUA_DLLCALL OpcUa_P_GetTickCount(void); 63 | 64 | /** 65 | * @see OpcUa_P_CharAToInt 66 | */ 67 | OpcUa_Int32 OPCUA_DLLCALL OpcUa_P_CharAToInt( OpcUa_StringA sValue); 68 | 69 | /** 70 | * @see OpcUa_P_ParseUrl 71 | */ 72 | OpcUa_StatusCode OpcUa_P_ParseUrl( OpcUa_StringA psUrl, 73 | OpcUa_StringA* psIpAdress, 74 | OpcUa_UInt16* puPort); 75 | 76 | OPCUA_END_EXTERN_C 77 | 78 | #endif /* _OpcUa_P_Utilities_H_ */ 79 | -------------------------------------------------------------------------------- /CertificateGenerator/platforms/win32/opcua_p_wincrypt.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2011 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Foundation MIT License 1.00 5 | * 6 | * Permission is hereby granted, free of charge, to any person 7 | * obtaining a copy of this software and associated documentation 8 | * files (the "Software"), to deal in the Software without 9 | * restriction, including without limitation the rights to use, 10 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the 12 | * Software is furnished to do so, subject to the following 13 | * conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be 16 | * included in all copies or substantial portions of the Software. 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 19 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 24 | * OTHER DEALINGS IN THE SOFTWARE. 25 | * 26 | * The complete license agreement can be found here: 27 | * http://opcfoundation.org/License/MIT/1.00/ 28 | * ======================================================================*/ 29 | 30 | #ifndef _OpcUa_P_WinCrypt_H_ 31 | #define _OpcUa_P_WinCrypt_H_ 1 32 | 33 | OPCUA_BEGIN_EXTERN_C 34 | 35 | /** 36 | @brief Initializes the WinCrypt library. 37 | */ 38 | OpcUa_StatusCode OpcUa_P_WinCrypt_Initialize(); 39 | 40 | /** 41 | @brief Initializes the WinCrypt library. 42 | */ 43 | OpcUa_StatusCode OpcUa_P_WinCrypt_Cleanup(); 44 | 45 | /** 46 | @brief Adds random data to the destination buffer.. 47 | 48 | if keyLen > 0 then random data of the given length is generated. 49 | if keyLen == 0 then nothing will be generated. 50 | if keyLen < 0 then default setting from the CryptoProvider is used. 51 | 52 | if there are no default settings then an error is returned. 53 | 54 | @param pProvider [in] The crypto provider handle. 55 | @param keyLen [in] The desired length of the random key. 56 | 57 | @param pKey [out] The generated random key. 58 | */ 59 | OpcUa_StatusCode OpcUa_P_WinCrypt_Random_Key_Generate( OpcUa_CryptoProvider* pProvider, 60 | OpcUa_Int32 keyLen, 61 | OpcUa_Key* pKey); 62 | 63 | OPCUA_END_EXTERN_C 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /CertificateGenerator/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Resource.rc 4 | 5 | // Next default values for new objects 6 | // 7 | #ifdef APSTUDIO_INVOKED 8 | #ifndef APSTUDIO_READONLY_SYMBOLS 9 | #define _APS_NEXT_RESOURCE_VALUE 101 10 | #define _APS_NEXT_COMMAND_VALUE 40001 11 | #define _APS_NEXT_CONTROL_VALUE 1001 12 | #define _APS_NEXT_SYMED_VALUE 101 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /CertificateGenerator/stackcore/opcua_decoder.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2011 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Reciprocal Community License ("RCL") Version 1.00 5 | * 6 | * Unless explicitly acquired and licensed from Licensor under another 7 | * license, the contents of this file are subject to the Reciprocal 8 | * Community License ("RCL") Version 1.00, or subsequent versions as 9 | * allowed by the RCL, and You may not copy or use this file in either 10 | * source code or executable form, except in compliance with the terms and 11 | * conditions of the RCL. 12 | * 13 | * All software distributed under the RCL is provided strictly on an 14 | * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, 15 | * AND LICENSOR HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT 16 | * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 17 | * PURPOSE, QUIET ENJOYMENT, OR NON-INFRINGEMENT. See the RCL for specific 18 | * language governing rights and limitations under the RCL. 19 | * 20 | * The complete license agreement can be found here: 21 | * http://opcfoundation.org/License/RCL/1.00/ 22 | * ======================================================================*/ 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | /*============================================================================ 29 | * OpcUa_Decoder_Close 30 | *===========================================================================*/ 31 | OpcUa_Void OpcUa_Decoder_Close( 32 | struct _OpcUa_Decoder* a_pDecoder, 33 | OpcUa_Handle* a_phDecodeContext) 34 | { 35 | if (a_pDecoder != OpcUa_Null && a_pDecoder->Delete != OpcUa_Null) 36 | { 37 | a_pDecoder->Close(a_pDecoder, a_phDecodeContext); 38 | } 39 | } 40 | 41 | /*============================================================================ 42 | * OpcUa_Decoder_Delete 43 | *===========================================================================*/ 44 | OpcUa_Void OpcUa_Decoder_Delete( 45 | struct _OpcUa_Decoder** a_ppDecoder) 46 | { 47 | if (a_ppDecoder != OpcUa_Null && *a_ppDecoder != OpcUa_Null && (*a_ppDecoder)->Delete != OpcUa_Null) 48 | { 49 | (*a_ppDecoder)->Delete(a_ppDecoder); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /CertificateGenerator/stackcore/opcua_encoder.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2011 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Reciprocal Community License ("RCL") Version 1.00 5 | * 6 | * Unless explicitly acquired and licensed from Licensor under another 7 | * license, the contents of this file are subject to the Reciprocal 8 | * Community License ("RCL") Version 1.00, or subsequent versions as 9 | * allowed by the RCL, and You may not copy or use this file in either 10 | * source code or executable form, except in compliance with the terms and 11 | * conditions of the RCL. 12 | * 13 | * All software distributed under the RCL is provided strictly on an 14 | * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, 15 | * AND LICENSOR HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT 16 | * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 17 | * PURPOSE, QUIET ENJOYMENT, OR NON-INFRINGEMENT. See the RCL for specific 18 | * language governing rights and limitations under the RCL. 19 | * 20 | * The complete license agreement can be found here: 21 | * http://opcfoundation.org/License/RCL/1.00/ 22 | * ======================================================================*/ 23 | 24 | #include 25 | #include 26 | 27 | /*============================================================================ 28 | * OpcUa_Encoder_Close 29 | *===========================================================================*/ 30 | OpcUa_Void OpcUa_Encoder_Close( 31 | struct _OpcUa_Encoder* a_pEncoder, 32 | OpcUa_Handle* a_phEncodeContext) 33 | { 34 | if (a_pEncoder != OpcUa_Null && a_pEncoder->Delete != OpcUa_Null) 35 | { 36 | a_pEncoder->Close(a_pEncoder, a_phEncodeContext); 37 | } 38 | } 39 | 40 | /*============================================================================ 41 | * OpcUa_Encoder_Delete 42 | *===========================================================================*/ 43 | OpcUa_Void OpcUa_Encoder_Delete( 44 | struct _OpcUa_Encoder** a_ppEncoder) 45 | { 46 | if (a_ppEncoder != OpcUa_Null && *a_ppEncoder != OpcUa_Null && (*a_ppEncoder)->Delete != OpcUa_Null) 47 | { 48 | (*a_ppEncoder)->Delete(a_ppEncoder); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /CertificateGenerator/stackcore/opcua_enumeratedtype.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2011 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Foundation MIT License 1.00 5 | * 6 | * Permission is hereby granted, free of charge, to any person 7 | * obtaining a copy of this software and associated documentation 8 | * files (the "Software"), to deal in the Software without 9 | * restriction, including without limitation the rights to use, 10 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the 12 | * Software is furnished to do so, subject to the following 13 | * conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be 16 | * included in all copies or substantial portions of the Software. 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 19 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 24 | * OTHER DEALINGS IN THE SOFTWARE. 25 | * 26 | * The complete license agreement can be found here: 27 | * http://opcfoundation.org/License/MIT/1.00/ 28 | * ======================================================================*/ 29 | 30 | #ifndef _OpcUa_EnumeratedType_H_ 31 | #define _OpcUa_EnumeratedType_H_ 1 32 | 33 | OPCUA_BEGIN_EXTERN_C 34 | 35 | /** 36 | @brief Describes an enumerated valie. 37 | */ 38 | typedef struct _OpcUa_EnumeratedValue 39 | { 40 | /*! @brief The name. */ 41 | OpcUa_StringA Name; 42 | 43 | /*! @brief The value associated with the name. */ 44 | OpcUa_Int32 Value; 45 | } 46 | OpcUa_EnumeratedValue; 47 | 48 | /** 49 | @brief Describes an enumerated type. 50 | */ 51 | typedef struct _OpcUa_EnumeratedType 52 | { 53 | /*! @brief The name of the enumerated type. */ 54 | OpcUa_StringA TypeName; 55 | 56 | /*! @brief A null terminated list of values. */ 57 | OpcUa_EnumeratedValue* Values; 58 | } 59 | OpcUa_EnumeratedType; 60 | 61 | /** 62 | @brief Finds the name associated with a value of an enumerated type. 63 | 64 | @param pType [in] The enumerated type to search. 65 | @param nValue [in] The value to look for. 66 | @param pName [out] The name associated with the value. 67 | */ 68 | OPCUA_EXPORT OpcUa_StatusCode OpcUa_EnumeratedType_FindName( 69 | OpcUa_EnumeratedType* pType, 70 | OpcUa_Int32 nValue, 71 | OpcUa_StringA* pName); 72 | 73 | /** 74 | @brief Finds the value associated with a name for an enumerated type. 75 | 76 | @param pType [in] The enumerated type to search. 77 | @param sName [in] The name to look for. 78 | @param pValue [out] The value associated with the name. 79 | */ 80 | OPCUA_EXPORT OpcUa_StatusCode OpcUa_EnumeratedType_FindValue( 81 | OpcUa_EnumeratedType* pType, 82 | OpcUa_StringA sName, 83 | OpcUa_Int32* pValue); 84 | 85 | OPCUA_END_EXTERN_C 86 | 87 | #endif /* _OpcUa_EnumeratedType_H_ */ 88 | -------------------------------------------------------------------------------- /CertificateGenerator/stackcore/opcua_extensionobject.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2011 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Reciprocal Community License ("RCL") Version 1.00 5 | * 6 | * Unless explicitly acquired and licensed from Licensor under another 7 | * license, the contents of this file are subject to the Reciprocal 8 | * Community License ("RCL") Version 1.00, or subsequent versions as 9 | * allowed by the RCL, and You may not copy or use this file in either 10 | * source code or executable form, except in compliance with the terms and 11 | * conditions of the RCL. 12 | * 13 | * All software distributed under the RCL is provided strictly on an 14 | * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, 15 | * AND LICENSOR HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT 16 | * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 17 | * PURPOSE, QUIET ENJOYMENT, OR NON-INFRINGEMENT. See the RCL for specific 18 | * language governing rights and limitations under the RCL. 19 | * 20 | * The complete license agreement can be found here: 21 | * http://opcfoundation.org/License/RCL/1.00/ 22 | * ======================================================================*/ 23 | 24 | #include 25 | #include 26 | -------------------------------------------------------------------------------- /CertificateGenerator/stackcore/opcua_extensionobject.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2011 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Foundation MIT License 1.00 5 | * 6 | * Permission is hereby granted, free of charge, to any person 7 | * obtaining a copy of this software and associated documentation 8 | * files (the "Software"), to deal in the Software without 9 | * restriction, including without limitation the rights to use, 10 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the 12 | * Software is furnished to do so, subject to the following 13 | * conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be 16 | * included in all copies or substantial portions of the Software. 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 19 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 24 | * OTHER DEALINGS IN THE SOFTWARE. 25 | * 26 | * The complete license agreement can be found here: 27 | * http://opcfoundation.org/License/MIT/1.00/ 28 | * ======================================================================*/ 29 | 30 | #ifndef _OpcUa_ExtensionObject_H_ 31 | #define _OpcUa_ExtensionObject_H_ 1 32 | 33 | #include 34 | 35 | OPCUA_BEGIN_EXTERN_C 36 | 37 | OPCUA_END_EXTERN_C 38 | 39 | #endif /* _OpcUa_ExtensionObject_H_ */ 40 | -------------------------------------------------------------------------------- /CertificateGenerator/stackcore/opcua_messagecontext.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2011 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Reciprocal Community License ("RCL") Version 1.00 5 | * 6 | * Unless explicitly acquired and licensed from Licensor under another 7 | * license, the contents of this file are subject to the Reciprocal 8 | * Community License ("RCL") Version 1.00, or subsequent versions as 9 | * allowed by the RCL, and You may not copy or use this file in either 10 | * source code or executable form, except in compliance with the terms and 11 | * conditions of the RCL. 12 | * 13 | * All software distributed under the RCL is provided strictly on an 14 | * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, 15 | * AND LICENSOR HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT 16 | * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 17 | * PURPOSE, QUIET ENJOYMENT, OR NON-INFRINGEMENT. See the RCL for specific 18 | * language governing rights and limitations under the RCL. 19 | * 20 | * The complete license agreement can be found here: 21 | * http://opcfoundation.org/License/RCL/1.00/ 22 | * ======================================================================*/ 23 | 24 | #include 25 | #include 26 | 27 | /*============================================================================ 28 | * OpcUa_MessageContext_Initialize 29 | *===========================================================================*/ 30 | OpcUa_Void OpcUa_MessageContext_Initialize(OpcUa_MessageContext* a_pContext) 31 | { 32 | if (a_pContext != OpcUa_Null) 33 | { 34 | OpcUa_MemSet(a_pContext, 0, sizeof(OpcUa_MessageContext)); 35 | 36 | a_pContext->MaxArrayLength = OpcUa_ProxyStub_g_Configuration.iSerializer_MaxArrayLength; 37 | a_pContext->MaxStringLength = OpcUa_ProxyStub_g_Configuration.iSerializer_MaxStringLength; 38 | a_pContext->MaxByteStringLength = OpcUa_ProxyStub_g_Configuration.iSerializer_MaxByteStringLength; 39 | a_pContext->MaxMessageLength = OpcUa_ProxyStub_g_Configuration.iSerializer_MaxMessageSize; 40 | } 41 | } 42 | 43 | /*============================================================================ 44 | * OpcUa_MessageContext_Initialize 45 | *===========================================================================*/ 46 | OpcUa_Void OpcUa_MessageContext_Clear(OpcUa_MessageContext* a_pContext) 47 | { 48 | if (a_pContext != OpcUa_Null) 49 | { 50 | OpcUa_MemSet(a_pContext, 0, sizeof(OpcUa_MessageContext)); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /CertificateGenerator/stackcore/opcua_stackcore.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /CertificateGenerator/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0500 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /CertificateGenerator/utils.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* System Headers */ 3 | #include 4 | #include 5 | 6 | /* UA platform definitions */ 7 | #include 8 | 9 | /*============================================================================ 10 | * CreateGuid 11 | *===========================================================================*/ 12 | OpcUa_Guid* OpcUa_P_Guid_Create(OpcUa_Guid* Guid) 13 | { 14 | if (UuidCreate((UUID*)Guid) != RPC_S_OK) 15 | { 16 | Guid = OpcUa_Null; 17 | return OpcUa_Null; 18 | } 19 | 20 | return Guid; 21 | } 22 | 23 | /*============================================================================ 24 | * Calculate DateTime Difference In Seconds (Rounded) 25 | *===========================================================================*/ 26 | OpcUa_StatusCode OpcUa_P_GetDateTimeDiffInSeconds32( 27 | OpcUa_DateTime a_Value1, 28 | OpcUa_DateTime a_Value2, 29 | OpcUa_Int32* a_pDifference) 30 | { 31 | INT64 llValue1 = 0; 32 | INT64 llValue2 = 0; 33 | INT64 llResult = 0; 34 | 35 | OpcUa_ReturnErrorIfArgumentNull(a_pDifference); 36 | 37 | *a_pDifference = (OpcUa_Int32)0; 38 | 39 | llValue1 = a_Value1.dwHighDateTime; 40 | llValue1 = (llValue1 << 32) + a_Value1.dwLowDateTime; 41 | 42 | llValue2 = a_Value2.dwHighDateTime; 43 | llValue2 = (llValue2 << 32) + a_Value2.dwLowDateTime; 44 | 45 | llResult = llValue2 - llValue1; 46 | llResult /= 10000000; 47 | 48 | if (llResult < OpcUa_Int32_Min || llResult > OpcUa_Int32_Max) 49 | { 50 | return OpcUa_BadOutOfRange; 51 | } 52 | 53 | *a_pDifference = (OpcUa_Int32)llResult; 54 | 55 | return OpcUa_Good; 56 | } 57 | 58 | /*============================================================================ 59 | * The OpcUa_UtcNow function (returns the time in OpcUa_DateTime format) 60 | *===========================================================================*/ 61 | OpcUa_DateTime OpcUa_P_DateTime_UtcNow() 62 | { 63 | FILETIME ftTime; 64 | 65 | OpcUa_DateTime tmpDateTime; 66 | 67 | GetSystemTimeAsFileTime(&ftTime); 68 | 69 | tmpDateTime.dwHighDateTime = (OpcUa_UInt32)ftTime.dwHighDateTime; 70 | tmpDateTime.dwLowDateTime = (OpcUa_UInt32)ftTime.dwLowDateTime; 71 | 72 | return tmpDateTime; 73 | } 74 | -------------------------------------------------------------------------------- /Stack/Core/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1996-2016, OPC Foundation. All rights reserved. 2 | 3 | The source code in this file is covered under a dual-license scenario: 4 | - RCL: for OPC Foundation members in good-standing 5 | - GPL V2: everybody else 6 | 7 | RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ 8 | 9 | GNU General Public License as published by the Free Software Foundation; 10 | version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 11 | 12 | This source code is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | */ 16 | 17 | using System; 18 | using System.Reflection; 19 | using System.Runtime.CompilerServices; 20 | using System.Runtime.InteropServices; 21 | 22 | [assembly: CLSCompliant(false)] 23 | 24 | [assembly: AssemblyTitle("Opc.Ua.Core")] 25 | [assembly: AssemblyDescription("OPC UA Core Class Library")] 26 | [assembly: AssemblyCompany("OPC Foundation")] 27 | [assembly: AssemblyProduct("OPC UA SDK")] 28 | [assembly: AssemblyCopyright(AssemblyVersionInfo.Copyright)] 29 | 30 | [assembly: ComVisible(false)] 31 | [assembly: Guid("b59483cd-5ba9-4e53-8451-5ab7e1edd192")] 32 | 33 | [assembly: AssemblyVersion(AssemblyVersionInfo.CurrentVersion)] 34 | [assembly: AssemblyFileVersion(AssemblyVersionInfo.CurrentFileVersion)] 35 | -------------------------------------------------------------------------------- /Stack/Core/Properties/AssemblyVersionInfo.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1996-2016, OPC Foundation. All rights reserved. 2 | 3 | The source code in this file is covered under a dual-license scenario: 4 | - RCL: for OPC Foundation members in good-standing 5 | - GPL V2: everybody else 6 | 7 | RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ 8 | 9 | GNU General Public License as published by the Free Software Foundation; 10 | version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 11 | 12 | This source code is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | using System.Text; 20 | 21 | /// 22 | /// Defines string constants for SDK version information. 23 | /// 24 | internal static class AssemblyVersionInfo 25 | { 26 | /// 27 | /// The current copy right notice. 28 | /// 29 | public const string Copyright = "Copyright © 2004-2016 OPC Foundation, Inc"; 30 | 31 | /// 32 | /// The current build version. 33 | /// 34 | public const string CurrentVersion = "1.03.340.0"; 35 | 36 | /// 37 | /// The current build file version. 38 | /// 39 | public const string CurrentFileVersion = "1.03.340.0"; 40 | } 41 | -------------------------------------------------------------------------------- /Stack/Core/Schema/AttributeIds.csv: -------------------------------------------------------------------------------- 1 | NodeId,1 2 | NodeClass,2 3 | BrowseName,3 4 | DisplayName,4 5 | Description,5 6 | WriteMask,6 7 | UserWriteMask,7 8 | IsAbstract,8 9 | Symmetric,9 10 | InverseName,10 11 | ContainsNoLoops,11 12 | EventNotifier,12 13 | Value,13 14 | DataType,14 15 | ValueRank,15 16 | ArrayDimensions,16 17 | AccessLevel,17 18 | UserAccessLevel,18 19 | MinimumSamplingInterval,19 20 | Historizing,20 21 | Executable,21 22 | UserExecutable,22 23 | -------------------------------------------------------------------------------- /Stack/Core/Schema/BuildSchema.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal 3 | 4 | echo Processing NodeSet Schema 5 | xsd /classes /n:Opc.Ua.Export UANodeSet.xsd 6 | 7 | echo #pragma warning disable 1591 > temp.txt 8 | type UANodeSet.cs >> temp.txt 9 | type temp.txt > UANodeSet.cs 10 | 11 | echo Processing SecuredApplication Schema 12 | svcutil /dconly /namespace:*,Opc.Ua.Security /out:SecuredApplication.cs SecuredApplication.xsd 13 | 14 | echo #pragma warning disable 1591 > temp.txt 15 | type SecuredApplication.cs >> temp.txt 16 | type temp.txt > SecuredApplication.cs 17 | -------------------------------------------------------------------------------- /Stack/Core/Schema/UAVariant.xsd: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Stack/Core/Security/Certificates/EncryptedData.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1996-2016, OPC Foundation. All rights reserved. 2 | 3 | The source code in this file is covered under a dual-license scenario: 4 | - RCL: for OPC Foundation members in good-standing 5 | - GPL V2: everybody else 6 | 7 | RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ 8 | 9 | GNU General Public License as published by the Free Software Foundation; 10 | version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 11 | 12 | This source code is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | using System.Xml; 20 | using System.ServiceModel; 21 | using System.Runtime.Serialization; 22 | 23 | namespace Opc.Ua 24 | { 25 | /// 26 | /// Stores a block of encypted data. 27 | /// 28 | public class EncryptedData 29 | { 30 | #region Private Members 31 | /// 32 | /// The algorithm used to encrypt the data. 33 | /// 34 | public string Algorithm 35 | { 36 | get { return m_algorithm; } 37 | set { m_algorithm = value; } 38 | } 39 | 40 | /// 41 | /// The encrypted data. 42 | /// 43 | public byte[] Data 44 | { 45 | get { return m_data; } 46 | set { m_data = value; } 47 | } 48 | #endregion 49 | 50 | #region Private Members 51 | private string m_algorithm; 52 | private byte[] m_data; 53 | #endregion 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Stack/Core/Security/Certificates/SecurityConfiguration.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1996-2016, OPC Foundation. All rights reserved. 2 | 3 | The source code in this file is covered under a dual-license scenario: 4 | - RCL: for OPC Foundation members in good-standing 5 | - GPL V2: everybody else 6 | 7 | RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ 8 | 9 | GNU General Public License as published by the Free Software Foundation; 10 | version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 11 | 12 | This source code is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | using System.Configuration; 20 | using System.IO; 21 | using System.Runtime.Serialization; 22 | using System.Security.Cryptography.X509Certificates; 23 | using System.Text; 24 | using System.Xml; 25 | 26 | namespace Opc.Ua 27 | { 28 | #region SecurityConfiguration Class 29 | /// 30 | /// The security configuration for the application. 31 | /// 32 | public partial class SecurityConfiguration 33 | { 34 | #region Public Methods 35 | /// 36 | /// Adds a certificate as a trusted peer. 37 | /// 38 | public void AddTrustedPeer(byte[] certificate) 39 | { 40 | this.TrustedPeerCertificates.TrustedCertificates.Add(new CertificateIdentifier(certificate)); 41 | } 42 | 43 | /// 44 | /// Validates the security configuration. 45 | /// 46 | public void Validate() 47 | { 48 | if (m_applicationCertificate == null) 49 | { 50 | throw ServiceResultException.Create(StatusCodes.BadConfigurationError, "ApplicationCertificate must be specified."); 51 | } 52 | 53 | TrustedIssuerCertificates = CreateDefaultTrustList(TrustedIssuerCertificates); 54 | TrustedPeerCertificates = CreateDefaultTrustList(TrustedPeerCertificates); 55 | 56 | //set a default rejected certificate store. 57 | if (RejectedCertificateStore == null) 58 | { 59 | RejectedCertificateStore = new CertificateStoreIdentifier(); 60 | RejectedCertificateStore.StoreType = CertificateStoreType.Directory; 61 | RejectedCertificateStore.StorePath = "%CommonApplicationData%\\OPC Foundation\\CertificateStores\\RejectedCertificates"; 62 | } 63 | } 64 | 65 | /// 66 | /// Ensure valid trust lists. 67 | /// 68 | private CertificateTrustList CreateDefaultTrustList(CertificateTrustList trustList) 69 | { 70 | if (trustList != null) 71 | { 72 | if (trustList.StorePath != null) 73 | { 74 | return trustList; 75 | } 76 | } 77 | 78 | return new CertificateTrustList(); 79 | } 80 | #endregion 81 | } 82 | #endregion 83 | } 84 | -------------------------------------------------------------------------------- /Stack/Core/Stack/Bindings/BaseBinding.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1996-2016, OPC Foundation. All rights reserved. 2 | 3 | The source code in this file is covered under a dual-license scenario: 4 | - RCL: for OPC Foundation members in good-standing 5 | - GPL V2: everybody else 6 | 7 | RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ 8 | 9 | GNU General Public License as published by the Free Software Foundation; 10 | version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 11 | 12 | This source code is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | using System.ServiceModel; 20 | using System.ServiceModel.Channels; 21 | using System.Text; 22 | 23 | namespace Opc.Ua.Bindings 24 | { 25 | /// 26 | /// The binding for the UA native stack 27 | /// 28 | public abstract class BaseBinding : Binding 29 | { 30 | #region Constructors 31 | /// 32 | /// Initializes the binding. 33 | /// 34 | protected BaseBinding( 35 | NamespaceTable namespaceUris, 36 | EncodeableFactory factory, 37 | EndpointConfiguration configuration) 38 | { 39 | m_messageContext = new ServiceMessageContext(); 40 | 41 | m_messageContext.MaxStringLength = configuration.MaxStringLength; 42 | m_messageContext.MaxByteStringLength = configuration.MaxByteStringLength; 43 | m_messageContext.MaxArrayLength = configuration.MaxArrayLength; 44 | m_messageContext.MaxMessageSize = configuration.MaxMessageSize; 45 | m_messageContext.Factory = factory; 46 | m_messageContext.NamespaceUris = namespaceUris; 47 | } 48 | #endregion 49 | 50 | #region Public Properties 51 | /// 52 | /// The message context to use with the binding. 53 | /// 54 | public ServiceMessageContext MessageContext 55 | { 56 | get { return m_messageContext; } 57 | set { m_messageContext = value; } 58 | } 59 | #endregion 60 | 61 | #region Private Fields 62 | private ServiceMessageContext m_messageContext; 63 | #endregion 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /Stack/Core/Stack/Client/IServiceRequest.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1996-2016, OPC Foundation. All rights reserved. 2 | 3 | The source code in this file is covered under a dual-license scenario: 4 | - RCL: for OPC Foundation members in good-standing 5 | - GPL V2: everybody else 6 | 7 | RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ 8 | 9 | GNU General Public License as published by the Free Software Foundation; 10 | version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 11 | 12 | This source code is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | */ 16 | 17 | namespace Opc.Ua 18 | { 19 | /// 20 | /// An interface to a service request. 21 | /// 22 | public interface IServiceRequest : IEncodeable 23 | { 24 | /// 25 | /// The header for the request. 26 | /// 27 | /// The request header. 28 | RequestHeader RequestHeader { get; set; } 29 | } 30 | 31 | /// 32 | /// An interface to a service response. 33 | /// 34 | public interface IServiceResponse : IEncodeable 35 | { 36 | /// 37 | /// The header for the response. 38 | /// 39 | /// The response header. 40 | ResponseHeader ResponseHeader { get; } 41 | } 42 | 43 | /// 44 | /// An interface to a service message. 45 | /// 46 | public interface IServiceMessage 47 | { 48 | /// 49 | /// Returns the request contained in the message. 50 | /// 51 | /// 52 | IServiceRequest GetRequest(); 53 | 54 | /// 55 | /// Creates an instance of a response message. 56 | /// 57 | /// The response. 58 | /// 59 | object CreateResponse(IServiceResponse response); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /Stack/Core/Stack/Client/IUserIdentity.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1996-2016, OPC Foundation. All rights reserved. 2 | 3 | The source code in this file is covered under a dual-license scenario: 4 | - RCL: for OPC Foundation members in good-standing 5 | - GPL V2: everybody else 6 | 7 | RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ 8 | 9 | GNU General Public License as published by the Free Software Foundation; 10 | version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 11 | 12 | This source code is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | */ 16 | 17 | using System.IdentityModel.Tokens; 18 | using System.Xml; 19 | 20 | namespace Opc.Ua 21 | { 22 | /// 23 | /// An interface to an object with stores the identity of a user. 24 | /// 25 | public interface IUserIdentity 26 | { 27 | /// 28 | /// A display name that identifies the user. 29 | /// 30 | /// The display name. 31 | string DisplayName { get; } 32 | 33 | /// 34 | /// The type of identity token used. 35 | /// 36 | /// The type of the token. 37 | UserTokenType TokenType { get; } 38 | 39 | /// 40 | /// The type of issued token. 41 | /// 42 | /// The type of the issued token. 43 | XmlQualifiedName IssuedTokenType { get; } 44 | 45 | /// 46 | /// Whether the object can create signatures to prove possession of the user's credentials. 47 | /// 48 | /// true if signatures are supported; otherwise, false. 49 | bool SupportsSignatures { get; } 50 | 51 | /// 52 | /// Returns a .NET security token containing the user information. 53 | /// 54 | /// .NET security token containing the user information. 55 | SecurityToken GetSecurityToken(); 56 | 57 | /// 58 | /// Returns a UA user identity token containing the user information. 59 | /// 60 | /// UA user identity token containing the user information. 61 | UserIdentityToken GetIdentityToken(); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Stack/Core/Stack/Client/InvokeServiceMessage.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1996-2016, OPC Foundation. All rights reserved. 2 | 3 | The source code in this file is covered under a dual-license scenario: 4 | - RCL: for OPC Foundation members in good-standing 5 | - GPL V2: everybody else 6 | 7 | RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ 8 | 9 | GNU General Public License as published by the Free Software Foundation; 10 | version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 11 | 12 | This source code is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | */ 16 | 17 | using System.ServiceModel; 18 | 19 | namespace Opc.Ua 20 | { 21 | /// 22 | /// The message contract for the InvokeService service. 23 | /// 24 | [MessageContract(IsWrapped=false)] 25 | public class InvokeServiceMessage 26 | { 27 | /// 28 | /// The body of the message. 29 | /// 30 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields")] 31 | [MessageBodyMember(Namespace=Namespaces.OpcUaXsd, Order=0)] 32 | public byte[] InvokeServiceRequest; 33 | 34 | /// 35 | /// Initializes an empty message. 36 | /// 37 | public InvokeServiceMessage() 38 | { 39 | } 40 | 41 | /// 42 | /// Initializes the message with the body. 43 | /// 44 | /// The invoke service request. 45 | public InvokeServiceMessage(byte[] InvokeServiceRequest) 46 | { 47 | this.InvokeServiceRequest = InvokeServiceRequest; 48 | } 49 | } 50 | 51 | /// 52 | /// The message contract for the InvokeService service response. 53 | /// 54 | [MessageContract(IsWrapped=false)] 55 | public class InvokeServiceResponseMessage 56 | { 57 | /// 58 | /// The body of the message. 59 | /// 60 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields")] 61 | [MessageBodyMember(Namespace=Namespaces.OpcUaXsd, Order=0)] 62 | public byte[] InvokeServiceResponse; 63 | 64 | /// 65 | /// Initializes an empty message. 66 | /// 67 | public InvokeServiceResponseMessage() 68 | { 69 | } 70 | 71 | /// 72 | /// Initializes the message with the body. 73 | /// 74 | /// The invoke service response. 75 | public InvokeServiceResponseMessage(byte[] InvokeServiceResponse) 76 | { 77 | this.InvokeServiceResponse = InvokeServiceResponse; 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /Stack/Core/Stack/Constants/ConditionStateNames.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1996-2016, OPC Foundation. All rights reserved. 2 | 3 | The source code in this file is covered under a dual-license scenario: 4 | - RCL: for OPC Foundation members in good-standing 5 | - GPL V2: everybody else 6 | 7 | RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ 8 | 9 | GNU General Public License as published by the Free Software Foundation; 10 | version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 11 | 12 | This source code is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | */ 16 | 17 | using System; 18 | 19 | namespace Opc.Ua 20 | { 21 | /// 22 | /// Defines the default names for the condition states. 23 | /// 24 | public static partial class ConditionStateNames 25 | { 26 | /// 27 | /// The name of the Disabled state. 28 | /// 29 | public const string Disabled = "Disabled"; 30 | 31 | /// 32 | /// The name of the Enabled state. 33 | /// 34 | public const string Enabled = "Enabled"; 35 | 36 | /// 37 | /// The name of the Inactive state. 38 | /// 39 | public const string Inactive = "Inactive"; 40 | 41 | /// 42 | /// The name of the Active state. 43 | /// 44 | public const string Active = "Active"; 45 | 46 | /// 47 | /// The name of the Unacknowledged state. 48 | /// 49 | public const string Unacknowledged = "Unacknowledged"; 50 | 51 | /// 52 | /// The name of the Acknowledged state. 53 | /// 54 | public const string Acknowledged = "Acknowledged"; 55 | 56 | /// 57 | /// The name of the Unconfirmed state. 58 | /// 59 | public const string Unconfirmed = "Unconfirmed"; 60 | 61 | /// 62 | /// The name of the Confirmed state. 63 | /// 64 | public const string Confirmed = "Confirmed"; 65 | 66 | /// 67 | /// The name of the Unsuppressed state. 68 | /// 69 | public const string Unsuppressed = "Unsuppressed"; 70 | 71 | /// 72 | /// The name of the Suppressed state. 73 | /// 74 | public const string Suppressed = "Suppressed"; 75 | 76 | /// 77 | /// The name of the HighHighActive state. 78 | /// 79 | public const string HighHighActive = "HighHighActive"; 80 | 81 | /// 82 | /// The name of the HighActive state. 83 | /// 84 | public const string HighActive = "HighActive"; 85 | 86 | /// 87 | /// The name of the LowActive state. 88 | /// 89 | public const string LowActive = "LowActive"; 90 | 91 | /// 92 | /// The name of the LowLowActive state. 93 | /// 94 | public const string LowLowActive = "LowLowActive"; 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /Stack/Core/Stack/Constants/Namespaces.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1996-2016, OPC Foundation. All rights reserved. 2 | 3 | The source code in this file is covered under a dual-license scenario: 4 | - RCL: for OPC Foundation members in good-standing 5 | - GPL V2: everybody else 6 | 7 | RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ 8 | 9 | GNU General Public License as published by the Free Software Foundation; 10 | version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 11 | 12 | This source code is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | */ 16 | 17 | using System; 18 | 19 | namespace Opc.Ua 20 | { 21 | /// 22 | /// Defines well-known namespaces. 23 | /// 24 | public static partial class Namespaces 25 | { 26 | /// 27 | /// The XML Schema namespace. 28 | /// 29 | public const string XmlSchema = "http://www.w3.org/2001/XMLSchema"; 30 | 31 | /// 32 | /// The XML Schema Instance namespace. 33 | /// 34 | public const string XmlSchemaInstance = "http://www.w3.org/2001/XMLSchema-instance"; 35 | 36 | /// 37 | /// The WS Secuirity Extensions Namespace. 38 | /// 39 | public const string WSSecurityExtensions = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"; 40 | 41 | /// 42 | /// The WS Secuirity Utilities Namespace. 43 | /// 44 | public const string WSSecurityUtilities = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"; 45 | 46 | /// 47 | /// The URI for the UA WSDL. 48 | /// 49 | public const string OpcUaWsdl = "http://opcfoundation.org/UA/2008/02/Services.wsdl"; 50 | 51 | /// 52 | /// The URI for the UA SecuredApplication schema. 53 | /// 54 | public const string OpcUaSecurity = "http://opcfoundation.org/UA/2011/03/SecuredApplication.xsd"; 55 | 56 | /// 57 | /// The base URI for the Global Discovery Service. 58 | /// 59 | public const string OpcUaGds = "http://opcfoundation.org/UA/GDS/"; 60 | 61 | /// 62 | /// The base URI for SDK related schemas. 63 | /// 64 | public const string OpcUaSdk = "http://opcfoundation.org/UA/SDK/"; 65 | 66 | /// 67 | /// The URI for the UA SDK Configuration Schema. 68 | /// 69 | public const string OpcUaConfig = OpcUaSdk + "Configuration.xsd"; 70 | 71 | /// 72 | /// The URI for the built-in types namespace. 73 | /// 74 | public const string OpcUaBuiltInTypes = OpcUa + "BuiltInTypes/"; 75 | 76 | /// 77 | /// The URI for the OPC Binary Schema. 78 | /// 79 | public const string OpcBinarySchema = "http://opcfoundation.org/BinarySchema/"; 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /Stack/Core/Stack/Constants/ReferenceTypes.Helpers.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1996-2016, OPC Foundation. All rights reserved. 2 | 3 | The source code in this file is covered under a dual-license scenario: 4 | - RCL: for OPC Foundation members in good-standing 5 | - GPL V2: everybody else 6 | 7 | RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ 8 | 9 | GNU General Public License as published by the Free Software Foundation; 10 | version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 11 | 12 | This source code is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | using System.Text; 20 | using System.Reflection; 21 | using System.Xml; 22 | using System.Runtime.Serialization; 23 | 24 | namespace Opc.Ua 25 | { 26 | /// 27 | /// A class that defines constants used by UA applications. 28 | /// 29 | public static partial class ReferenceTypes 30 | { 31 | #region Static Helper Functions 32 | /// 33 | /// Returns the browse name for the attribute. 34 | /// 35 | public static string GetBrowseName(uint identifier) 36 | { 37 | FieldInfo[] fields = typeof(ReferenceTypes).GetFields(BindingFlags.Public | BindingFlags.Static); 38 | 39 | foreach (FieldInfo field in fields) 40 | { 41 | if (identifier == (uint)field.GetValue(typeof(ReferenceTypes))) 42 | { 43 | return field.Name; 44 | } 45 | } 46 | 47 | return System.String.Empty; 48 | } 49 | 50 | /// 51 | /// Returns the browse names for all attributes. 52 | /// 53 | public static string[] GetBrowseNames() 54 | { 55 | FieldInfo[] fields = typeof(ReferenceTypes).GetFields(BindingFlags.Public | BindingFlags.Static); 56 | 57 | int ii = 0; 58 | 59 | string[] names = new string[fields.Length]; 60 | 61 | foreach (FieldInfo field in fields) 62 | { 63 | names[ii++] = field.Name; 64 | } 65 | 66 | return names; 67 | } 68 | 69 | /// 70 | /// Returns the id for the attribute with the specified browse name. 71 | /// 72 | public static uint GetIdentifier(string browseName) 73 | { 74 | FieldInfo[] fields = typeof(ReferenceTypes).GetFields(BindingFlags.Public | BindingFlags.Static); 75 | 76 | foreach (FieldInfo field in fields) 77 | { 78 | if (field.Name == browseName) 79 | { 80 | return (uint)field.GetValue(typeof(ReferenceTypes)); 81 | } 82 | } 83 | 84 | return 0; 85 | } 86 | #endregion 87 | } 88 | 89 | } 90 | -------------------------------------------------------------------------------- /Stack/Core/Stack/Generated/Opc.Ua.PredefinedNodes.uanodes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OPCFoundation/Misc-Tools/de1a15d7feb7f2f1daf93c095309882d02895a8c/Stack/Core/Stack/Generated/Opc.Ua.PredefinedNodes.uanodes -------------------------------------------------------------------------------- /Stack/Core/Stack/Nodes/IOperationContext.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1996-2016, OPC Foundation. All rights reserved. 2 | 3 | The source code in this file is covered under a dual-license scenario: 4 | - RCL: for OPC Foundation members in good-standing 5 | - GPL V2: everybody else 6 | 7 | RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ 8 | 9 | GNU General Public License as published by the Free Software Foundation; 10 | version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 11 | 12 | This source code is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | 20 | namespace Opc.Ua 21 | { 22 | /// 23 | /// An interface to an object that describes a node local to the server. 24 | /// 25 | public interface IOperationContext 26 | { 27 | /// 28 | /// The identifier for the session (null if multiple sessions are associated with the operation). 29 | /// 30 | /// The session identifier. 31 | NodeId SessionId { get; } 32 | 33 | /// 34 | /// The identity of the user. 35 | /// 36 | /// The user identity. 37 | IUserIdentity UserIdentity { get; } 38 | 39 | /// 40 | /// The locales to use if available. 41 | /// 42 | /// The preferred locales. 43 | IList PreferredLocales { get; } 44 | 45 | /// 46 | /// The mask to use when collecting any diagnostic information. 47 | /// 48 | /// The diagnostics mask. 49 | DiagnosticsMasks DiagnosticsMask { get; } 50 | 51 | /// 52 | /// The table of strings which is used to store diagnostic string data. 53 | /// 54 | /// The string table. 55 | StringTable StringTable { get; } 56 | 57 | /// 58 | /// When the operation times out. 59 | /// 60 | /// The operation deadline. 61 | DateTime OperationDeadline { get; } 62 | 63 | /// 64 | /// The current status of the the operation (bad if the operation has been aborted). 65 | /// 66 | /// The operation status. 67 | StatusCode OperationStatus { get; } 68 | 69 | /// 70 | /// The audit identifier associated with the operation. 71 | /// 72 | /// The audit entry identifier. 73 | string AuditEntryId { get; } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /Stack/Core/Stack/Server/ClientAccessPolicy.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Stack/Core/Stack/Server/IEndpointBase.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1996-2016, OPC Foundation. All rights reserved. 2 | 3 | The source code in this file is covered under a dual-license scenario: 4 | - RCL: for OPC Foundation members in good-standing 5 | - GPL V2: everybody else 6 | 7 | RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ 8 | 9 | GNU General Public License as published by the Free Software Foundation; 10 | version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 11 | 12 | This source code is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | */ 16 | 17 | using System; 18 | using System.ServiceModel; 19 | 20 | namespace Opc.Ua 21 | { 22 | 23 | #if OPCUA_USE_SYNCHRONOUS_ENDPOINTS 24 | /// 25 | /// The base interface for all services exposed by UA servers. 26 | /// 27 | [ServiceContract(Namespace = Namespaces.OpcUaWsdl)] 28 | public interface IEndpointBase 29 | { 30 | /// 31 | /// The operation contract for the InvokeService service. 32 | /// 33 | /// The request. 34 | /// Response message. 35 | [OperationContract(Action = Namespaces.OpcUaWsdl + "/InvokeService", ReplyAction = Namespaces.OpcUaWsdl + "/InvokeServiceResponse")] 36 | InvokeServiceResponseMessage InvokeService(InvokeServiceMessage request); 37 | } 38 | #else 39 | /// 40 | /// The base asynchronous interface for all services exposed by UA servers. 41 | /// 42 | [ServiceContract(Namespace = Namespaces.OpcUaWsdl)] 43 | public interface IEndpointBase 44 | { 45 | /// 46 | /// The operation contract for the InvokeService service. 47 | /// 48 | [OperationContractAttribute(AsyncPattern = true, Action = Namespaces.OpcUaWsdl + "/InvokeService", ReplyAction = Namespaces.OpcUaWsdl + "/InvokeServiceResponse")] 49 | IAsyncResult BeginInvokeService(InvokeServiceMessage request, AsyncCallback callback, object asyncState); 50 | 51 | /// 52 | /// The method used to retrieve the results of a InvokeService service request. 53 | /// 54 | InvokeServiceResponseMessage EndInvokeService(IAsyncResult result); 55 | } 56 | #endif 57 | } 58 | -------------------------------------------------------------------------------- /Stack/Core/Stack/Server/NonHttpEndpoint.cs: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2013 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Reciprocal Community Binary License ("RCBL") Version 1.00 5 | * 6 | * Unless explicitly acquired and licensed from Licensor under another 7 | * license, the contents of this file are subject to the Reciprocal 8 | * Community Binary License ("RCBL") Version 1.00, or subsequent versions 9 | * as allowed by the RCBL, and You may not copy or use this file in either 10 | * source code or executable form, except in compliance with the terms and 11 | * conditions of the RCBL. 12 | * 13 | * All software distributed under the RCBL is provided strictly on an 14 | * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, 15 | * AND LICENSOR HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT 16 | * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 17 | * PURPOSE, QUIET ENJOYMENT, OR NON-INFRINGEMENT. See the RCBL for specific 18 | * language governing rights and limitations under the RCBL. 19 | * 20 | * The complete license agreement can be found here: 21 | * http://opcfoundation.org/License/RCBL/1.00/ 22 | * ======================================================================*/ 23 | 24 | using System; 25 | using System.Collections.Generic; 26 | using System.Text; 27 | using System.ServiceModel; 28 | 29 | namespace Opc.Ua 30 | { 31 | #if USE_WCF_FOR_UATCP 32 | /// 33 | /// A endpoint object used by clients to access a UA service via non-HTTP endpoints. 34 | /// 35 | /// 36 | [System.CodeDom.Compiler.GeneratedCodeAttribute("Opc.Ua.CodeGenerator", "1.0.0.0")] 37 | [ServiceBehavior(Namespace = Namespaces.OpcUaWsdl, InstanceContextMode = InstanceContextMode.PerSession, ConcurrencyMode = ConcurrencyMode.Multiple)] 38 | public partial class NonHttpSessionEndpoint : SessionEndpoint 39 | { 40 | } 41 | 42 | /// 43 | /// A endpoint object used by clients to access a UA service via non-HTTP endpoints. 44 | /// 45 | /// 46 | [System.CodeDom.Compiler.GeneratedCodeAttribute("Opc.Ua.CodeGenerator", "1.0.0.0")] 47 | [ServiceBehavior(Namespace = Namespaces.OpcUaWsdl, InstanceContextMode = InstanceContextMode.PerSession, ConcurrencyMode = ConcurrencyMode.Multiple)] 48 | public partial class NonHttpDiscoveryEndpoint : DiscoveryEndpoint 49 | { 50 | } 51 | #endif 52 | } 53 | -------------------------------------------------------------------------------- /Stack/Core/Stack/State/AuditEventState.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1996-2016, OPC Foundation. All rights reserved. 2 | 3 | The source code in this file is covered under a dual-license scenario: 4 | - RCL: for OPC Foundation members in good-standing 5 | - GPL V2: everybody else 6 | 7 | RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ 8 | 9 | GNU General Public License as published by the Free Software Foundation; 10 | version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 11 | 12 | This source code is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | using System.Xml; 20 | using System.IO; 21 | using System.Reflection; 22 | using Opc.Ua; 23 | 24 | namespace Opc.Ua 25 | { 26 | public partial class AuditEventState 27 | { 28 | #region Initialization 29 | /// 30 | /// Initializes a new event. 31 | /// 32 | /// The current system context. 33 | /// The source of the event. 34 | /// The severity for the event. 35 | /// The default message. 36 | /// Whether the operation that caused the event succeeded. 37 | /// When the operation started. 38 | public virtual void Initialize( 39 | ISystemContext context, 40 | NodeState source, 41 | EventSeverity severity, 42 | LocalizedText message, 43 | bool status, 44 | DateTime actionTimestamp) 45 | { 46 | base.Initialize(context, source, severity, message); 47 | 48 | m_status = new PropertyState(this); 49 | m_status.Value = status; 50 | 51 | if (actionTimestamp != DateTime.MinValue) 52 | { 53 | m_actionTimeStamp = new PropertyState(this); 54 | m_actionTimeStamp.Value = actionTimestamp; 55 | } 56 | 57 | if (context.NamespaceUris != null) 58 | { 59 | m_serverId = new PropertyState(this); 60 | m_serverId.Value = context.NamespaceUris.GetString(1); 61 | } 62 | 63 | if (context.AuditEntryId != null) 64 | { 65 | m_clientAuditEntryId = new PropertyState(this); 66 | m_clientAuditEntryId.Value = context.AuditEntryId; 67 | } 68 | 69 | if (context.UserIdentity != null) 70 | { 71 | m_clientUserId = new PropertyState(this); 72 | m_clientUserId.Value = context.UserIdentity.DisplayName; 73 | } 74 | } 75 | #endregion 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /Stack/Core/Stack/State/LimitAlarmState.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1996-2016, OPC Foundation. All rights reserved. 2 | 3 | The source code in this file is covered under a dual-license scenario: 4 | - RCL: for OPC Foundation members in good-standing 5 | - GPL V2: everybody else 6 | 7 | RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ 8 | 9 | GNU General Public License as published by the Free Software Foundation; 10 | version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 11 | 12 | This source code is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | using System.Text; 20 | 21 | namespace Opc.Ua 22 | { 23 | /// 24 | /// The possible states for a limit alarm. 25 | /// 26 | [Flags] 27 | public enum LimitAlarmStates 28 | { 29 | /// 30 | /// The alarm ia inactive. 31 | /// 32 | Inactive = 0x0, 33 | 34 | /// 35 | /// The alarm is in the HighHigh state. 36 | /// 37 | HighHigh = 0x1, 38 | 39 | /// 40 | /// The alarm is in the High state. 41 | /// 42 | High = 0x2, 43 | 44 | /// 45 | /// The alarm is in the Low state. 46 | /// 47 | Low = 0x4, 48 | 49 | /// 50 | /// The alarm is in the LowLow state. 51 | /// 52 | LowLow =0x8 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Stack/Core/Stack/Tcp/Wcf/IBinaryEncodingCapabilities.cs: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2013 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Reciprocal Community Binary License ("RCBL") Version 1.00 5 | * 6 | * Unless explicitly acquired and licensed from Licensor under another 7 | * license, the contents of this file are subject to the Reciprocal 8 | * Community Binary License ("RCBL") Version 1.00, or subsequent versions 9 | * as allowed by the RCBL, and You may not copy or use this file in either 10 | * source code or executable form, except in compliance with the terms and 11 | * conditions of the RCBL. 12 | * 13 | * All software distributed under the RCBL is provided strictly on an 14 | * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, 15 | * AND LICENSOR HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT 16 | * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 17 | * PURPOSE, QUIET ENJOYMENT, OR NON-INFRINGEMENT. See the RCBL for specific 18 | * language governing rights and limitations under the RCBL. 19 | * 20 | * The complete license agreement can be found here: 21 | * http://opcfoundation.org/License/RCBL/1.00/ 22 | * ======================================================================*/ 23 | 24 | using System; 25 | using System.Collections.Generic; 26 | using System.Text; 27 | 28 | namespace Opc.Ua.Bindings 29 | { 30 | /// 31 | /// A interface that indicates what UA binary encoding support is allowed/required by a channel element. 32 | /// 33 | public interface IBinaryEncodingCapabilities 34 | { 35 | /// 36 | /// The binary encoding mode supported by the channel. 37 | /// 38 | BinaryEncodingSupport EncodingSupport { get; } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Stack/Core/Stack/Tcp/Wcf/IUaTcpSecureChannel.cs: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2013 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Reciprocal Community Binary License ("RCBL") Version 1.00 5 | * 6 | * Unless explicitly acquired and licensed from Licensor under another 7 | * license, the contents of this file are subject to the Reciprocal 8 | * Community Binary License ("RCBL") Version 1.00, or subsequent versions 9 | * as allowed by the RCBL, and You may not copy or use this file in either 10 | * source code or executable form, except in compliance with the terms and 11 | * conditions of the RCBL. 12 | * 13 | * All software distributed under the RCBL is provided strictly on an 14 | * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, 15 | * AND LICENSOR HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT 16 | * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 17 | * PURPOSE, QUIET ENJOYMENT, OR NON-INFRINGEMENT. See the RCBL for specific 18 | * language governing rights and limitations under the RCBL. 19 | * 20 | * The complete license agreement can be found here: 21 | * http://opcfoundation.org/License/RCBL/1.00/ 22 | * ======================================================================*/ 23 | 24 | using System; 25 | using System.Collections.Generic; 26 | using System.ServiceModel; 27 | using System.ServiceModel.Channels; 28 | using System.ServiceModel.Description; 29 | using System.ServiceModel.Dispatcher; 30 | using System.Net.Sockets; 31 | using System.Diagnostics; 32 | using System.Threading; 33 | using System.Runtime.InteropServices; 34 | using System.Xml; 35 | 36 | using Opc.Ua.Bindings; 37 | 38 | namespace Opc.Ua.Bindings 39 | { 40 | /// 41 | /// Uses to access information about the secure channel 42 | /// 43 | public interface IUaTcpSecureChannel 44 | { 45 | /// 46 | /// Returns the endpoint description used by the channel. 47 | /// 48 | EndpointDescription EndpointDescription { get; } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Stack/Core/Stack/Tcp/Wcf/StreamSecurityBindingElement.cs: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2013 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Reciprocal Community Binary License ("RCBL") Version 1.00 5 | * 6 | * Unless explicitly acquired and licensed from Licensor under another 7 | * license, the contents of this file are subject to the Reciprocal 8 | * Community Binary License ("RCBL") Version 1.00, or subsequent versions 9 | * as allowed by the RCBL, and You may not copy or use this file in either 10 | * source code or executable form, except in compliance with the terms and 11 | * conditions of the RCBL. 12 | * 13 | * All software distributed under the RCBL is provided strictly on an 14 | * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, 15 | * AND LICENSOR HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT 16 | * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 17 | * PURPOSE, QUIET ENJOYMENT, OR NON-INFRINGEMENT. See the RCBL for specific 18 | * language governing rights and limitations under the RCBL. 19 | * 20 | * The complete license agreement can be found here: 21 | * http://opcfoundation.org/License/RCBL/1.00/ 22 | * ======================================================================*/ 23 | 24 | using System; 25 | using System.Collections.Generic; 26 | using System.ServiceModel; 27 | using System.ServiceModel.Channels; 28 | using System.ServiceModel.Description; 29 | using System.ServiceModel.Security; 30 | using System.Text; 31 | 32 | namespace Opc.Ua.Bindings 33 | { 34 | /// 35 | /// A class that publishes the secuirty capabilities for a binding element. 36 | /// 37 | public class SecurityCapabilities : ISecurityCapabilities 38 | { 39 | #region ISecurityCapabilities Members 40 | /// 41 | public System.Net.Security.ProtectionLevel SupportedRequestProtectionLevel 42 | { 43 | get { return System.Net.Security.ProtectionLevel.EncryptAndSign; } 44 | } 45 | 46 | /// 47 | public System.Net.Security.ProtectionLevel SupportedResponseProtectionLevel 48 | { 49 | get { return System.Net.Security.ProtectionLevel.EncryptAndSign; } 50 | } 51 | 52 | /// 53 | public bool SupportsClientAuthentication 54 | { 55 | get { return false; } 56 | } 57 | 58 | /// 59 | public bool SupportsClientWindowsIdentity 60 | { 61 | get { return false; } 62 | } 63 | 64 | /// 65 | public bool SupportsServerAuthentication 66 | { 67 | get { return false; } 68 | } 69 | #endregion 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /Stack/Core/Stack/Transport/ITransportListener.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1996-2016, OPC Foundation. All rights reserved. 2 | 3 | The source code in this file is covered under a dual-license scenario: 4 | - RCL: for OPC Foundation members in good-standing 5 | - GPL V2: everybody else 6 | 7 | RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ 8 | 9 | GNU General Public License as published by the Free Software Foundation; 10 | version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 11 | 12 | This source code is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | using System.Text; 20 | 21 | namespace Opc.Ua 22 | { 23 | /// 24 | /// This is an interface to a listener which supports UA binary encoding. 25 | /// 26 | public interface ITransportListener : IDisposable 27 | { 28 | /// 29 | /// Opens the listener and starts accepting connection. 30 | /// 31 | /// The base address. 32 | /// The settings to use when creating the listener. 33 | /// The callback to use when requests arrive via the channel. 34 | /// Thrown if any parameter is null. 35 | /// Thrown if any communication error occurs. 36 | void Open( 37 | Uri baseAddress, 38 | TransportListenerSettings settings, 39 | ITransportListenerCallback callback); 40 | 41 | /// 42 | /// Closes the listener and stops accepting connection. 43 | /// 44 | /// Thrown if any communication error occurs. 45 | void Close(); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Stack/Core/Stack/Transport/ITransportListenerCallback.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1996-2016, OPC Foundation. All rights reserved. 2 | 3 | The source code in this file is covered under a dual-license scenario: 4 | - RCL: for OPC Foundation members in good-standing 5 | - GPL V2: everybody else 6 | 7 | RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ 8 | 9 | GNU General Public License as published by the Free Software Foundation; 10 | version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 11 | 12 | This source code is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | using System.Text; 20 | 21 | namespace Opc.Ua 22 | { 23 | /// 24 | /// This is an interface to a object that receives notifications from the listener when a message arrives. 25 | /// 26 | public interface ITransportListenerCallback 27 | { 28 | /// 29 | /// Begins processing a request received via a binary encoded channel. 30 | /// 31 | /// A unique identifier for the secure channel which is the source of the request. 32 | /// The description of the endpoint which the secure channel is using. 33 | /// The incoming request. 34 | /// The callback. 35 | /// The callback data. 36 | /// The result which must be passed to the EndProcessRequest method. 37 | /// 38 | /// 39 | IAsyncResult BeginProcessRequest( 40 | string channeId, 41 | EndpointDescription endpointDescription, 42 | IServiceRequest request, 43 | AsyncCallback callback, 44 | object callbackData); 45 | 46 | /// 47 | /// Ends processing a request received via a binary encoded channel. 48 | /// 49 | /// The result returned by the BeginProcessRequest method. 50 | /// The response to return over the secure channel. 51 | /// 52 | IServiceResponse EndProcessRequest(IAsyncResult result); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Stack/Core/Stack/Types/Argument.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1996-2016, OPC Foundation. All rights reserved. 2 | 3 | The source code in this file is covered under a dual-license scenario: 4 | - RCL: for OPC Foundation members in good-standing 5 | - GPL V2: everybody else 6 | 7 | RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ 8 | 9 | GNU General Public License as published by the Free Software Foundation; 10 | version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 11 | 12 | This source code is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | using System.ServiceModel; 20 | using System.Runtime.Serialization; 21 | using System.Security.Cryptography.X509Certificates; 22 | 23 | namespace Opc.Ua 24 | { 25 | /// 26 | /// The Argument class. 27 | /// 28 | public partial class Argument 29 | { 30 | #region Public Properties 31 | /// 32 | /// Initializes an instance of the argument. 33 | /// 34 | public Argument(string name, NodeId dataType, int valueRank, string description) 35 | { 36 | this.m_name = name; 37 | this.m_dataType = dataType; 38 | this.m_valueRank = valueRank; 39 | this.m_description = description; 40 | } 41 | #endregion 42 | 43 | #region Public Properties 44 | /// 45 | /// The value for the argument. 46 | /// 47 | public object Value 48 | { 49 | get { return m_value; } 50 | set { m_value = value; } 51 | } 52 | #endregion 53 | 54 | #region Private Fields 55 | private object m_value; 56 | #endregion 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /Stack/Core/Stack/Types/BrowseDescription.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1996-2016, OPC Foundation. All rights reserved. 2 | 3 | The source code in this file is covered under a dual-license scenario: 4 | - RCL: for OPC Foundation members in good-standing 5 | - GPL V2: everybody else 6 | 7 | RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ 8 | 9 | GNU General Public License as published by the Free Software Foundation; 10 | version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 11 | 12 | This source code is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | using System.ServiceModel; 20 | using System.Runtime.Serialization; 21 | using System.Security.Cryptography.X509Certificates; 22 | 23 | namespace Opc.Ua 24 | { 25 | #region BrowseDescription Class 26 | public partial class BrowseDescription 27 | { 28 | #region Supporting Properties and Methods 29 | /// 30 | /// A handle assigned to the item during processing. 31 | /// 32 | public object Handle 33 | { 34 | get { return m_handle; } 35 | set { m_handle = value; } 36 | } 37 | #endregion 38 | 39 | #region Private Fields 40 | private object m_handle; 41 | #endregion 42 | } 43 | #endregion 44 | 45 | #region ViewDescription Class 46 | public partial class ViewDescription 47 | { 48 | #region Supporting Properties and Methods 49 | /// 50 | /// A handle assigned to the item during processing. 51 | /// 52 | public object Handle 53 | { 54 | get { return m_handle; } 55 | set { m_handle = value; } 56 | } 57 | #endregion 58 | 59 | #region Private Fields 60 | private object m_handle; 61 | #endregion 62 | } 63 | #endregion 64 | } 65 | -------------------------------------------------------------------------------- /Stack/Core/Stack/Types/BrowsePath.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1996-2016, OPC Foundation. All rights reserved. 2 | 3 | The source code in this file is covered under a dual-license scenario: 4 | - RCL: for OPC Foundation members in good-standing 5 | - GPL V2: everybody else 6 | 7 | RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ 8 | 9 | GNU General Public License as published by the Free Software Foundation; 10 | version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 11 | 12 | This source code is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | using System.ServiceModel; 20 | using System.Runtime.Serialization; 21 | using System.Security.Cryptography.X509Certificates; 22 | 23 | namespace Opc.Ua 24 | { 25 | #region BrowsePath Class 26 | public partial class BrowsePath 27 | { 28 | #region Supporting Properties and Methods 29 | /// 30 | /// A handle assigned to the item during processing. 31 | /// 32 | public object Handle 33 | { 34 | get { return m_handle; } 35 | set { m_handle = value; } 36 | } 37 | #endregion 38 | 39 | #region Private Fields 40 | private object m_handle; 41 | #endregion 42 | } 43 | #endregion 44 | } 45 | -------------------------------------------------------------------------------- /Stack/Core/Stack/Types/CallMethodRequest.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1996-2016, OPC Foundation. All rights reserved. 2 | 3 | The source code in this file is covered under a dual-license scenario: 4 | - RCL: for OPC Foundation members in good-standing 5 | - GPL V2: everybody else 6 | 7 | RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ 8 | 9 | GNU General Public License as published by the Free Software Foundation; 10 | version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 11 | 12 | This source code is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | using System.ServiceModel; 20 | using System.Runtime.Serialization; 21 | using System.Security.Cryptography.X509Certificates; 22 | 23 | namespace Opc.Ua 24 | { 25 | /// 26 | /// The description of a value to write. 27 | /// 28 | public partial class CallMethodRequest 29 | { 30 | #region Supporting Properties and Methods 31 | /// 32 | /// A handle assigned to the item during processing. 33 | /// 34 | public object Handle 35 | { 36 | get { return m_handle; } 37 | set { m_handle = value; } 38 | } 39 | 40 | /// 41 | /// Whether the value has been processed. 42 | /// 43 | public bool Processed 44 | { 45 | get { return m_processed; } 46 | set { m_processed = value; } 47 | } 48 | #endregion 49 | 50 | #region Private Fields 51 | private object m_handle; 52 | private bool m_processed; 53 | #endregion 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Stack/Core/Stack/Types/EUInformation.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1996-2016, OPC Foundation. All rights reserved. 2 | 3 | The source code in this file is covered under a dual-license scenario: 4 | - RCL: for OPC Foundation members in good-standing 5 | - GPL V2: everybody else 6 | 7 | RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ 8 | 9 | GNU General Public License as published by the Free Software Foundation; 10 | version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 11 | 12 | This source code is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | using System.ServiceModel; 20 | using System.Runtime.Serialization; 21 | using System.Security.Cryptography.X509Certificates; 22 | 23 | namespace Opc.Ua 24 | { 25 | /// 26 | /// Stores information about engineering units. 27 | /// 28 | public partial class EUInformation 29 | { 30 | /// 31 | /// Initializes the object with the unitName and namespaceUri. 32 | /// 33 | public EUInformation(string unitName, string namespaceUri) 34 | { 35 | Initialize(); 36 | 37 | m_displayName = new LocalizedText(unitName); 38 | m_description = new LocalizedText(unitName); 39 | m_namespaceUri = namespaceUri; 40 | } 41 | 42 | /// 43 | /// Initializes the object with the unitName and namespaceUri. 44 | /// 45 | public EUInformation(string shortName, string longName, string namespaceUri) 46 | { 47 | Initialize(); 48 | 49 | m_displayName = new LocalizedText(shortName); 50 | m_description = new LocalizedText(longName); 51 | m_namespaceUri = namespaceUri; 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Stack/Core/Stack/Types/EventFieldList.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1996-2016, OPC Foundation. All rights reserved. 2 | 3 | The source code in this file is covered under a dual-license scenario: 4 | - RCL: for OPC Foundation members in good-standing 5 | - GPL V2: everybody else 6 | 7 | RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ 8 | 9 | GNU General Public License as published by the Free Software Foundation; 10 | version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 11 | 12 | This source code is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | using System.ServiceModel; 20 | using System.Runtime.Serialization; 21 | using System.Security.Cryptography.X509Certificates; 22 | 23 | namespace Opc.Ua 24 | { 25 | /// 26 | /// A list of event field values returned in a NotificationMessage. 27 | /// 28 | public partial class EventFieldList 29 | { 30 | #region Public Properties 31 | /// 32 | /// The handle cast to a notification message. 33 | /// 34 | public NotificationMessage Message 35 | { 36 | get { return m_handle as NotificationMessage; } 37 | set { m_handle = value; } 38 | } 39 | 40 | /// 41 | /// A handle associated withe the event instance. 42 | /// 43 | public object Handle 44 | { 45 | get { return m_handle; } 46 | set { m_handle = value; } 47 | } 48 | #endregion 49 | 50 | #region Private Fields 51 | private object m_handle; 52 | #endregion 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Stack/Core/Stack/Types/HistoryUpdateDetails.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1996-2016, OPC Foundation. All rights reserved. 2 | 3 | The source code in this file is covered under a dual-license scenario: 4 | - RCL: for OPC Foundation members in good-standing 5 | - GPL V2: everybody else 6 | 7 | RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ 8 | 9 | GNU General Public License as published by the Free Software Foundation; 10 | version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 11 | 12 | This source code is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | using System.ServiceModel; 20 | using System.Runtime.Serialization; 21 | using System.Security.Cryptography.X509Certificates; 22 | 23 | namespace Opc.Ua 24 | { 25 | /// 26 | /// The description of a value to read. 27 | /// 28 | public partial class HistoryUpdateDetails 29 | { 30 | #region Supporting Properties and Methods 31 | /// 32 | /// A handle assigned to the item during processing. 33 | /// 34 | public object Handle 35 | { 36 | get { return m_handle; } 37 | set { m_handle = value; } 38 | } 39 | 40 | /// 41 | /// Whether the value has been processed. 42 | /// 43 | public bool Processed 44 | { 45 | get { return m_processed; } 46 | set { m_processed = value; } 47 | } 48 | 49 | /// 50 | /// Validates a HistoryUpdateDetails parameter. 51 | /// 52 | public static ServiceResult Validate(HistoryUpdateDetails valueId) 53 | { 54 | // check for null structure. 55 | if (valueId == null) 56 | { 57 | return StatusCodes.BadStructureMissing; 58 | } 59 | 60 | // null node ids are always invalid. 61 | if (NodeId.IsNull(valueId.NodeId)) 62 | { 63 | return StatusCodes.BadNodeIdInvalid; 64 | } 65 | 66 | // passed basic validation. 67 | return null; 68 | } 69 | #endregion 70 | 71 | #region Private Fields 72 | private object m_handle; 73 | private bool m_processed; 74 | #endregion 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /Stack/Core/Stack/Types/MonitoredItemCreateRequest.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1996-2016, OPC Foundation. All rights reserved. 2 | 3 | The source code in this file is covered under a dual-license scenario: 4 | - RCL: for OPC Foundation members in good-standing 5 | - GPL V2: everybody else 6 | 7 | RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ 8 | 9 | GNU General Public License as published by the Free Software Foundation; 10 | version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 11 | 12 | This source code is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | using System.ServiceModel; 20 | using System.Runtime.Serialization; 21 | using System.Security.Cryptography.X509Certificates; 22 | 23 | namespace Opc.Ua 24 | { 25 | /// 26 | /// The description of a monitored item to create. 27 | /// 28 | public partial class MonitoredItemCreateRequest 29 | { 30 | #region Supporting Properties and Methods 31 | /// 32 | /// A handle assigned to the item during processing. 33 | /// 34 | public object Handle 35 | { 36 | get { return m_handle; } 37 | set { m_handle = value; } 38 | } 39 | 40 | /// 41 | /// Whether the value has been processed. 42 | /// 43 | public bool Processed 44 | { 45 | get { return m_processed; } 46 | set { m_processed = value; } 47 | } 48 | #endregion 49 | 50 | #region Private Fields 51 | private object m_handle; 52 | private bool m_processed; 53 | #endregion 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Stack/Core/Stack/Types/MonitoredItemCreateResult.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1996-2016, OPC Foundation. All rights reserved. 2 | 3 | The source code in this file is covered under a dual-license scenario: 4 | - RCL: for OPC Foundation members in good-standing 5 | - GPL V2: everybody else 6 | 7 | RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ 8 | 9 | GNU General Public License as published by the Free Software Foundation; 10 | version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 11 | 12 | This source code is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | using System.ServiceModel; 20 | using System.Runtime.Serialization; 21 | using System.Security.Cryptography.X509Certificates; 22 | 23 | namespace Opc.Ua 24 | { 25 | /// 26 | /// The description of a monitored item to create. 27 | /// 28 | public partial class MonitoredItemCreateResult 29 | { 30 | /// 31 | /// Initializes the object with an error code. 32 | /// 33 | public MonitoredItemCreateResult(uint statusCode) 34 | { 35 | Initialize(); 36 | m_statusCode = statusCode; 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Stack/Core/Stack/Types/MonitoredItemModifyRequest.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1996-2016, OPC Foundation. All rights reserved. 2 | 3 | The source code in this file is covered under a dual-license scenario: 4 | - RCL: for OPC Foundation members in good-standing 5 | - GPL V2: everybody else 6 | 7 | RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ 8 | 9 | GNU General Public License as published by the Free Software Foundation; 10 | version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 11 | 12 | This source code is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | using System.ServiceModel; 20 | using System.Runtime.Serialization; 21 | using System.Security.Cryptography.X509Certificates; 22 | 23 | namespace Opc.Ua 24 | { 25 | /// 26 | /// The description of a monitored item to create. 27 | /// 28 | public partial class MonitoredItemModifyRequest 29 | { 30 | #region Supporting Properties and Methods 31 | /// 32 | /// A handle assigned to the item during processing. 33 | /// 34 | public object Handle 35 | { 36 | get { return m_handle; } 37 | set { m_handle = value; } 38 | } 39 | 40 | /// 41 | /// Whether the value has been processed. 42 | /// 43 | public bool Processed 44 | { 45 | get { return m_processed; } 46 | set { m_processed = value; } 47 | } 48 | #endregion 49 | 50 | #region Private Fields 51 | private object m_handle; 52 | private bool m_processed; 53 | #endregion 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Stack/Core/Stack/Types/MonitoredItemNotification.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1996-2016, OPC Foundation. All rights reserved. 2 | 3 | The source code in this file is covered under a dual-license scenario: 4 | - RCL: for OPC Foundation members in good-standing 5 | - GPL V2: everybody else 6 | 7 | RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ 8 | 9 | GNU General Public License as published by the Free Software Foundation; 10 | version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 11 | 12 | This source code is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | using System.ServiceModel; 20 | using System.Runtime.Serialization; 21 | using System.Security.Cryptography.X509Certificates; 22 | 23 | namespace Opc.Ua 24 | { 25 | /// 26 | /// A datachange returned in a NotificationMessage. 27 | /// 28 | public partial class MonitoredItemNotification 29 | { 30 | #region Public Properties 31 | /// 32 | /// The notification message that the item belongs to. 33 | /// 34 | public NotificationMessage Message 35 | { 36 | get { return m_message; } 37 | set { m_message = value; } 38 | } 39 | 40 | /// 41 | /// The diagnostic info associated with the notification. 42 | /// 43 | public DiagnosticInfo DiagnosticInfo 44 | { 45 | get { return m_diagnosticInfo; } 46 | set { m_diagnosticInfo = value; } 47 | } 48 | #endregion 49 | 50 | #region Private Fields 51 | private NotificationMessage m_message; 52 | private DiagnosticInfo m_diagnosticInfo; 53 | #endregion 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Stack/Core/Stack/Types/QueryDataSet.cs: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright (c) 2005-2016 The OPC Foundation, Inc. All rights reserved. 3 | * 4 | * OPC Reciprocal Community License ("RCL") Version 1.00 5 | * 6 | * Unless explicitly acquired and licensed from Licensor under another 7 | * license, the contents of this file are subject to the Reciprocal 8 | * Community License ("RCL") Version 1.00, or subsequent versions 9 | * as allowed by the RCL, and You may not copy or use this file in either 10 | * source code or executable form, except in compliance with the terms and 11 | * conditions of the RCL. 12 | * 13 | * All software distributed under the RCL is provided strictly on an 14 | * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, 15 | * AND LICENSOR HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT 16 | * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 17 | * PURPOSE, QUIET ENJOYMENT, OR NON-INFRINGEMENT. See the RCL for specific 18 | * language governing rights and limitations under the RCL. 19 | * 20 | * The complete license agreement can be found here: 21 | * http://opcfoundation.org/License/RCL/1.00/ 22 | * ======================================================================*/ 23 | 24 | using System; 25 | using System.Collections.Generic; 26 | using System.ServiceModel; 27 | using System.Runtime.Serialization; 28 | using System.Security.Cryptography.X509Certificates; 29 | 30 | namespace Opc.Ua 31 | { 32 | #region NodeTypeDescription Class 33 | public partial class NodeTypeDescription 34 | { 35 | #region Supporting Properties and Methods 36 | /// 37 | /// A handle assigned to the item during processing. 38 | /// 39 | public object Handle { get; set; } 40 | 41 | /// 42 | /// Whether the value has been processed. 43 | /// 44 | public bool Processed { get; set; } 45 | #endregion 46 | 47 | #region Private Fields 48 | #endregion 49 | } 50 | #endregion 51 | 52 | #region QueryDataDescription Class 53 | public partial class QueryDataDescription 54 | { 55 | /// 56 | /// Stores the parsed form of the index range parameter. 57 | /// 58 | public NumericRange ParsedIndexRange { get; set; } 59 | } 60 | #endregion 61 | } 62 | -------------------------------------------------------------------------------- /Stack/Core/Stack/Types/Range.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1996-2016, OPC Foundation. All rights reserved. 2 | 3 | The source code in this file is covered under a dual-license scenario: 4 | - RCL: for OPC Foundation members in good-standing 5 | - GPL V2: everybody else 6 | 7 | RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ 8 | 9 | GNU General Public License as published by the Free Software Foundation; 10 | version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 11 | 12 | This source code is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | using System.ServiceModel; 20 | using System.Runtime.Serialization; 21 | using System.Security.Cryptography.X509Certificates; 22 | 23 | namespace Opc.Ua 24 | { 25 | /// 26 | /// Stores a range. 27 | /// 28 | public partial class Range 29 | { 30 | /// 31 | /// Initializes the object with the high and low limits. 32 | /// 33 | public Range(double high, double low) 34 | { 35 | m_low = low; 36 | m_high = high; 37 | 38 | // swap values if high is not actually higher. 39 | if (low > high) 40 | { 41 | m_high = low; 42 | m_low = high; 43 | } 44 | } 45 | 46 | /// 47 | /// Returns the difference between high and low. 48 | /// 49 | public double Magnitude 50 | { 51 | get { return Math.Abs(m_high - m_low); } 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Stack/Core/Stack/Types/ServiceFault.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1996-2016, OPC Foundation. All rights reserved. 2 | 3 | The source code in this file is covered under a dual-license scenario: 4 | - RCL: for OPC Foundation members in good-standing 5 | - GPL V2: everybody else 6 | 7 | RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ 8 | 9 | GNU General Public License as published by the Free Software Foundation; 10 | version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 11 | 12 | This source code is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | using System.ServiceModel; 20 | using System.Runtime.Serialization; 21 | using System.Security.Cryptography.X509Certificates; 22 | 23 | namespace Opc.Ua 24 | { 25 | #region ServiceFault Class 26 | /// 27 | /// The ServiceFault class. 28 | /// 29 | public partial class ServiceFault : IServiceResponse 30 | { 31 | } 32 | #endregion 33 | } 34 | -------------------------------------------------------------------------------- /Stack/Core/Stack/Types/StatusResult.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1996-2016, OPC Foundation. All rights reserved. 2 | 3 | The source code in this file is covered under a dual-license scenario: 4 | - RCL: for OPC Foundation members in good-standing 5 | - GPL V2: everybody else 6 | 7 | RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ 8 | 9 | GNU General Public License as published by the Free Software Foundation; 10 | version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 11 | 12 | This source code is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | using System.ServiceModel; 20 | using System.Runtime.Serialization; 21 | using System.Security.Cryptography.X509Certificates; 22 | 23 | namespace Opc.Ua 24 | { 25 | /// 26 | /// Stores a StatusCode/DiagnosticInfo. 27 | /// 28 | public partial class StatusResult 29 | { 30 | #region Public Interface 31 | /// 32 | /// Initializes the object with a ServiceResult. 33 | /// 34 | public StatusResult(ServiceResult result) 35 | { 36 | Initialize(); 37 | 38 | m_result = result; 39 | 40 | if (result != null) 41 | { 42 | m_statusCode = result.StatusCode; 43 | } 44 | } 45 | 46 | /// 47 | /// Applies the diagnostic mask if the object was initialize with a ServiceResult. 48 | /// 49 | public void ApplyDiagnosticMasks(DiagnosticsMasks diagnosticMasks, StringTable stringTable) 50 | { 51 | if (m_result != null) 52 | { 53 | m_statusCode = m_result.StatusCode; 54 | m_diagnosticInfo = new DiagnosticInfo(m_result, diagnosticMasks, false, stringTable); 55 | } 56 | } 57 | #endregion 58 | 59 | #region Private Fields 60 | private ServiceResult m_result; 61 | #endregion 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Stack/Core/Stack/Types/UserTokenPolicy.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1996-2016, OPC Foundation. All rights reserved. 2 | 3 | The source code in this file is covered under a dual-license scenario: 4 | - RCL: for OPC Foundation members in good-standing 5 | - GPL V2: everybody else 6 | 7 | RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ 8 | 9 | GNU General Public License as published by the Free Software Foundation; 10 | version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 11 | 12 | This source code is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | */ 16 | 17 | using System; 18 | using System.Text; 19 | using System.ServiceModel.Security; 20 | using System.Security.Cryptography.X509Certificates; 21 | 22 | namespace Opc.Ua 23 | { 24 | /// 25 | /// Defines constants for key user token policies. 26 | /// 27 | public partial class UserTokenPolicy : IFormattable 28 | { 29 | #region Constructors 30 | /// 31 | /// Creates an empty token policy with the specified token type. 32 | /// 33 | public UserTokenPolicy(UserTokenType tokenType) 34 | { 35 | Initialize(); 36 | m_tokenType = tokenType; 37 | } 38 | #endregion 39 | 40 | #region IFormattable Members 41 | /// 42 | /// Returns the object formatted as a string. 43 | /// 44 | public override string ToString() 45 | { 46 | return m_tokenType.ToString(); 47 | } 48 | 49 | /// 50 | /// Returns the string representation of the object. 51 | /// 52 | public string ToString(string format, IFormatProvider formatProvider) 53 | { 54 | if (format == null) 55 | { 56 | return String.Format(formatProvider, "{0}", ToString()); 57 | } 58 | 59 | throw new FormatException(Utils.Format("Invalid format string: '{0}'.", format)); 60 | } 61 | #endregion 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Stack/Core/Stack/Types/VariableAttributes.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1996-2016, OPC Foundation. All rights reserved. 2 | 3 | The source code in this file is covered under a dual-license scenario: 4 | - RCL: for OPC Foundation members in good-standing 5 | - GPL V2: everybody else 6 | 7 | RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ 8 | 9 | GNU General Public License as published by the Free Software Foundation; 10 | version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 11 | 12 | This source code is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | using System.ServiceModel; 20 | using System.Runtime.Serialization; 21 | using System.Security.Cryptography.X509Certificates; 22 | 23 | namespace Opc.Ua 24 | { 25 | /// 26 | /// Stores information about engineering units. 27 | /// 28 | public partial class VariableAttributes 29 | { 30 | /// 31 | /// Initializes the object with the unitName and namespaceUri. 32 | /// 33 | public VariableAttributes(object value, byte accessLevel) 34 | { 35 | Initialize(); 36 | 37 | Value = new Variant(value); 38 | AccessLevel = accessLevel; 39 | UserAccessLevel = accessLevel; 40 | MinimumSamplingInterval = MinimumSamplingIntervals.Indeterminate; 41 | Historizing = false; 42 | 43 | if (value == null) 44 | { 45 | DataType = DataTypes.BaseDataType; 46 | ValueRank = ValueRanks.Any; 47 | } 48 | else 49 | { 50 | DataType = TypeInfo.GetDataTypeId(value); 51 | ValueRank = TypeInfo.GetValueRank(value); 52 | } 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Stack/Core/Stack/Types/ViewDescription.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1996-2016, OPC Foundation. All rights reserved. 2 | 3 | The source code in this file is covered under a dual-license scenario: 4 | - RCL: for OPC Foundation members in good-standing 5 | - GPL V2: everybody else 6 | 7 | RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ 8 | 9 | GNU General Public License as published by the Free Software Foundation; 10 | version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 11 | 12 | This source code is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | */ 16 | 17 | using System; 18 | using System.Collections.Generic; 19 | using System.ServiceModel; 20 | using System.Runtime.Serialization; 21 | using System.Security.Cryptography.X509Certificates; 22 | 23 | namespace Opc.Ua 24 | { 25 | #region ViewDescription Class 26 | /// 27 | /// Describes a view to browse or query. 28 | /// 29 | public partial class ViewDescription 30 | { 31 | /// 32 | /// Returns true if the view description represents the default (null) view. 33 | /// 34 | public static bool IsDefault(ViewDescription view) 35 | { 36 | if (view == null) 37 | { 38 | return true; 39 | } 40 | 41 | if (NodeId.IsNull(view.m_viewId) && view.m_viewVersion == 0 && view.m_timestamp == DateTime.MinValue) 42 | { 43 | return true; 44 | } 45 | 46 | return false; 47 | } 48 | } 49 | #endregion 50 | } 51 | -------------------------------------------------------------------------------- /Stack/Core/Types/Constants/StatusCodes.Helpers.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1996-2016, OPC Foundation. All rights reserved. 2 | 3 | The source code in this file is covered under a dual-license scenario: 4 | - RCL: for OPC Foundation members in good-standing 5 | - GPL V2: everybody else 6 | 7 | RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ 8 | 9 | GNU General Public License as published by the Free Software Foundation; 10 | version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 11 | 12 | This source code is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | */ 16 | 17 | using System; 18 | using System.Reflection; 19 | using System.Xml; 20 | 21 | namespace Opc.Ua 22 | { 23 | /// 24 | /// A class that defines constants used by UA applications. 25 | /// 26 | public static partial class StatusCodes 27 | { 28 | #region Static Helper Functions 29 | /// 30 | /// Returns the browse name for the attribute. 31 | /// 32 | public static string GetBrowseName(uint identifier) 33 | { 34 | FieldInfo[] fields = typeof(StatusCodes).GetFields(BindingFlags.Public | BindingFlags.Static); 35 | 36 | foreach (FieldInfo field in fields) 37 | { 38 | if (identifier == (uint)field.GetValue(typeof(StatusCodes))) 39 | { 40 | return field.Name; 41 | } 42 | } 43 | 44 | return System.String.Empty; 45 | } 46 | 47 | /// 48 | /// Returns the browse names for all attributes. 49 | /// 50 | public static string[] GetBrowseNames() 51 | { 52 | FieldInfo[] fields = typeof(StatusCodes).GetFields(BindingFlags.Public | BindingFlags.Static); 53 | 54 | int ii = 0; 55 | 56 | string[] names = new string[fields.Length]; 57 | 58 | foreach (FieldInfo field in fields) 59 | { 60 | names[ii++] = field.Name; 61 | } 62 | 63 | return names; 64 | } 65 | 66 | /// 67 | /// Returns the id for the attribute with the specified browse name. 68 | /// 69 | public static uint GetIdentifier(string browseName) 70 | { 71 | FieldInfo[] fields = typeof(StatusCodes).GetFields(BindingFlags.Public | BindingFlags.Static); 72 | 73 | foreach (FieldInfo field in fields) 74 | { 75 | if (field.Name == browseName) 76 | { 77 | return (uint)field.GetValue(typeof(StatusCodes)); 78 | } 79 | } 80 | 81 | return 0; 82 | } 83 | #endregion 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /Stack/Core/Types/Schemas/BinarySchema.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1996-2016, OPC Foundation. All rights reserved. 2 | 3 | The source code in this file is covered under a dual-license scenario: 4 | - RCL: for OPC Foundation members in good-standing 5 | - GPL V2: everybody else 6 | 7 | RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ 8 | 9 | GNU General Public License as published by the Free Software Foundation; 10 | version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 11 | 12 | This source code is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | */ 16 | 17 | using System.Xml; 18 | using System.Xml.Serialization; 19 | 20 | namespace Opc.Ua.Schema.Binary 21 | { 22 | /// 23 | /// A description of type, 24 | /// 25 | public partial class TypeDescription 26 | { 27 | /// 28 | /// The qualifed name for the type. 29 | /// 30 | [XmlIgnore()] 31 | public XmlQualifiedName QName 32 | { 33 | get { return m_qname; } 34 | set { m_qname = value; } 35 | } 36 | 37 | private XmlQualifiedName m_qname; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Stack/Core/Types/Schemas/BuiltInTypes.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /Stack/Core/Types/Utils/DataComparer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OPCFoundation/Misc-Tools/de1a15d7feb7f2f1daf93c095309882d02895a8c/Stack/Core/Types/Utils/DataComparer.cs -------------------------------------------------------------------------------- /Stack/Core/Types/Utils/LocalizedData.txt: -------------------------------------------------------------------------------- 1 | =en-US 2 | Strawberry 3 | Grape 4 | Banana 5 | Pineapple 6 | Lime 7 | Lemon 8 | Blueberry 9 | Peach 10 | Mango 11 | Red 12 | Blue 13 | Green 14 | Yellow 15 | Black 16 | White 17 | Purple 18 | Cat 19 | Dog 20 | Pig 21 | Horse 22 | Rat 23 | Cow 24 | Sheep 25 | Snake 26 | Monkey 27 | Elephant 28 | Dragon 29 | =ru 30 | яблоко 31 | Виноградина 32 | Банан 33 | Ананас 34 | Известка 35 | Лимон 36 | Голубика 37 | Персик 38 | Манго 39 | Красно 40 | Голубо 41 | Зеленыйцвет 42 | Желтыйцвет 43 | Чернота 44 | Бело 45 | Пурпурово 46 | Кот 47 | Собака 48 | Свинья 49 | Лошадь 50 | Крыса 51 | Корова 52 | Овцы 53 | Змейка 54 | Обезьяна 55 | Слон 56 | Дракон 57 | =jp 58 | いちご 59 | ブドウ 60 | バナナ 61 | パイナップル 62 | 石灰 63 | レモン 64 | ブルーベリー 65 | モモ 66 | マンゴ 67 | 赤い 68 | 青い 69 | 緑 70 | 黄色 71 | 黒 72 | 白い 73 | 紫色 74 | 猫 75 | 犬 76 | ブタ 77 | 馬 78 | ラット 79 | 牛 80 | ヒツジ 81 | ヘビ 82 | 猿 83 | 象 84 | ドラゴン 85 | =zh-CN 86 | 草莓 87 | 葡萄 88 | 香蕉 89 | 菠萝 90 | 石灰 91 | 柠檬 92 | 蓝莓 93 | 桃子 94 | 芒果 95 | 红色 96 | 蓝色 97 | 绿色 98 | 黄色 99 | 黑色 100 | 白色 101 | 紫色 102 | 猫 103 | 狗 104 | 猪 105 | 马 106 | 鼠 107 | 母牛 108 | 绵羊 109 | 蛇 110 | 猴子 111 | 大象 112 | 龙 113 | =ko 114 | 딸기 115 | 포도 116 | 바나나 117 | 파인애플 118 | 석회 119 | 레몬 120 | 들쭉 121 | 복숭아 122 | 망고 123 | 빨간 124 | 파란 125 | 녹색 126 | 황색 127 | 검정 128 | 백색 129 | 자주색 130 | 고양이 131 | 개 132 | 돼지 133 | 말 134 | 쥐 135 | 암소 136 | 양 137 | 뱀 138 | 원숭이 139 | 코끼리 140 | 용 141 | =el 142 | Φράουλα 143 | Σταφύλι 144 | Μπανάνα 145 | Ανανάς 146 | Ασβέστης 147 | Λεμόνι 148 | Βακκίνιο 149 | Ροδάκινο 150 | Μάγκο 151 | Κόκκινος 152 | Μπλε 153 | Πράσινος 154 | Κίτρινος 155 | Μαύρος 156 | Ασπρος 157 | Πορφυρός 158 | Γάτα 159 | Σκυλί 160 | Χοίρος 161 | Αλογο 162 | Αρουραίος 163 | Αγελάδα 164 | Πρόβατα 165 | Φίδι 166 | Πίθηκος 167 | Ελέφαντας 168 | Δράκος -------------------------------------------------------------------------------- /build_certificate-generator.bat: -------------------------------------------------------------------------------- 1 | @ECHO off 2 | REM **************************************************************************************************************** 3 | REM ** This script builds the CertificateGenerator. 4 | REM ** This must be run from a Visual Studio command line. 5 | REM **************************************************************************************************************** 6 | SETLOCAL 7 | 8 | set SRCDIR=%~dp0 9 | set INSTALLDIR=%~dp0 10 | SET ZIP="C:\Program Files\7-zip\7z.exe" 11 | set GIT=C:\Program Files (x86)\Git\bin\git.exe 12 | set SIGNTOOL=C:\Build\sign_output.bat 13 | 14 | set GIT=C:\Program Files\Git\bin\git.exe 15 | IF NOT EXIST %GIT% set GIT=C:\Program Files (x86)\Git\bin\git.exe 16 | 17 | IF "%1"=="no-clean" GOTO noClean 18 | ECHO STEP 1) Deleting Output Directories 19 | IF EXIST %INSTALLDIR%\bin rmdir /s /q %INSTALLDIR%\bin 20 | IF EXIST %INSTALLDIR%\build rmdir /s /q %INSTALLDIR%\build 21 | IF EXIST %INSTALLDIR%\third-party\openssl rmdir /s /q %INSTALLDIR%\third-party\openssl 22 | 23 | IF NOT EXIST %INSTALLDIR%\bin MKDIR %INSTALLDIR%\bin 24 | IF NOT EXIST %INSTALLDIR%\build MKDIR %INSTALLDIR%\build 25 | IF NOT EXIST %INSTALLDIR%\third-party\openssl MKDIR %INSTALLDIR%\third-party\openssl 26 | 27 | ECHO STEP 2) Fetch from Source Control 28 | cd %SRCDIR% 29 | 30 | ECHO STEP 3) Building OpenSSL 31 | cd %SRCDIR% 32 | CALL fetch_openssl.bat 33 | cd %SRCDIR%\third-party 34 | CALL build_openssl.bat 35 | :noClean 36 | 37 | :doBuild 38 | ECHO STEP 4) Building CertificateGenerator 39 | cd %SRCDIR% 40 | IF %BUILD_NUMBER% GTR 0 ECHO #define BUILD_NUMBER %BUILD_NUMBER% > CertificateGenerator\BuildVersion.h 41 | msbuild "CertificateGenerator Solution.sln" /p:Configuration=Release 42 | 43 | ECHO STEP 5) Sign the Binaries 44 | IF EXIST "%SIGNTOOL%" CALL "%SIGNTOOL%" %INSTALLDIR%\bin\*.exe /dual 45 | 46 | ECHO STEP 6) ZIP the Binaries 47 | CD %INSTALLDIR%\bin 48 | %ZIP% a "Opc.Ua.CertificateGenerator-1.1.342.%BUILD_NUMBER%.zip" "*.exe" 49 | ECHO Created 'Opc.Ua.CertificateGenerator-1.1.342.%BUILD_NUMBER%.zip' 50 | 51 | ECHO *** ALL DONE *** 52 | GOTO theEnd 53 | 54 | :theEnd 55 | ENDLOCAL -------------------------------------------------------------------------------- /fetch_openssl.bat: -------------------------------------------------------------------------------- 1 | @ECHO off 2 | REM **************************************************************************************************************** 3 | REM ** This script builds the debug version of OpenSSL for use by the ANSI C samples. 4 | REM ** It requires that PERL be installed in the path and it must be run from a Visual Studio command line. 5 | REM **************************************************************************************************************** 6 | SETLOCAL 7 | 8 | set ROOT=%~dp0 9 | set SRCDIR=openssl-1.1.1w 10 | set GITTAG=OpenSSL_1_1_1w 11 | 12 | set GIT=C:\Program Files\Git\bin\git.exe 13 | IF NOT EXIST "%GIT%" SET GIT=C:\Program Files (x86)\Git\bin\git.exe 14 | 15 | cd %ROOT%\third-party 16 | IF NOT EXIST %SRCDIR% "%GIT%" clone https://github.com/openssl/openssl.git %SRCDIR% 17 | cd %SRCDIR% 18 | "%GIT%" checkout tags/%GITTAG% 19 | 20 | cd %ROOT%\third-party 21 | perl -pi.back -e "s/openssl-1.1.\?\?/%SRCDIR%/" build_openssl.bat 22 | -------------------------------------------------------------------------------- /third-party/build_openssl.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set ROOT=%~pd0 3 | set OPENSSL_SOURCEDIR=%ROOT%openssl-1.1.?? 4 | set OPENSSL_INSTALDIR=%ROOT%openssl 5 | set MAKEFLAGS= 6 | 7 | if not "%1" == "" goto help 8 | 9 | call :testroot %ROOT% 10 | if errorlevel 1 goto error0 11 | 12 | nmake -? >NUL 2>&1 13 | if errorlevel 1 goto error1 14 | 15 | ml -? >NUL 2>&1 16 | if errorlevel 1 goto error1 17 | 18 | perl -v >NUL 2>&1 19 | if errorlevel 1 goto error2 20 | 21 | cd /D %OPENSSL_SOURCEDIR% >NUL 2>&1 22 | if errorlevel 1 goto error3 23 | 24 | :ossl_build 25 | set CONFIGURE_INSIST=1 26 | set PERL=perl 27 | 28 | perl Configure VC-WIN32 no-asm no-shared enable-capieng no-autoload-config --prefix=%OPENSSL_INSTALDIR% --openssldir=%OPENSSL_INSTALDIR% 29 | if errorlevel 1 goto error 30 | 31 | nmake 32 | if errorlevel 1 goto error 33 | 34 | nmake install 35 | if errorlevel 1 goto error 36 | 37 | copy ..\openssl\lib\libcrypto.lib ..\openssl\lib\libeay32.lib 38 | copy ..\openssl\lib\libssl.lib ..\openssl\lib\ssleay32.lib 39 | goto ossl_done 40 | 41 | :ossl_done 42 | cd .. 43 | goto done 44 | 45 | :testroot 46 | if "%1" == "%ROOT%" exit /B 0 47 | exit /B 1 48 | 49 | :error0 50 | echo fatal error: cannot continue. 51 | echo the directory %ROOT% must not contain blanks 52 | goto done 53 | 54 | :error1 55 | echo fatal error: cannot continue. 56 | echo this batch has to be called from a 57 | echo 32bit visual studio command shell 58 | goto done 59 | 60 | :error2 61 | echo fatal error: cannot continue. 62 | echo perl has to be in the path 63 | goto done 64 | 65 | :error3 66 | cd /D %ROOT%openssl-1.1.?? >NUL 2>&1 67 | if not errorlevel 1 goto ossl_build 68 | echo fatal error: cannot continue. 69 | echo openssl sources must be at %OPENSSL_SOURCEDIR% 70 | goto done 71 | 72 | :error 73 | echo fatal error: cannot continue. 74 | 75 | :help 76 | echo this batch has to be called from a 77 | echo 32bit visual studio command shell 78 | echo the directory %ROOT% must not contain blanks 79 | echo openssl sources must be at %OPENSSL_SOURCEDIR% 80 | echo perl has to be in the path 81 | 82 | :done 83 | -------------------------------------------------------------------------------- /third-party/readme.md: -------------------------------------------------------------------------------- 1 | # UA-MiscTools Third Party Library Readme # 2 | ## Overview ## 3 | This directory contains references to other GitHub projects which the samples depend on. 4 | For each project there is BATCH file which builds and installes the headers and libs in the third-party directory. 5 | The source respository must be cloned first. 6 | 7 | After cloning the repository the subprojects in the third-party directory need to be fetched using this command: 8 | ``` 9 | cd third-party 10 | git submodule update --init --recursive 11 | ``` 12 | 13 | ## openssl ## 14 | An open source cryptography library. 15 | The respository is here: https://github.com/openssl/openssl.git 16 | 17 | The command to clone is: 18 | 19 | ``` 20 | cd src 21 | git clone https://github.com/openssl/openssl.git 22 | cd openssl 23 | git checkout tags/OpenSSL_1_1_1a 24 | ``` 25 | 26 | As new versions are published the tag reference in the command above should be adjusted accordingly. 27 | Note that the git submodule update --init --recursive command should eliminate the need for the steps above. 28 | 29 | Once the OpenSSL repository is cloned it can be built from a VS2015 command prompt with *build_openssl.bat*. 30 | 31 | --------------------------------------------------------------------------------