forked from cisagov/icsnpp-opcua-binary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
opcua_binary-browse.pac
88 lines (77 loc) · 2.9 KB
/
opcua_binary-browse.pac
1
2
3
4
5
6
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
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
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
86
87
88
## opcua_binary-browse.pac
##
## OPCUA Binary Protocol Analyzer
##
## Binpac code for processing the browse service.
##
## Author: Melanie Pierce
## Contact: [email protected]
##
## Copyright (c) 2022 Battelle Energy Alliance, LLC. All rights reserved.
#
# UA Specification Part 4 - Services 1.04.pdf - Browse
# 5.8.2.2 - Table 34 - Browse Service Parameters
#
type Browse_Req(service: Service) = record {
req_hdr : Request_Header;
view_description : OpcUA_ViewDescription;
req_max_refs_per_node : uint32; # Full name is RequestedMaxReferencesPerNode
num_nodes_to_browse : int32; # Not documented in UA Specifications, found in the open62541 source code
nodes_to_browse : Browse_Description[$context.flow.bind_length(num_nodes_to_browse)];
} &let {
deliver: bool = $context.flow.deliver_Svc_BrowseReq(this);
} &byteorder=littleendian;
type Browse_Description = record {
node_id : OpcUA_NodeId;
browse_direction_id : int32;
ref_type_id : OpcUA_NodeId;
include_subtypes : int8;
node_class_mask : uint32;
result_mask : uint32;
} &byteorder=littleendian;
type Browse_Res(service: Service) = record {
res_hdr : Response_Header;
results_table_size : int32;
results : Browse_Result[$context.flow.bind_length(results_table_size)];
diag_info_size : int32;
diag_info : OpcUA_DiagInfo[$context.flow.bind_length(diag_info_size)];
} &let {
deliver: bool = $context.flow.deliver_Svc_BrowseRes(this);
} &byteorder=littleendian;
#
# UA Specification Part 4 - Services 1.04.pdf - Browse
# 5.8.3.2 - Table 37 - BrowseNext Service Parameters
#
type Browse_Next_Req(service: Service) = record {
req_hdr : Request_Header;
release_continuation_points : uint8; # Actually a boolean but represented as an unsigned int;
num_continuation_points : int32;
continuation_points : OpcUA_ByteString[$context.flow.bind_length(num_continuation_points)];
} &let {
deliver: bool = $context.flow.deliver_Svc_BrowseNextReq(this);
} &byteorder=littleendian;
#
# UA Specification Part 4 - Services 1.04.pdf
#
# 7.25 - Table 167 - ReferenceDescription
#
type Browse_ReferenceDescription = record {
ref_type_id : OpcUA_NodeId;
is_forward : int8;
target_node_id : OpcUA_ExpandedNodeId;
browse_name : OpcUA_QualifiedName;
display_name : OpcUA_LocalizedText;
node_class : uint32;
type_definition : OpcUA_ExpandedNodeId;
} &byteorder=littleendian;
#
# UA Specification Part 4 - Services 1.04.pdf
#
# 7.39 - Table 114 - BrowseResult
#
type Browse_Result = record {
status_code : OpcUA_StatusCode;
continuation_point : OpcUA_ByteString;
num_references : int32;
references : Browse_ReferenceDescription[$context.flow.bind_length(num_references)];
} &byteorder=littleendian;