| ///////////////////////////////////////////////////////////////////////////////////// |
| // Copyright (c) 2000-2019 Ericsson Telecom AB |
| // All rights reserved. This program and the accompanying materials |
| // are made available under the terms of the Eclipse Public License v2.0 |
| // which accompanies this distribution, and is available at |
| // https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html |
| ///////////////////////////////////////////////////////////////////////////////////// |
| // Contributors: |
| // Akos Makovics |
| // |
| // File: OpcUa_Templates_JSON_Reversible.ttcn |
| // Rev: <RnXnn> |
| // Prodnr: CNL113861 |
| ///////////////////////////////////////////////////////////////////////////////////// |
| |
| module OpcUa_Templates_JSON_Non_Reversible { |
| |
| import from OpcUa_Types_JSON_Non_Reversible all; |
| |
| ///////////////////////////////////////////////////////////// |
| // Templates // |
| // Note: Not every type has a template, and // |
| // some types may have multiple templates. // |
| ///////////////////////////////////////////////////////////// |
| // // |
| // Complex Types // |
| // // |
| ///////////////////////////////////////////////////////////// |
| |
| template NodeIdNamsespace tr_Namespace ( |
| String namespace |
| ) := { |
| StringNamespace := namespace |
| } |
| |
| template NodeIdNamsespace tr_Namespace_1 := { |
| IntNamespace := 1 |
| } |
| |
| //NodeId with an UInt32 value |
| template NodeId tr_NodeId_UInt32 ( |
| UInt32 Id, |
| template NodeIdNamsespace Namespace |
| ):= { |
| IdType := omit, |
| Id := { |
| UInt32NodeId := Id |
| }, |
| Namespace := Namespace |
| } |
| //NodeId with a String value |
| template NodeId tr_NodeId_String ( |
| String Id, |
| template NodeIdNamsespace Namespace |
| ):= { |
| IdType := 1, |
| Id := { |
| StringNodeId := Id |
| }, |
| Namespace := Namespace |
| } |
| //NodeId with a GUID value |
| template NodeId tr_NodeId_GUID ( |
| Guid Id, |
| template NodeIdNamsespace Namespace |
| ):= { |
| IdType := 2, |
| Id := { |
| GuidNodeId := Id |
| }, |
| Namespace := Namespace |
| } |
| //NodeId with a ByteString value |
| template NodeId tr_NodeId_ByteString ( |
| ByteString Id, |
| template NodeIdNamsespace Namespace |
| ):= { |
| IdType := 3, |
| Id := { |
| ByteStringNodeId := Id |
| }, |
| Namespace := Namespace |
| } |
| //ExpandedNodeId with an UInt32 value |
| template ExpandedNodeId tr_ExpandedNodeId_UInt32 ( |
| UInt32 Id, |
| template NodeIdNamsespace Namespace, |
| template String ServerURI |
| ):= { |
| IdType := omit, |
| Id := { |
| UInt32NodeId := Id |
| }, |
| Namespace := Namespace, |
| ServerURI := ServerURI |
| } |
| //ExpandedNodeId with a String value |
| template ExpandedNodeId tr_ExpandedNodeId_String ( |
| String Id, |
| template NodeIdNamsespace Namespace, |
| template String ServerURI |
| ):= { |
| IdType := 1, |
| Id := { |
| StringNodeId := Id |
| }, |
| Namespace := Namespace, |
| ServerURI := ServerURI |
| } |
| //ExpandedNodeId with a GUID value |
| template ExpandedNodeId tr_ExpandedNodeId_GUID ( |
| Guid Id, |
| template NodeIdNamsespace Namespace, |
| template String ServerURI |
| ):= { |
| IdType := 2, |
| Id := { |
| GuidNodeId := Id |
| }, |
| Namespace := Namespace, |
| ServerURI := ServerURI |
| } |
| //ExpandedNodeId with a ByteString value |
| template ExpandedNodeId tr_ExpandedNodeId_ByteString ( |
| ByteString Id, |
| template NodeIdNamsespace Namespace, |
| template String ServerURI |
| ):= { |
| IdType := 3, |
| Id := { |
| ByteStringNodeId := Id |
| }, |
| Namespace := Namespace, |
| ServerURI := ServerURI |
| } |
| } |