| ///////////////////////////////////////////////////////////////////////////////////// |
| // Copyright (c) 2017-2018 Ericsson 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_Reversible { |
| |
| import from OpcUa_Types_JSON_Reversible all; |
| |
| ///////////////////////////////////////////////////////////// |
| // Templates // |
| // Note: Not every type has a template, and // |
| // some types may have multiple templates. // |
| ///////////////////////////////////////////////////////////// |
| // // |
| // Complex Types // |
| // // |
| ///////////////////////////////////////////////////////////// |
| |
| //NodeId with an UInt32 value |
| template NodeId tr_NodeId_UInt32 ( |
| UInt32 Id, |
| template integer Namespace |
| ):= { |
| IdType := omit, |
| Id := { |
| UInt32NodeId := Id |
| }, |
| Namespace := Namespace |
| } |
| //NodeId with a String value |
| template NodeId tr_NodeId_String ( |
| String Id, |
| template integer Namespace |
| ):= { |
| IdType := 1, |
| Id := { |
| StringNodeId := Id |
| }, |
| Namespace := Namespace |
| } |
| //NodeId with a GUID value |
| template NodeId tr_NodeId_GUID ( |
| Guid Id, |
| template integer Namespace |
| ):= { |
| IdType := 2, |
| Id := { |
| GuidNodeId := Id |
| }, |
| Namespace := Namespace |
| } |
| //NodeId with a ByteString value |
| template NodeId tr_NodeId_ByteString ( |
| ByteString Id, |
| template integer Namespace |
| ):= { |
| IdType := 3, |
| Id := { |
| ByteStringNodeId := Id |
| }, |
| Namespace := Namespace |
| } |
| //ExpandedNodeId with an UInt32 value |
| template ExpandedNodeId tr_ExpandedNodeId_UInt32 ( |
| UInt32 Id, |
| template integer Namespace, |
| template integer ServerURI |
| ):= { |
| IdType := omit, |
| Id := { |
| UInt32NodeId := Id |
| }, |
| Namespace := Namespace, |
| ServerURI := ServerURI |
| } |
| //ExpandedNodeId with a String value |
| template ExpandedNodeId tr_ExpandedNodeId_String ( |
| String Id, |
| template integer Namespace, |
| template integer ServerURI |
| ):= { |
| IdType := 1, |
| Id := { |
| StringNodeId := Id |
| }, |
| Namespace := Namespace, |
| ServerURI := ServerURI |
| } |
| //ExpandedNodeId with a GUID value |
| template ExpandedNodeId tr_ExpandedNodeId_GUID ( |
| Guid Id, |
| template integer Namespace, |
| template integer ServerURI |
| ):= { |
| IdType := 2, |
| Id := { |
| GuidNodeId := Id |
| }, |
| Namespace := Namespace, |
| ServerURI := ServerURI |
| } |
| //ExpandedNodeId with a ByteString value |
| template ExpandedNodeId tr_ExpandedNodeId_ByteString ( |
| ByteString Id, |
| template integer Namespace, |
| template integer ServerURI |
| ):= { |
| IdType := 3, |
| Id := { |
| ByteStringNodeId := Id |
| }, |
| Namespace := Namespace, |
| ServerURI := ServerURI |
| } |
| } |