Coverage Report

Created: 2025-11-16 06:38

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/S2OPC/src/ClientServer/services/bgenc/namespace_uri.c
Line
Count
Source
1
/*
2
 * Licensed to Systerel under one or more contributor license
3
 * agreements. See the NOTICE file distributed with this work
4
 * for additional information regarding copyright ownership.
5
 * Systerel licenses this file to you under the Apache
6
 * License, Version 2.0 (the "License"); you may not use this
7
 * file except in compliance with the License. You may obtain
8
 * a copy of the License at
9
 *
10
 *   http://www.apache.org/licenses/LICENSE-2.0
11
 *
12
 * Unless required by applicable law or agreed to in writing,
13
 * software distributed under the License is distributed on an
14
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
 * KIND, either express or implied.  See the License for the
16
 * specific language governing permissions and limitations
17
 * under the License.
18
 */
19
20
/******************************************************************************
21
22
 File Name            : namespace_uri.c
23
24
 Date                 : 17/10/2024 16:34:13
25
26
 C Translator Version : tradc Java V1.2 (06/02/2022)
27
28
******************************************************************************/
29
30
/*------------------------
31
   Exported Declarations
32
  ------------------------*/
33
#include "namespace_uri.h"
34
35
/*------------------------
36
   INITIALISATION Clause
37
  ------------------------*/
38
0
void namespace_uri__INITIALISATION(void) {
39
0
}
40
41
/*--------------------
42
   OPERATIONS Clause
43
  --------------------*/
44
void namespace_uri__l_ref_get_node(
45
   const constants__t_Reference_i namespace_uri__p_ref,
46
   constants__t_Node_i * const namespace_uri__p_node,
47
0
   constants__t_NodeId_i * const namespace_uri__p_nodeId) {
48
0
   {
49
0
      constants__t_ExpandedNodeId_i namespace_uri__l_ref_target;
50
0
      t_bool namespace_uri__l_local_server;
51
0
      constants__t_NodeId_i namespace_uri__l_ref_target_NodeId;
52
0
      t_bool namespace_uri__l_isvalid;
53
0
      constants__t_Node_i namespace_uri__l_ref_target_Node;
54
      
55
0
      *namespace_uri__p_node = constants__c_Node_indet;
56
0
      *namespace_uri__p_nodeId = constants__c_NodeId_indet;
57
0
      address_space_bs__get_Reference_TargetNode(namespace_uri__p_ref,
58
0
         &namespace_uri__l_ref_target);
59
0
      constants__getall_conv_ExpandedNodeId_NodeId(namespace_uri__l_ref_target,
60
0
         &namespace_uri__l_local_server,
61
0
         &namespace_uri__l_ref_target_NodeId);
62
0
      if (namespace_uri__l_local_server == true) {
63
0
         address_space_bs__readall_AddressSpace_Node(namespace_uri__l_ref_target_NodeId,
64
0
            &namespace_uri__l_isvalid,
65
0
            &namespace_uri__l_ref_target_Node);
66
0
         if (namespace_uri__l_isvalid == true) {
67
0
            *namespace_uri__p_node = namespace_uri__l_ref_target_Node;
68
0
            *namespace_uri__p_nodeId = namespace_uri__l_ref_target_NodeId;
69
0
         }
70
0
      }
71
0
   }
72
0
}
73
74
void namespace_uri__ref_maybe_get_NamespaceUri(
75
   const constants__t_Reference_i namespace_uri__p_ref,
76
0
   constants__t_Variant_i * const namespace_uri__p_maybe_val_NamespaceUri) {
77
0
   {
78
0
      constants__t_Node_i namespace_uri__l_ref_target_Node;
79
0
      constants__t_NodeId_i namespace_uri__l_ref_target_NodeId;
80
0
      constants__t_NodeClass_i namespace_uri__l_NodeClass;
81
0
      constants__t_QualifiedName_i namespace_uri__l_browseName;
82
0
      t_bool namespace_uri__l_browseName_comparison;
83
0
      constants_statuscodes_bs__t_StatusCode_i namespace_uri__l_sc;
84
0
      constants__t_Variant_i namespace_uri__l_val;
85
0
      constants__t_RawStatusCode namespace_uri__l_val_sc;
86
0
      constants__t_Timestamp namespace_uri__l_val_ts_src;
87
      
88
0
      *namespace_uri__p_maybe_val_NamespaceUri = constants__c_Variant_indet;
89
0
      namespace_uri__l_NodeClass = constants__c_NodeClass_indet;
90
0
      namespace_uri__l_ref_get_node(namespace_uri__p_ref,
91
0
         &namespace_uri__l_ref_target_Node,
92
0
         &namespace_uri__l_ref_target_NodeId);
93
0
      if (namespace_uri__l_ref_target_Node != constants__c_Node_indet) {
94
0
         address_space_bs__get_NodeClass(namespace_uri__l_ref_target_Node,
95
0
            &namespace_uri__l_NodeClass);
96
0
      }
97
0
      if (namespace_uri__l_NodeClass == constants__e_ncl_Variable) {
98
0
         address_space_bs__get_BrowseName(namespace_uri__l_ref_target_Node,
99
0
            &namespace_uri__l_browseName);
100
0
         constants__is_QualifiedNames_Equal(namespace_uri__l_browseName,
101
0
            constants__c_NamespaceUri_QualifiedName,
102
0
            &namespace_uri__l_browseName_comparison);
103
0
         if (namespace_uri__l_browseName_comparison == true) {
104
0
            address_space_bs__read_AddressSpace_Raw_Node_Value_value(namespace_uri__l_ref_target_Node,
105
0
               namespace_uri__l_ref_target_NodeId,
106
0
               constants__e_aid_Value,
107
0
               &namespace_uri__l_sc,
108
0
               &namespace_uri__l_val,
109
0
               &namespace_uri__l_val_sc,
110
0
               &namespace_uri__l_val_ts_src);
111
0
            *namespace_uri__p_maybe_val_NamespaceUri = namespace_uri__l_val;
112
0
         }
113
0
      }
114
0
   }
115
0
}
116