opcua 0.16 → 0.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cert/cert.h +52 -52
- data/cert/cert_key.h +101 -101
- data/example/client_method.rb +6 -3
- data/example/server.rb +8 -0
- data/ext/opcua/helpers/finders.c +28 -0
- data/ext/opcua/helpers/finders.h +1 -0
- data/ext/opcua/server/server.c +54 -15
- data/opcua.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0db03f5834abcdab2682a136b09b7418e1422701f51980e617bc82602296c38f
|
4
|
+
data.tar.gz: 4c50c505b039def2e6a92ba7bf1bd3525455d0bc4e2c1fb0837a9ac12b7fe4c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 667d288e443af2218f3512f9df11a08695c2ba01113628353593378094d0162101617bc3439eaf95a81fd75eeb59d6a2b66c6ec7060b37809e526d91087f89db
|
7
|
+
data.tar.gz: 76233d386703477a5e76bc420418cdd19dace83c28e90ffd97f7ed3c8476b285a03b5744dfa6a794678e960d175e057f6cc8d93a4ea371c524527e4e1de28cce
|
data/cert/cert.h
CHANGED
@@ -1,70 +1,70 @@
|
|
1
1
|
unsigned char cert_der[] = {
|
2
2
|
0x30, 0x82, 0x03, 0x18, 0x30, 0x82, 0x02, 0x00, 0xa0, 0x03, 0x02, 0x01,
|
3
|
-
0x02, 0x02, 0x14,
|
4
|
-
|
3
|
+
0x02, 0x02, 0x14, 0x66, 0x50, 0x4c, 0xcb, 0xe2, 0xe7, 0x17, 0xdf, 0x63,
|
4
|
+
0x3d, 0xb6, 0xb6, 0x21, 0xc0, 0xb8, 0xbe, 0xf7, 0xed, 0xb9, 0x03, 0x30,
|
5
5
|
0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b,
|
6
6
|
0x05, 0x00, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04,
|
7
7
|
0x03, 0x0c, 0x0a, 0x72, 0x75, 0x62, 0x79, 0x2d, 0x6f, 0x70, 0x63, 0x75,
|
8
|
-
0x61, 0x30, 0x1e, 0x17, 0x0d,
|
9
|
-
0x30,
|
10
|
-
|
8
|
+
0x61, 0x30, 0x1e, 0x17, 0x0d, 0x32, 0x30, 0x30, 0x31, 0x32, 0x39, 0x30,
|
9
|
+
0x30, 0x31, 0x36, 0x31, 0x35, 0x5a, 0x17, 0x0d, 0x32, 0x31, 0x30, 0x31,
|
10
|
+
0x31, 0x38, 0x30, 0x30, 0x31, 0x36, 0x31, 0x35, 0x5a, 0x30, 0x15, 0x31,
|
11
11
|
0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x0a, 0x72, 0x75,
|
12
12
|
0x62, 0x79, 0x2d, 0x6f, 0x70, 0x63, 0x75, 0x61, 0x30, 0x82, 0x01, 0x22,
|
13
13
|
0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01,
|
14
14
|
0x01, 0x05, 0x00, 0x03, 0x82, 0x01, 0x0f, 0x00, 0x30, 0x82, 0x01, 0x0a,
|
15
|
-
0x02, 0x82, 0x01, 0x01, 0x00,
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
15
|
+
0x02, 0x82, 0x01, 0x01, 0x00, 0xd3, 0x9e, 0x23, 0xa0, 0xc8, 0x37, 0x41,
|
16
|
+
0xa1, 0x41, 0xe3, 0x17, 0xe9, 0x75, 0xcb, 0x52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x5b, 0xeb, 0xd5, 0xe4, 0x01, 0x24,
|
31
|
+
0x3d, 0x8e, 0xe0, 0xd6, 0x0d, 0xd2, 0x8d, 0x9c, 0x38, 0x93, 0x61, 0x62,
|
32
|
+
0xa7, 0x0a, 0x51, 0x90, 0x21, 0x4a, 0x52, 0xb8, 0xec, 0xda, 0x7e, 0xd0,
|
33
|
+
0xd1, 0xe6, 0x53, 0x98, 0xb6, 0x0c, 0x2c, 0x94, 0x16, 0x69, 0x18, 0x42,
|
34
|
+
0x86, 0xd9, 0x98, 0xa8, 0xb0, 0x67, 0x5a, 0xac, 0xdd, 0xe4, 0x76, 0x7a,
|
35
|
+
0x38, 0x50, 0xd0, 0x34, 0x0f, 0x1b, 0x4a, 0x89, 0x17, 0xd4, 0x8f, 0x01,
|
36
|
+
0xcc, 0x38, 0xdd, 0x2a, 0xf0, 0x59, 0x5c, 0x66, 0x69, 0x02, 0x03, 0x01,
|
37
37
|
0x00, 0x01, 0xa3, 0x60, 0x30, 0x5e, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d,
|
38
|
-
0x0e, 0x04, 0x16, 0x04, 0x14,
|
39
|
-
|
40
|
-
|
38
|
+
0x0e, 0x04, 0x16, 0x04, 0x14, 0xba, 0x06, 0xb6, 0x78, 0x09, 0x9b, 0x05,
|
39
|
+
0xbd, 0x97, 0x66, 0x15, 0x4d, 0x5f, 0x27, 0x6c, 0x6e, 0x21, 0x38, 0x8c,
|
40
|
+
0x26, 0x30, 0x0f, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04,
|
41
41
|
0x05, 0x30, 0x03, 0x01, 0x01, 0xff, 0x30, 0x1c, 0x06, 0x03, 0x55, 0x1d,
|
42
42
|
0x11, 0x04, 0x15, 0x30, 0x13, 0x86, 0x11, 0x72, 0x75, 0x62, 0x79, 0x2d,
|
43
43
|
0x6f, 0x70, 0x63, 0x75, 0x61, 0x3a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74,
|
44
44
|
0x30, 0x0e, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x01, 0x01, 0xff, 0x04, 0x04,
|
45
45
|
0x03, 0x02, 0x05, 0xa0, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86,
|
46
46
|
0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x82, 0x01, 0x01, 0x00,
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
47
|
+
0x3b, 0x89, 0x80, 0xbf, 0x90, 0xab, 0x10, 0xe2, 0xd3, 0x9e, 0x4b, 0xa8,
|
48
|
+
0xb1, 0x74, 0x27, 0xb0, 0x96, 0x6a, 0x02, 0x98, 0x61, 0x69, 0x6e, 0xd8,
|
49
|
+
0x1a, 0x8e, 0xb0, 0x80, 0x55, 0x56, 0x4f, 0x46, 0xef, 0x45, 0x54, 0x42,
|
50
|
+
0x51, 0x41, 0xa0, 0x49, 0xbe, 0x8c, 0x87, 0xfe, 0x8a, 0x02, 0xf6, 0x60,
|
51
|
+
0x07, 0xf6, 0x06, 0xf2, 0x72, 0xab, 0x02, 0x07, 0xd6, 0x21, 0xa0, 0x0e,
|
52
|
+
0xb3, 0x86, 0x42, 0x3e, 0x0d, 0x14, 0xb9, 0x9b, 0x76, 0xcb, 0x11, 0xf2,
|
53
|
+
0x9b, 0xb0, 0xb9, 0xe8, 0xf0, 0x13, 0x2e, 0xe8, 0xfd, 0x97, 0xee, 0x3b,
|
54
|
+
0x54, 0x99, 0x4c, 0xef, 0x50, 0x31, 0x2a, 0x92, 0x5e, 0xbf, 0x79, 0xe3,
|
55
|
+
0x1a, 0x6e, 0xfd, 0xd4, 0xa7, 0x76, 0xf0, 0xaa, 0xc9, 0x65, 0xb9, 0xa1,
|
56
|
+
0x6b, 0x44, 0x9a, 0x07, 0xf9, 0x47, 0x25, 0xc3, 0xd3, 0xd1, 0xe8, 0x95,
|
57
|
+
0x8c, 0xc9, 0x0d, 0x9e, 0xb7, 0x16, 0xc6, 0x75, 0xf6, 0xea, 0xb0, 0xfd,
|
58
|
+
0xc1, 0x76, 0x12, 0x72, 0xe9, 0x5c, 0x4f, 0x22, 0x51, 0xed, 0x1b, 0xe6,
|
59
|
+
0x0e, 0xbc, 0xdc, 0xec, 0x13, 0x4b, 0x74, 0xe0, 0xdc, 0xbb, 0x32, 0x19,
|
60
|
+
0x04, 0x84, 0x0c, 0x88, 0x4f, 0x93, 0x19, 0xd0, 0x76, 0x6d, 0xb4, 0xc0,
|
61
|
+
0xb1, 0xc6, 0x01, 0x3f, 0xf6, 0xa2, 0x36, 0x4d, 0x96, 0x32, 0x06, 0xe2,
|
62
|
+
0x4b, 0xd1, 0x77, 0x5c, 0x8e, 0x18, 0xb4, 0xc1, 0x5d, 0x2d, 0x4d, 0x5a,
|
63
|
+
0x4a, 0x7a, 0x88, 0x96, 0xf4, 0xb0, 0xba, 0xb3, 0x95, 0x98, 0xc9, 0x70,
|
64
|
+
0xc1, 0x71, 0x09, 0xd3, 0x69, 0x54, 0xf5, 0xf0, 0xf4, 0xb3, 0xd8, 0xdb,
|
65
|
+
0x56, 0x28, 0x01, 0x72, 0x6b, 0x6e, 0x58, 0x3e, 0x2c, 0x66, 0xcc, 0xda,
|
66
|
+
0xfc, 0x87, 0x55, 0x39, 0x45, 0x24, 0x3c, 0x5f, 0xf0, 0x38, 0x79, 0xe4,
|
67
|
+
0xda, 0xd9, 0x0b, 0xfd, 0xe2, 0x36, 0x57, 0x47, 0xc9, 0xf4, 0x49, 0xa0,
|
68
|
+
0x28, 0xb5, 0x70, 0x6a
|
69
69
|
};
|
70
70
|
unsigned int cert_der_len = 796;
|
data/cert/cert_key.h
CHANGED
@@ -1,103 +1,103 @@
|
|
1
1
|
unsigned char cert_key_der[] = {
|
2
|
-
0x30, 0x82, 0x04,
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
0xa2,
|
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
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
2
|
+
0x30, 0x82, 0x04, 0xa4, 0x02, 0x01, 0x00, 0x02, 0x82, 0x01, 0x01, 0x00,
|
3
|
+
0xd3, 0x9e, 0x23, 0xa0, 0xc8, 0x37, 0x41, 0xa1, 0x41, 0xe3, 0x17, 0xe9,
|
4
|
+
0x75, 0xcb, 0x52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60,
|
32
|
+
0x98, 0xc7, 0x11, 0x5a, 0xc3, 0x57, 0x02, 0x3d, 0x42, 0x72, 0x86, 0x64,
|
33
|
+
0x36, 0x77, 0x57, 0xe9, 0xff, 0xbd, 0x7d, 0x63, 0x8f, 0xf2, 0x3a, 0x8b,
|
34
|
+
0x36, 0xbe, 0x24, 0xda, 0xec, 0x5a, 0x83, 0x47, 0xd2, 0x14, 0xb7, 0x43,
|
35
|
+
0x67, 0x66, 0x34, 0x49, 0x3c, 0x19, 0xcb, 0x9c, 0x00, 0x90, 0xa8, 0x67,
|
36
|
+
0x86, 0xf0, 0xfa, 0x9c, 0xf4, 0x4c, 0x12, 0x1b, 0x94, 0xae, 0x63, 0x58,
|
37
|
+
0xee, 0x9c, 0x52, 0x8f, 0x1b, 0xbe, 0x85, 0x01, 0x2e, 0x2d, 0x53, 0x6e,
|
38
|
+
0x9b, 0xb9, 0x07, 0x16, 0x9e, 0x06, 0xa0, 0x10, 0x07, 0x62, 0x9c, 0xc4,
|
39
|
+
0xc3, 0x65, 0x26, 0xbe, 0xe9, 0xa4, 0x97, 0x7a, 0x75, 0xcc, 0xb6, 0x10,
|
40
|
+
0x65, 0x83, 0x18, 0x12, 0x29, 0x51, 0x9c, 0xae, 0xc8, 0xa3, 0x5c, 0x4f,
|
41
|
+
0x00, 0xdb, 0x59, 0xd8, 0x39, 0x32, 0x48, 0x4f, 0x59, 0xb7, 0x82, 0x6f,
|
42
|
+
0xde, 0xe0, 0xd7, 0x53, 0xd9, 0xc9, 0x4a, 0x2a, 0xc8, 0x03, 0xc1, 0xb5,
|
43
|
+
0x92, 0x2f, 0xe8, 0x9b, 0x97, 0x83, 0x5a, 0x96, 0xad, 0x23, 0x02, 0xfc,
|
44
|
+
0xba, 0xc3, 0x2b, 0x75, 0x66, 0xf3, 0x56, 0x77, 0x5e, 0xa4, 0x65, 0xf8,
|
45
|
+
0x36, 0xc2, 0xda, 0x90, 0x61, 0x70, 0x24, 0xaa, 0xdf, 0x88, 0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, 0xbe,
|
101
|
+
0xec, 0x37, 0x95, 0xe0
|
102
102
|
};
|
103
|
-
unsigned int cert_key_der_len =
|
103
|
+
unsigned int cert_key_der_len = 1192;
|
data/example/client_method.rb
CHANGED
@@ -13,6 +13,9 @@ client.default_ns = 2
|
|
13
13
|
# p node.call 'abcde', Time.now
|
14
14
|
# client.disconnect
|
15
15
|
|
16
|
-
node = client.get 1, 62541
|
17
|
-
p node.to_s
|
18
|
-
p node.call 'a'
|
16
|
+
# node = client.get 1, 62541
|
17
|
+
# p node.to_s
|
18
|
+
# p node.call 'a'
|
19
|
+
|
20
|
+
node = client.get '/KalimatC34/Tools/Tool3/testRetMethod'
|
21
|
+
p node.call 'abcde'
|
data/example/server.rb
CHANGED
@@ -27,6 +27,14 @@ Daemonite.new do
|
|
27
27
|
p test2
|
28
28
|
puts '-' * 10
|
29
29
|
end
|
30
|
+
t.add_method :testRetMethod, test1: OPCUA::TYPES::STRING, return: OPCUA::TYPES::STRING do |node, test1|
|
31
|
+
ns, nid = node.id
|
32
|
+
puts '-' * 10
|
33
|
+
p nid
|
34
|
+
p test1
|
35
|
+
puts '-' * 10
|
36
|
+
"hello world"
|
37
|
+
end
|
30
38
|
t.add_object(:Measurements, opts['server'].types.folder).tap{ |u|
|
31
39
|
u.add_object :M, mt, OPCUA::OPTIONAL
|
32
40
|
}
|
data/ext/opcua/helpers/finders.c
CHANGED
@@ -46,6 +46,34 @@ bool server_node_get_reference(UA_Server *server, UA_NodeId parent, UA_NodeId *r
|
|
46
46
|
return false;
|
47
47
|
}
|
48
48
|
|
49
|
+
bool server_node_get_reference_by_name(UA_Server *server, UA_NodeId parent, UA_QualifiedName name, UA_NodeId *result, bool inverse) {
|
50
|
+
UA_BrowseDescription bDes;
|
51
|
+
UA_BrowseDescription_init(&bDes);
|
52
|
+
bDes.nodeId = parent;
|
53
|
+
bDes.resultMask = UA_BROWSERESULTMASK_ALL;
|
54
|
+
bDes.browseDirection = inverse ? 1 : 0;
|
55
|
+
UA_BrowseResult bRes = UA_Server_browse(server, 999, &bDes);
|
56
|
+
|
57
|
+
for (int i=0; i < bRes.referencesSize; i++) {
|
58
|
+
UA_ReferenceDescription *ref = &(bRes.references[i]);
|
59
|
+
|
60
|
+
UA_QualifiedName qn; UA_QualifiedName_init(&qn);
|
61
|
+
UA_Server_readBrowseName(server, ref->nodeId.nodeId, &qn);
|
62
|
+
|
63
|
+
if (UA_QualifiedName_equal(&qn,&name)) {
|
64
|
+
UA_NodeId_copy(&ref->nodeId.nodeId,result);
|
65
|
+
|
66
|
+
UA_BrowseResult_deleteMembers(&bRes);
|
67
|
+
UA_BrowseResult_clear(&bRes);
|
68
|
+
return true;
|
69
|
+
}
|
70
|
+
}
|
71
|
+
|
72
|
+
UA_BrowseResult_deleteMembers(&bRes);
|
73
|
+
UA_BrowseResult_clear(&bRes);
|
74
|
+
return false;
|
75
|
+
}
|
76
|
+
|
49
77
|
bool client_node_get_reference_by_name(UA_Client *client, UA_NodeId parent, UA_QualifiedName name, UA_NodeId *result, bool inverse) {
|
50
78
|
UA_BrowseRequest bReq;
|
51
79
|
UA_BrowseRequest_init(&bReq);
|
data/ext/opcua/helpers/finders.h
CHANGED
@@ -6,6 +6,7 @@
|
|
6
6
|
|
7
7
|
RUBY_EXTERN UA_BrowsePathResult node_browse_path(UA_Server *server, UA_NodeId relative, UA_NodeId ref, UA_QualifiedName mqn, bool inverse);
|
8
8
|
RUBY_EXTERN bool server_node_get_reference(UA_Server *server, UA_NodeId parent, UA_NodeId *result, bool inverse);
|
9
|
+
RUBY_EXTERN bool server_node_get_reference_by_name(UA_Server *server, UA_NodeId parent, UA_QualifiedName name, UA_NodeId *result, bool inverse);
|
9
10
|
RUBY_EXTERN bool client_node_get_reference_by_name(UA_Client *client, UA_NodeId parent, UA_QualifiedName name, UA_NodeId *result, bool inverse);
|
10
11
|
RUBY_EXTERN bool client_node_get_reference_by_type(UA_Client *client, UA_NodeId parent, UA_NodeId type, UA_NodeId *result, bool inverse);
|
11
12
|
RUBY_EXTERN bool client_node_list_references(UA_Client *client, UA_NodeId parent, bool inverse);
|
data/ext/opcua/server/server.c
CHANGED
@@ -224,11 +224,15 @@ static UA_StatusCode node_add_method_callback( //{{{
|
|
224
224
|
rb_ary_push(args,rb_ary_entry(ret,0));
|
225
225
|
}
|
226
226
|
|
227
|
-
rb_proc_call(me->method,args);
|
227
|
+
VALUE ret = rb_proc_call(me->method,args);
|
228
|
+
|
229
|
+
if (outputSize == 1) {
|
230
|
+
value_to_variant(ret,output,-1);
|
231
|
+
}
|
228
232
|
|
229
233
|
return UA_STATUSCODE_GOOD;
|
230
234
|
} //}}}
|
231
|
-
static UA_NodeId node_add_method_ua(UA_NodeId n, UA_LocalizedText dn, UA_QualifiedName qn, node_struct *parent,size_t inputArgumentsSize,const UA_Argument *inputArguments, VALUE blk) { //{{{
|
235
|
+
static UA_NodeId node_add_method_ua(UA_NodeId n, UA_LocalizedText dn, UA_QualifiedName qn, node_struct *parent,size_t inputArgumentsSize,const UA_Argument *inputArguments,size_t outputArgumentsSize,const UA_Argument *outputArguments, VALUE blk) { //{{{
|
232
236
|
UA_MethodAttributes mnAttr = UA_MethodAttributes_default;
|
233
237
|
mnAttr.displayName = dn;
|
234
238
|
mnAttr.executable = true;
|
@@ -248,8 +252,8 @@ static UA_NodeId node_add_method_ua(UA_NodeId n, UA_LocalizedText dn, UA_Qualifi
|
|
248
252
|
&node_add_method_callback,
|
249
253
|
inputArgumentsSize,
|
250
254
|
inputArguments,
|
251
|
-
|
252
|
-
|
255
|
+
outputArgumentsSize,
|
256
|
+
outputArguments,
|
253
257
|
(void *)me,
|
254
258
|
NULL);
|
255
259
|
|
@@ -264,6 +268,8 @@ static UA_NodeId node_add_method_ua(UA_NodeId n, UA_LocalizedText dn, UA_Qualifi
|
|
264
268
|
} //}}}
|
265
269
|
static UA_NodeId node_add_method_ua_simple(char* nstr, node_struct *parent, VALUE opts, VALUE blk) { //{{{
|
266
270
|
UA_Argument inputArguments[RHASH_SIZE(opts)];
|
271
|
+
UA_Argument outputArguments[1];
|
272
|
+
int counter = 0;
|
267
273
|
|
268
274
|
VALUE ary = rb_funcall(opts, rb_intern("to_a"), 0);
|
269
275
|
for (long i=0; i<RARRAY_LEN(ary); i++) {
|
@@ -272,11 +278,20 @@ static UA_NodeId node_add_method_ua_simple(char* nstr, node_struct *parent, VALU
|
|
272
278
|
if (NIL_P(str) || TYPE(str) != T_STRING)
|
273
279
|
rb_raise(rb_eTypeError, "cannot convert obj to string");
|
274
280
|
char *nstr = (char *)StringValuePtr(str);
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
281
|
+
if (rb_str_cmp(str,rb_str_new2("return"))) {
|
282
|
+
UA_Argument_init(&inputArguments[counter]);
|
283
|
+
inputArguments[counter].description = UA_LOCALIZEDTEXT("en-US", nstr);
|
284
|
+
inputArguments[counter].name = UA_STRING(nstr);
|
285
|
+
inputArguments[counter].dataType = UA_TYPES[NUM2INT(RARRAY_AREF(item, 1))].typeId;
|
286
|
+
inputArguments[counter].valueRank = UA_VALUERANK_SCALAR;
|
287
|
+
counter++;
|
288
|
+
} else {
|
289
|
+
UA_Argument_init(&outputArguments[0]);
|
290
|
+
outputArguments[0].description = UA_LOCALIZEDTEXT("en-US", nstr);
|
291
|
+
outputArguments[0].name = UA_STRING(nstr);
|
292
|
+
outputArguments[0].dataType = UA_TYPES[NUM2INT(RARRAY_AREF(item, 1))].typeId;
|
293
|
+
outputArguments[0].valueRank = UA_VALUERANK_SCALAR;
|
294
|
+
}
|
280
295
|
}
|
281
296
|
int nodeid = nodecounter++;
|
282
297
|
|
@@ -288,8 +303,10 @@ static UA_NodeId node_add_method_ua_simple(char* nstr, node_struct *parent, VALU
|
|
288
303
|
UA_LOCALIZEDTEXT("en-US", nstr),
|
289
304
|
UA_QUALIFIEDNAME(parent->master->default_ns, nstr),
|
290
305
|
parent,
|
291
|
-
|
306
|
+
counter,
|
292
307
|
inputArguments,
|
308
|
+
RHASH_SIZE(opts)-counter,
|
309
|
+
outputArguments,
|
293
310
|
blk
|
294
311
|
);
|
295
312
|
} //}}}
|
@@ -556,16 +573,38 @@ static UA_StatusCode node_manifest_iter(UA_NodeId child_id, UA_Boolean is_invers
|
|
556
573
|
UA_BrowsePathResult_clear(&property);
|
557
574
|
}
|
558
575
|
if(nc == UA_NODECLASS_METHOD) {
|
559
|
-
UA_NodeId
|
576
|
+
UA_NodeId ia;
|
577
|
+
UA_NodeId oa;
|
560
578
|
VALUE blk = rb_hash_aref(parent->master->methods,INT2NUM(child_id.identifier.numeric));
|
561
|
-
|
579
|
+
|
580
|
+
bool iacheck = server_node_get_reference_by_name(parent->master->master, child_id, UA_QUALIFIEDNAME(0,"InputArguments"), &ia, false);
|
581
|
+
bool oacheck = server_node_get_reference_by_name(parent->master->master, child_id, UA_QUALIFIEDNAME(0,"OutputArguments"), &oa, false);
|
582
|
+
if (iacheck && oacheck) {
|
583
|
+
UA_Variant arv1; UA_Variant_init(&arv1);
|
584
|
+
UA_Variant arv2; UA_Variant_init(&arv2);
|
585
|
+
UA_Server_readValue(parent->master->master, ia, &arv1);
|
586
|
+
UA_Server_readValue(parent->master->master, oa, &arv2);
|
587
|
+
|
588
|
+
// todo differentiate between input and output reference
|
589
|
+
node_add_method_ua(UA_NODEID_STRING(parent->master->default_ns,buffer),dn,qn,newnode,arv1.arrayLength,(UA_Argument *)arv1.data,arv2.arrayLength,(UA_Argument *)arv2.data,blk);
|
590
|
+
UA_Variant_clear(&arv1);
|
591
|
+
UA_Variant_clear(&arv2);
|
592
|
+
} else if (iacheck) {
|
593
|
+
UA_Variant arv; UA_Variant_init(&arv);
|
594
|
+
UA_Server_readValue(parent->master->master, ia, &arv);
|
595
|
+
|
596
|
+
// todo differentiate between input and output reference
|
597
|
+
node_add_method_ua(UA_NODEID_STRING(parent->master->default_ns,buffer),dn,qn,newnode,arv.arrayLength,(UA_Argument *)arv.data,0,NULL,blk);
|
598
|
+
UA_Variant_clear(&arv);
|
599
|
+
} else if (oacheck) {
|
562
600
|
UA_Variant arv; UA_Variant_init(&arv);
|
563
|
-
UA_Server_readValue(parent->master->master,
|
601
|
+
UA_Server_readValue(parent->master->master, oa, &arv);
|
564
602
|
|
565
|
-
|
603
|
+
// todo differentiate between input and output reference
|
604
|
+
node_add_method_ua(UA_NODEID_STRING(parent->master->default_ns,buffer),dn,qn,newnode,0,NULL,arv.arrayLength,(UA_Argument *)arv.data,blk);
|
566
605
|
UA_Variant_clear(&arv);
|
567
606
|
} else {
|
568
|
-
node_add_method_ua(UA_NODEID_STRING(parent->master->default_ns,buffer),dn,qn,newnode,0,NULL,blk);
|
607
|
+
node_add_method_ua(UA_NODEID_STRING(parent->master->default_ns,buffer),dn,qn,newnode,0,NULL,0,NULL,blk);
|
569
608
|
}
|
570
609
|
}
|
571
610
|
}
|
data/opcua.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "opcua"
|
3
|
-
s.version = "0.
|
3
|
+
s.version = "0.17"
|
4
4
|
s.platform = Gem::Platform::RUBY
|
5
5
|
s.license = "LGPL-3.0"
|
6
6
|
s.summary = "Preliminary release of opcua (open62541) ruby bindings. C performance, Ruby elegance, simplicity, and productivity."
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opcua
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.17'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juergen eTM Mangler
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: tools
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2020-01-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: daemonite
|