opcua 0.21 → 0.26

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dede52136945d72311f619c6fe2299896aeb67eb00db4a6a2ebc0c985422c7d6
4
- data.tar.gz: 285eb4c834021ae986c91d492a7e77fb847947be66c69284c24a187dfee816d5
3
+ metadata.gz: e0bd449baa58c495096569ded2e6a50df7e0554ff273b0c853ae8302dc33e544
4
+ data.tar.gz: b6d8ee15542d9be07673ea0522c88f19e0309261ff454cf47f4f1d3b8b8fc927
5
5
  SHA512:
6
- metadata.gz: a75f3952786bdf049432cf6dd46a11f770f6da45d5fcbf8a95ed9528e122e1918cafbfacf8e2a7c80c40987c598601a5326834c4905ecb5e080adfc52b91ee0e
7
- data.tar.gz: 699a713490e9059cf6ed4b610b159da174e2117210bdff60dcedf502d9586318cc7c39343ffa71dbbcdb16b7e5e821be7f25c451c0cb8f5994839db133cae2b1
6
+ metadata.gz: 880f9af425e78f1dfd71e30383b4133201e1af01bd23de16c96a18e5ca0e75d0696b856d3453d8ea75fce4578f2574b823645b0ca39671c0fb626855e9dbc159
7
+ data.tar.gz: f695ee96bdfe1c19a632698b25171e08142b425cd1eeca2f10cb1f72fed7b58cc996bddedf4f833f072b2016696772b37c87a6def87f3ddef7549724321ab813
data/README.md CHANGED
@@ -50,6 +50,8 @@ sudo make install
50
50
  gem install opcua
51
51
  ```
52
52
 
53
+ If you get errors during compilation, please file an issue in github. Maybe the API open62541 API changed (constant improvements are happening).
54
+
53
55
  If the installation works correctly, but examples are still complaining about missing lib62541.so, try this:
54
56
 
55
57
  ```sh
@@ -122,11 +124,24 @@ Multible variables can be defined at once with the ```.add_variables``` command.
122
124
  t.add_variables :TestVar1, :TestVar2
123
125
  ```
124
126
  By default variables are read-only.
125
- If you want to add a variable with read/write support you must use the ```.add_Varable_rw``` method.
127
+ If you want to add a variable with read/write support you must use the ```.add_variable_rw``` method.
126
128
  ```ruby
127
129
  t.add_variable_rw :TestVar1
128
130
  ```
129
131
 
132
+ It is also possible to add a block to the variable. The block is called
133
+ whenever the variable is changed. Each block gets three parameters passed:
134
+ nodeid, new value, and if the value has been changed through a client (true) or
135
+ internally in the server (false).
136
+
137
+ ```ruby
138
+ t.add_variable_rw :Value do |node,value,external|
139
+ p node.id # ObjectVarNode object, which has properties such as #id, #value
140
+ p value # new content of the variable
141
+ p external # true || false
142
+ end
143
+ ```
144
+
130
145
  ##### Add Object
131
146
 
132
147
  With ```.add_object(:TestObject)``` a new object named _TestObject_ is added. The second parameter is optional and definies of which type the new object is. Default the object is from _BaseObjectType_. In this example the created object is from _FolderType_. All child nodes of the object can be definded in the ```tap{}``` area.
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, 0x05, 0x1e, 0x58, 0x4d, 0x94, 0xf5, 0x46, 0x0f, 0xf5,
4
- 0xd2, 0xe0, 0xb9, 0x56, 0xa7, 0x5a, 0x46, 0xe1, 0x3d, 0x3f, 0xa1, 0x30,
3
+ 0x02, 0x02, 0x14, 0x11, 0x2f, 0x7b, 0xb4, 0x32, 0x5f, 0x6d, 0xe3, 0x4f,
4
+ 0x2c, 0x3a, 0x98, 0xb9, 0x10, 0xb5, 0x3a, 0x2b, 0xfa, 0xc1, 0x30, 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, 0x32, 0x30, 0x30, 0x37, 0x31, 0x34, 0x31,
9
- 0x37, 0x32, 0x39, 0x32, 0x35, 0x5a, 0x17, 0x0d, 0x32, 0x31, 0x30, 0x37,
10
- 0x30, 0x34, 0x31, 0x37, 0x32, 0x39, 0x32, 0x35, 0x5a, 0x30, 0x15, 0x31,
8
+ 0x61, 0x30, 0x1e, 0x17, 0x0d, 0x32, 0x31, 0x30, 0x31, 0x32, 0x37, 0x31,
9
+ 0x36, 0x30, 0x30, 0x32, 0x39, 0x5a, 0x17, 0x0d, 0x32, 0x32, 0x30, 0x31,
10
+ 0x31, 0x37, 0x31, 0x36, 0x30, 0x30, 0x32, 0x39, 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, 0xce, 0x51, 0xee, 0xa9, 0xf6, 0xe0, 0x2c,
16
- 0x30, 0x8c, 0x04, 0x3a, 0x0d, 0x74, 0x78, 0x7a, 0x93, 0x00, 0x47, 0xeb,
17
- 0x85, 0x26, 0x38, 0x70, 0x52, 0xeb, 0xcc, 0xf4, 0x21, 0xfe, 0x68, 0x8b,
18
- 0x1d, 0x57, 0xce, 0x9f, 0xb9, 0x18, 0x62, 0x99, 0x90, 0x4d, 0xc5, 0x00,
19
- 0x41, 0x71, 0x9d, 0x71, 0xcf, 0xf2, 0xca, 0xd5, 0x88, 0x21, 0x40, 0xfb,
20
- 0x38, 0x1d, 0xc4, 0xd4, 0xb5, 0xfd, 0x51, 0xdc, 0x9f, 0x8d, 0xed, 0x7b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x11, 0x08, 0xaf, 0x91, 0xde, 0xc6, 0x01,
40
+ 0x44, 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
- 0xc3, 0x70, 0xea, 0x90, 0x39, 0xc2, 0x8e, 0xe7, 0x4f, 0xd1, 0xc6, 0x99,
48
- 0x53, 0xaf, 0x8f, 0x19, 0xec, 0xaa, 0x05, 0x9b, 0xa4, 0x69, 0x2c, 0x00,
49
- 0x11, 0xcd, 0x66, 0xa3, 0x50, 0x0f, 0xe6, 0x2b, 0x83, 0x27, 0xfe, 0x72,
50
- 0xde, 0x41, 0x03, 0x0b, 0x4c, 0xe4, 0xd8, 0xc3, 0x54, 0xeb, 0x3c, 0xbc,
51
- 0xb6, 0x87, 0xba, 0x92, 0x1e, 0x49, 0xcf, 0x7f, 0x5a, 0x57, 0xa7, 0x3e,
52
- 0x8b, 0xd0, 0x45, 0x7e, 0x3d, 0x95, 0x36, 0x73, 0x0f, 0x16, 0x75, 0x68,
53
- 0x1c, 0xf5, 0x4d, 0x90, 0xa9, 0x7c, 0xc8, 0xc1, 0x6d, 0x89, 0xaf, 0x74,
54
- 0x28, 0xb8, 0xe2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 0x02, 0x5b,
62
+ 0x6e, 0x82, 0x89, 0xa3, 0xd1, 0x33, 0x69, 0x0f, 0xf8, 0x1a, 0x3e, 0x35,
63
+ 0x35, 0x0e, 0xe0, 0x54, 0x0f, 0x49, 0x00, 0xdc, 0x57, 0x89, 0x7b, 0x8b,
64
+ 0x1c, 0x3b, 0xcc, 0x18, 0x81, 0x39, 0xfc, 0x80, 0x61, 0xc9, 0xc7, 0xd6,
65
+ 0x9e, 0x5b, 0xfe, 0x54, 0x3b, 0x15, 0x9e, 0x9c, 0x8e, 0xe4, 0xb1, 0x77,
66
+ 0x7a, 0x81, 0xfd, 0xc0, 0x75, 0x3b, 0xd9, 0xb3, 0x98, 0x4c, 0xa4, 0x53,
67
+ 0xd0, 0xc3, 0xa8, 0x70, 0x95, 0x86, 0x1e, 0xc4, 0x77, 0xa4, 0x2f, 0x13,
68
+ 0xe6, 0x36, 0x51, 0x1a
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
2
  0x30, 0x82, 0x04, 0xa3, 0x02, 0x01, 0x00, 0x02, 0x82, 0x01, 0x01, 0x00,
3
- 0xce, 0x51, 0xee, 0xa9, 0xf6, 0xe0, 0x2c, 0x30, 0x8c, 0x04, 0x3a, 0x0d,
4
- 0x74, 0x78, 0x7a, 0x93, 0x00, 0x47, 0xeb, 0x85, 0x26, 0x38, 0x70, 0x52,
5
- 0xeb, 0xcc, 0xf4, 0x21, 0xfe, 0x68, 0x8b, 0x1d, 0x57, 0xce, 0x9f, 0xb9,
6
- 0x18, 0x62, 0x99, 0x90, 0x4d, 0xc5, 0x00, 0x41, 0x71, 0x9d, 0x71, 0xcf,
7
- 0xf2, 0xca, 0xd5, 0x88, 0x21, 0x40, 0xfb, 0x38, 0x1d, 0xc4, 0xd4, 0xb5,
8
- 0xfd, 0x51, 0xdc, 0x9f, 0x8d, 0xed, 0x7b, 0x15, 0xf4, 0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x07, 0xd5, 0x48, 0xdf, 0x22, 0x91, 0xc1, 0xdc, 0xfb, 0x1f,
99
+ 0x4a, 0x03, 0x10, 0x5f, 0x80, 0x2e, 0x2c, 0x91, 0x75, 0x52, 0x84, 0xd8,
100
+ 0x3c, 0x10, 0x21, 0xf7, 0x13, 0x62, 0xfa, 0x87, 0x9e, 0x9c, 0x9d, 0xa5,
101
+ 0xfd, 0xf2, 0xc2
102
102
  };
103
103
  unsigned int cert_key_der_len = 1191;
@@ -9,8 +9,14 @@ client = OPCUA::Client.new("opc.tcp://localhost:4840")
9
9
  client.subscription_interval = 100 # default 500
10
10
 
11
11
  node = client.get 2, '/KalimatC34/Tools/Tool1/ToolNumber' # get node from nodeid
12
+ n2 = client.get 2, '/KalimatC34/Tools/Tool2/ToolNumber' # get node from nodeid
13
+ p node.unsubscribe
12
14
  node.on_change do |value,timestamp|
13
15
  p value
16
+ if value == 2
17
+ p 'unsub'
18
+ p node.unsubscribe
19
+ end
14
20
  end
15
21
 
16
22
  while true
@@ -0,0 +1,43 @@
1
+ #!/usr/bin/ruby
2
+ require_relative '../lib/opcua/server'
3
+ #require 'opcua/server'
4
+
5
+ Daemonite.new do
6
+ on startup do |opts|
7
+ opts['server'] = OPCUA::Server.new
8
+ opts['server'].add_namespace "https://centurio.work/kelch"
9
+
10
+ t = opts['server'].types.add_object_type(:Test).tap{ |u|
11
+ u.add_object(:Measurements, opts['server'].types.folder).tap{ |v|
12
+ v.add_object(:BitRegister, opts['server'].types.folder).tap{ |w|
13
+ w.add_variable_rw :Wert do |node,value,external|
14
+ if external
15
+ p node.id
16
+ p value
17
+ end
18
+ end
19
+ }
20
+ }
21
+ }
22
+
23
+ v = opts['server'].objects.manifest(:Tester, t)
24
+
25
+ opts['mm'] = v.find :Measurements
26
+ opts['br'] = opts['mm'].find :BitRegister
27
+ opts['value'] = opts['br'].find :Wert
28
+ rescue => e
29
+ puts e.message
30
+ end
31
+
32
+ run do |opts|
33
+ opts['server'].run
34
+ opts['value'].value = rand
35
+ rescue => e
36
+ puts e.message
37
+ end
38
+
39
+ on exit do
40
+ # we could disconnect here, but OPCUA::Server does not have an explicit disconnect
41
+ puts 'bye.'
42
+ end
43
+ end.loop!
@@ -33,6 +33,7 @@ static node_struct * node_alloc(client_struct *client, UA_NodeId nodeid) { //{{{
33
33
  ns->id = nodeid;
34
34
  ns->on_change = Qnil;
35
35
  ns->waiting = 0;
36
+ ns->monId = 0;
36
37
 
37
38
  return ns;
38
39
  } //}}}
@@ -99,7 +100,6 @@ static VALUE node_on_change(VALUE self) { //{{{
99
100
  rb_gc_register_address(&ns->on_change);
100
101
 
101
102
  rb_ary_push(ns->master->subs,self);
102
- ns->master->subs_changed = true;
103
103
 
104
104
  return self;
105
105
  } //}}}
@@ -184,7 +184,7 @@ static VALUE node_on_value_change(VALUE self) { // {{{
184
184
  /* -- */
185
185
  static void client_free(client_struct *pss) { //{{{
186
186
  if (pss != NULL) {
187
- if (!pss->firstrun) {
187
+ if (pss->subrun) {
188
188
  // do we need to delete the individual monResponse (#UA_MonitoredItemCreateResult_clear)?
189
189
  UA_Client_Subscriptions_deleteSingle(pss->master,pss->subscription_response.subscriptionId);
190
190
  }
@@ -201,11 +201,10 @@ static VALUE client_alloc(VALUE self) { //{{{
201
201
 
202
202
  pss->master = UA_Client_new();
203
203
  pss->config = UA_Client_getConfig(pss->master);
204
- pss->firstrun = true;
204
+ pss->subrun = false;
205
205
  pss->started = true;
206
206
  pss->debug = true;
207
207
  pss->subs = rb_ary_new();
208
- pss->subs_changed = false;
209
208
  pss->subscription_interval = 500;
210
209
  pss->default_ns = 2;
211
210
 
@@ -491,6 +490,20 @@ static VALUE node_to_s(VALUE self) { //{{{
491
490
  }
492
491
  return ret;
493
492
  } //}}}
493
+ static VALUE unsubscribe(VALUE self) { //{{{
494
+ node_struct *ns;
495
+
496
+ Data_Get_Struct(self, node_struct, ns);
497
+
498
+ if (ns->master->subrun && ns->monId > 0) {
499
+ UA_Client_MonitoredItems_deleteSingle(ns->master->master, ns->master->subscription_response.subscriptionId, ns->monId);
500
+ ns->monId = 0;
501
+ rb_ary_delete(ns->master->subs, self);
502
+ return Qtrue;
503
+ } else {
504
+ return Qfalse;
505
+ }
506
+ } //}}}
494
507
 
495
508
  static VALUE node_call(int argc, VALUE* argv, VALUE self) { //{{{
496
509
  node_struct *ns;
@@ -553,7 +566,7 @@ static VALUE node_call(int argc, VALUE* argv, VALUE self) { //{{{
553
566
  }
554
567
  } //}}}
555
568
 
556
- static void client_run_handler(UA_Client *client, UA_UInt32 subId, void *subContext, UA_UInt32 monId, void *monContext, UA_DataValue *value) { //{{{
569
+ static void client_run_handler(UA_Client *client, UA_UInt32 subId, void *subContext, UA_UInt32 monId, void *monContext, UA_DataValue *value) { //{{{
557
570
  VALUE val = (VALUE)monContext;
558
571
 
559
572
  if (NIL_P(val) || TYPE(val) != T_NIL) {
@@ -573,7 +586,7 @@ static void client_run_handler(UA_Client *client, UA_UInt32 subId, void *subCon
573
586
  rb_proc_call(val,args);
574
587
  }
575
588
  } //}}}
576
- static void client_run_iterate(VALUE key) { //{{{
589
+ static void client_run_iterate(VALUE key) { //{{{
577
590
  node_struct *ns;
578
591
  Data_Get_Struct(key, node_struct, ns);
579
592
 
@@ -583,26 +596,28 @@ static void client_run_iterate(VALUE key) { //{{{
583
596
  UA_Client_MonitoredItems_createDataChange(ns->master->master, ns->master->subscription_response.subscriptionId,
584
597
  UA_TIMESTAMPSTORETURN_BOTH,
585
598
  monRequest, (void *)ns->on_change, client_run_handler, NULL);
599
+ ns->monId = monResponse.monitoredItemId;
586
600
 
587
601
  if(monResponse.statusCode != UA_STATUSCODE_GOOD) {
588
602
  rb_raise(rb_eRuntimeError, "Monitoring item failed: %s\n", UA_StatusCode_name(monResponse.statusCode));
589
603
  }
604
+ UA_MonitoredItemCreateResult_clear(&monResponse);
605
+ UA_MonitoredItemCreateRequest_clear(&monRequest);
590
606
  } //}}}
591
607
  static VALUE client_run(VALUE self) { //{{{
592
608
  client_struct *pss;
593
609
  Data_Get_Struct(self, client_struct, pss);
594
610
  if (!pss->started) rb_raise(rb_eRuntimeError, "Client disconnected.");
595
611
 
596
- if (pss->firstrun) {
597
- pss->firstrun = false;
598
- pss->subs_changed = false;
612
+ if (!pss->subrun) {
613
+ pss->subrun = true;
599
614
  pss->subscription_response = UA_Client_Subscriptions_create(pss->master, pss->subscription_request, NULL, NULL, NULL);
600
615
  if (pss->subscription_response.responseHeader.serviceResult != UA_STATUSCODE_GOOD)
601
616
  rb_raise(rb_eRuntimeError, "Subscription could not be created.");
602
-
603
- for (int i = 0; i < RARRAY_LEN(pss->subs); i++) {
604
- client_run_iterate(rb_ary_entry(pss->subs,i));
605
- }
617
+ }
618
+ while (RARRAY_LEN(pss->subs)>0) {
619
+ VALUE aentry = rb_ary_pop(pss->subs);
620
+ client_run_iterate(aentry);
606
621
  }
607
622
  UA_Client_run_iterate(pss->master, 100);
608
623
 
@@ -613,7 +628,7 @@ static VALUE client_disconnect(VALUE self) { //{{{
613
628
  Data_Get_Struct(self, client_struct, pss);
614
629
  if (!pss->started) rb_raise(rb_eRuntimeError, "Client disconnected.");
615
630
 
616
- if (!pss->firstrun) {
631
+ if (pss->subrun) {
617
632
  // do we need to delete the individual monResponse (#UA_MonitoredItemCreateResult_clear)?
618
633
  UA_Client_Subscriptions_deleteSingle(pss->master,pss->subscription_response.subscriptionId);
619
634
  }
@@ -648,6 +663,7 @@ void Init_client(void) {
648
663
 
649
664
  rb_define_method(cNode, "to_s", node_to_s, 0);
650
665
  rb_define_method(cNode, "id", node_id, 0);
666
+ rb_define_method(cNode, "unsubscribe", unsubscribe, 0);
651
667
 
652
668
  rb_define_method(cMethodNode, "call", node_call, -1);
653
669
 
@@ -11,11 +11,10 @@ typedef struct client_struct {
11
11
  UA_CreateSubscriptionResponse subscription_response;
12
12
 
13
13
  UA_UInt32 subscription_interval;
14
- bool firstrun;
14
+ bool subrun;
15
15
  bool started;
16
16
  bool debug;
17
17
  VALUE subs;
18
- bool subs_changed;
19
18
  UA_UInt16 default_ns;
20
19
  } client_struct;
21
20
 
@@ -23,5 +22,6 @@ typedef struct node_struct {
23
22
  client_struct *master;
24
23
  VALUE on_change;
25
24
  UA_NodeId id;
25
+ UA_UInt32 monId;
26
26
  int waiting;
27
27
  } node_struct;
@@ -39,7 +39,6 @@ bool server_node_get_reference(UA_Server *server, UA_NodeId parent, UA_NodeId *r
39
39
  // qn.name.data
40
40
  // );
41
41
 
42
- UA_BrowseResult_deleteMembers(&bRes);
43
42
  UA_BrowseResult_clear(&bRes);
44
43
  return true;
45
44
  }
@@ -63,13 +62,11 @@ bool server_node_get_reference_by_name(UA_Server *server, UA_NodeId parent, UA_Q
63
62
  if (UA_QualifiedName_equal(&qn,&name)) {
64
63
  UA_NodeId_copy(&ref->nodeId.nodeId,result);
65
64
 
66
- UA_BrowseResult_deleteMembers(&bRes);
67
65
  UA_BrowseResult_clear(&bRes);
68
66
  return true;
69
67
  }
70
68
  }
71
69
 
72
- UA_BrowseResult_deleteMembers(&bRes);
73
70
  UA_BrowseResult_clear(&bRes);
74
71
  return false;
75
72
  }
@@ -100,7 +97,6 @@ bool client_node_get_reference_by_name(UA_Client *client, UA_NodeId parent, UA_Q
100
97
  }
101
98
  }
102
99
 
103
- UA_BrowseResponse_deleteMembers(&bResp);
104
100
  UA_BrowseResponse_clear(&bResp);
105
101
  return success;
106
102
  }
@@ -126,7 +122,6 @@ bool client_node_get_reference_by_type(UA_Client *client, UA_NodeId parent, UA_N
126
122
  }
127
123
  }
128
124
 
129
- UA_BrowseResponse_deleteMembers(&bResp);
130
125
  UA_BrowseResponse_clear(&bResp);
131
126
  return success;
132
127
  }
@@ -164,7 +159,6 @@ bool client_node_list_references(UA_Client *client, UA_NodeId parent, bool inver
164
159
 
165
160
  }
166
161
  }
167
- UA_BrowseResponse_deleteMembers(&bResp);
168
162
  UA_BrowseResponse_clear(&bResp);
169
163
  return false;
170
164
  }
@@ -335,11 +335,56 @@ static VALUE node_add_method(int argc, VALUE* argv, VALUE self) { //{{{
335
335
  return node_wrap(CLASS_OF(self),node_alloc(parent->master,node_add_method_ua_simple(nstr,parent,opts,blk)));
336
336
  } //}}}
337
337
 
338
- static UA_NodeId node_add_variable_ua(UA_Int32 type, UA_NodeId n, UA_LocalizedText dn, UA_QualifiedName qn, node_struct *parent, UA_Byte accesslevelmask) { //{{{
338
+ static void node_add_variable_callback( //{{{
339
+ UA_Server *server,
340
+ const UA_NodeId *sessionId, void *sessionContext,
341
+ const UA_NodeId *nodeId, void *nodeContext,
342
+ const UA_NumericRange *range, const UA_DataValue *data
343
+ ) {
344
+ node_struct *me = (node_struct *)nodeContext;
345
+ UA_Guid internal = UA_GUID("00000001-0000-0000-0000-000000000000");
346
+
347
+ // if (sessionId->identifierType == UA_NODEIDTYPE_NUMERIC) {
348
+ // printf("sessionId ns=%d;i=%d\n", sessionId->namespaceIndex, sessionId->identifier.numeric);
349
+ // } else if(sessionId->identifierType == UA_NODEIDTYPE_STRING) {
350
+ // printf("sessionId ns=%d;s=%.*s\n", sessionId->namespaceIndex, (int)sessionId->identifier.string.length, sessionId->identifier.string.data);
351
+ // } else if(sessionId->identifierType == UA_NODEIDTYPE_GUID) {
352
+ // if (UA_Guid_equal(&(sessionId->identifier.guid),&internal)) {
353
+ // printf("sessionId internal session\n");
354
+ // } else {
355
+ // printf("sessionId ns=%d;g=%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x\n",sessionId->namespaceIndex,UA_PRINTF_GUID_DATA(sessionId->identifier.guid));
356
+ // }
357
+ // } else if(sessionId->identifierType == UA_NODEIDTYPE_BYTESTRING) {
358
+ // printf("sessionId ns=%d;b=%.*s\n", sessionId->namespaceIndex, (int)sessionId->identifier.string.length, sessionId->identifier.string.data);
359
+ // } else if(UA_NodeId_isNull(sessionId)) {
360
+ // printf("sessionId is null");
361
+ // } else {
362
+ // printf("sessionId ns=%d;unsupported\n",sessionId->namespaceIndex);
363
+ // }
364
+
365
+ VALUE args = rb_ary_new();
366
+ rb_ary_push(args, Data_Wrap_Struct(cVarNode,NULL,NULL,me));
367
+ VALUE para = extract_value(data->value);
368
+ rb_ary_push(args,rb_ary_entry(para,0));
369
+ if (UA_Guid_equal(&(sessionId->identifier.guid),&internal)) {
370
+ rb_ary_push(args,Qfalse);
371
+ } else {
372
+ rb_ary_push(args,Qtrue);
373
+ }
374
+ if (me->method != Qnil) {
375
+ rb_proc_call(me->method,args);
376
+ }
377
+ } //}}}
378
+ static UA_NodeId node_add_variable_ua(UA_Int32 type, UA_NodeId n, UA_LocalizedText dn, UA_QualifiedName qn, node_struct *parent, UA_Byte accesslevelmask, VALUE blk) { //{{{
339
379
  UA_VariableAttributes vAttr = UA_VariableAttributes_default;
340
380
  vAttr.displayName = dn;
341
381
  vAttr.accessLevel = accesslevelmask;
342
382
 
383
+ node_struct *me = node_alloc(parent->master,n);
384
+ me->method = blk;
385
+ rb_gc_register_address(&blk);
386
+ rb_gc_register_address(&me->method);
387
+
343
388
  UA_Server_addVariableNode(parent->master->master,
344
389
  n,
345
390
  parent->id,
@@ -347,9 +392,13 @@ static UA_NodeId node_add_variable_ua(UA_Int32 type, UA_NodeId n, UA_LocalizedTe
347
392
  qn,
348
393
  UA_NODEID_NUMERIC(0, type),
349
394
  vAttr,
350
- NULL,
395
+ (void *)me,
351
396
  NULL);
352
397
 
398
+ UA_ValueCallback callback ;
399
+ callback.onWrite = node_add_variable_callback;
400
+ UA_Server_setVariableNode_valueCallback(parent->master->master, n, callback);
401
+
353
402
  UA_Server_addReference(parent->master->master,
354
403
  n,
355
404
  UA_NODEID_NUMERIC(0, UA_NS0ID_HASMODELLINGRULE),
@@ -357,15 +406,28 @@ static UA_NodeId node_add_variable_ua(UA_Int32 type, UA_NodeId n, UA_LocalizedTe
357
406
  true);
358
407
 
359
408
  return n;
360
- } //}}}
361
- static UA_NodeId node_add_variable_ua_simple(UA_Int32 type, char* nstr, node_struct *parent, UA_Byte accesslevelmask, bool numeric) { //{{{
409
+ } //}}}
410
+ static UA_NodeId node_add_variable_ua_simple(UA_Int32 type, VALUE str, node_struct *parent, UA_Byte accesslevelmask, bool numeric, VALUE blk) { //{{{
411
+ int nodeid = nodecounter++;
412
+ char *nstr = (char *)StringValuePtr(str);
413
+
414
+ UA_NodeId n;
415
+ if (numeric) {
416
+ n = UA_NODEID_NUMERIC(parent->master->default_ns,nodeid);
417
+ rb_hash_aset(parent->master->methods,INT2NUM(nodeid),blk);
418
+ } else {
419
+ n = UA_NODEID_STRING(parent->master->default_ns,nstr);
420
+ rb_hash_aset(parent->master->methods,str,blk);
421
+ }
422
+ rb_gc_register_address(&blk);
362
423
  return node_add_variable_ua(
363
424
  type,
364
- numeric ? UA_NODEID_NUMERIC(parent->master->default_ns,nodecounter++) : UA_NODEID_STRING(parent->master->default_ns,nstr),
425
+ n,
365
426
  UA_LOCALIZEDTEXT("en-US", nstr),
366
427
  UA_QUALIFIEDNAME(parent->master->default_ns, nstr),
367
428
  parent,
368
- accesslevelmask
429
+ accesslevelmask,
430
+ blk
369
431
  );
370
432
  } //}}}
371
433
  static VALUE node_add_variable_wrap(int argc, VALUE* argv, VALUE self, UA_Byte accesslevelmask, bool numeric) { //{{{
@@ -375,22 +437,28 @@ static VALUE node_add_variable_wrap(int argc, VALUE* argv, VALUE self, UA_Byte a
375
437
  rb_raise(rb_eArgError, "wrong number of arguments");
376
438
  }
377
439
 
440
+ Data_Get_Struct(self, node_struct, parent);
441
+ if (!parent->exists) rb_raise(rb_eRuntimeError, "Node does not exist anymore.");
442
+
443
+ VALUE name;
444
+ VALUE ttype;
445
+ VALUE blk;
446
+ rb_gc_register_address(&blk);
447
+
448
+ rb_scan_args(argc, argv, "11&", &name, &ttype, &blk);
449
+
378
450
  UA_UInt32 type;
379
- if (argc == 2 && argv[1] != Qnil) {
380
- type = NUM2INT(argv[1]);
381
- } else {
451
+ if (NIL_P(ttype)) {
382
452
  type = UA_NS0ID_BASEDATAVARIABLETYPE;
453
+ } else {
454
+ type = NUM2INT(ttype);
383
455
  }
384
456
 
385
- Data_Get_Struct(self, node_struct, parent);
386
- if (!parent->exists) rb_raise(rb_eRuntimeError, "Node does not exist anymore.");
387
-
388
- VALUE str = rb_obj_as_string(argv[0]);
457
+ VALUE str = rb_obj_as_string(name);
389
458
  if (NIL_P(str) || TYPE(str) != T_STRING)
390
459
  rb_raise(rb_eTypeError, "cannot convert obj to string");
391
- char *nstr = (char *)StringValuePtr(str);
392
460
 
393
- return node_wrap(cVarNode,node_alloc(parent->master,node_add_variable_ua_simple(type,nstr,parent,accesslevelmask,numeric)));
461
+ return node_wrap(cVarNode,node_alloc(parent->master,node_add_variable_ua_simple(type,str,parent,accesslevelmask,numeric,blk)));
394
462
  } //}}}
395
463
  static VALUE node_add_variable(int argc, VALUE* argv, VALUE self) { //{{{
396
464
  return node_add_variable_wrap(argc,argv,self,UA_ACCESSLEVELMASK_READ,true);
@@ -449,10 +517,18 @@ static UA_NodeId node_add_object_ua(UA_Int32 type, UA_NodeId n, UA_LocalizedText
449
517
 
450
518
  return n;
451
519
  } //}}}
452
- static UA_NodeId node_add_object_ua_simple(UA_Int32 type, char* nstr, node_struct *parent, node_struct *datatype, VALUE ref) { //{{{
520
+ static UA_NodeId node_add_object_ua_simple(UA_Int32 type, char* nstr, node_struct *parent, node_struct *datatype, VALUE ref, bool numeric) { //{{{
521
+ int nodeid = nodecounter++;
522
+ UA_NodeId n;
523
+ if (numeric) {
524
+ n = UA_NODEID_NUMERIC(parent->master->default_ns,nodeid);
525
+ } else {
526
+ n = UA_NODEID_STRING(parent->master->default_ns,nstr);
527
+ }
528
+
453
529
  return node_add_object_ua(
454
530
  type,
455
- UA_NODEID_STRING(parent->master->default_ns,nstr),
531
+ n,
456
532
  UA_LOCALIZEDTEXT("en-US", nstr),
457
533
  UA_QUALIFIEDNAME(parent->master->default_ns, nstr),
458
534
  parent,
@@ -489,7 +565,7 @@ static VALUE node_add_object(int argc, VALUE* argv, VALUE self) { //{{{
489
565
  rb_raise(rb_eTypeError, "cannot convert obj to string");
490
566
  char *nstr = (char *)StringValuePtr(str);
491
567
 
492
- return node_wrap(CLASS_OF(self),node_alloc(parent->master,node_add_object_ua_simple(type,nstr,parent,datatype,argv[2])));
568
+ return node_wrap(CLASS_OF(self),node_alloc(parent->master,node_add_object_ua_simple(type,nstr,parent,datatype,argv[2],true)));
493
569
  } //}}}
494
570
 
495
571
  static UA_StatusCode node_manifest_iter(UA_NodeId child_id, UA_Boolean is_inverse, UA_NodeId reference_type_id, void *handle) { //{{{
@@ -564,10 +640,22 @@ static UA_StatusCode node_manifest_iter(UA_NodeId child_id, UA_Boolean is_invers
564
640
  UA_BrowsePathResult property = node_browse_path(parent->master->master, child_id, UA_NODEID_NUMERIC(0, UA_NS0ID_HASTYPEDEFINITION), pqn, false);
565
641
  UA_QualifiedName_clear(&pqn);
566
642
 
643
+ VALUE blk;
644
+ if (child_id.identifierType == UA_NODEIDTYPE_NUMERIC) {
645
+ blk = rb_hash_aref(parent->master->methods,INT2NUM(child_id.identifier.numeric));
646
+ } else if (child_id.identifierType == UA_NODEIDTYPE_STRING) {
647
+ blk = rb_hash_aref(parent->master->methods,rb_str_new((const char *)child_id.identifier.string.data,child_id.identifier.string.length));
648
+ } else if (child_id.identifierType == UA_NODEIDTYPE_BYTESTRING) {
649
+ blk = rb_hash_aref(parent->master->methods,rb_str_new((const char *)child_id.identifier.byteString.data,child_id.identifier.byteString.length));
650
+ } else {
651
+ blk = Qnil;
652
+ }
653
+
654
+
567
655
  if (property.statusCode == UA_STATUSCODE_GOOD) {
568
- node_add_variable_ua(UA_NS0ID_PROPERTYTYPE,UA_NODEID_STRING(parent->master->default_ns,buffer),dn,qn,newnode,al);
656
+ node_add_variable_ua(UA_NS0ID_PROPERTYTYPE,UA_NODEID_STRING(parent->master->default_ns,buffer),dn,qn,newnode,al,blk);
569
657
  } else {
570
- node_add_variable_ua(UA_NS0ID_BASEDATAVARIABLETYPE,UA_NODEID_STRING(parent->master->default_ns,buffer),dn,qn,newnode,al);
658
+ node_add_variable_ua(UA_NS0ID_BASEDATAVARIABLETYPE,UA_NODEID_STRING(parent->master->default_ns,buffer),dn,qn,newnode,al,blk);
571
659
  }
572
660
 
573
661
  UA_BrowsePathResult_clear(&property);
@@ -758,7 +846,7 @@ static VALUE node_value_set(VALUE self, VALUE value) { //{{{
758
846
  }
759
847
 
760
848
  UA_Server_writeValue(ns->master->master, ns->id, variant);
761
- UA_Variant_deleteMembers(&variant);
849
+ UA_Variant_clear(&variant);
762
850
  }
763
851
  return self;
764
852
  } //}}}
data/lib/opcua/server.rb CHANGED
@@ -46,11 +46,23 @@ module OPCUA
46
46
  def add_property_rw(*item)
47
47
  item.each { |e| add_property_rw e }
48
48
  end
49
- def add_variables(*item)
50
- item.each { |e| add_variable e }
49
+ def add_variables(*item,&blk)
50
+ item.each do |e|
51
+ if blk.nil?
52
+ add_variable e
53
+ else
54
+ add_variable e, &blk
55
+ end
56
+ end
51
57
  end
52
- def add_variables_rw(*item)
53
- item.each { |e| add_variable_rw e }
58
+ def add_variables_rw(*item,&blk)
59
+ item.each do |e|
60
+ if blk.nil?
61
+ add_variable_rw e
62
+ else
63
+ add_variable_rw e, &blk
64
+ end
65
+ end
54
66
  end
55
67
  end
56
68
  end
data/opcua.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "opcua"
3
- s.version = "0.21"
3
+ s.version = "0.26"
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."
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
15
15
 
16
16
  s.required_ruby_version = '>=2.5.0'
17
17
 
18
- s.authors = ['Juergen eTM Mangler','Florian Pauker']
18
+ s.authors = ['Juergen eTM Mangler','Florian Pauker','Matthias Ehrendorfer']
19
19
 
20
20
  s.email = 'juergen.mangler@gmail.com'
21
21
  s.homepage = 'https://github.com/etm/opcua-smart'
metadata CHANGED
@@ -1,15 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opcua
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.21'
4
+ version: '0.26'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen eTM Mangler
8
8
  - Florian Pauker
9
- autorequire:
9
+ - Matthias Ehrendorfer
10
+ autorequire:
10
11
  bindir: tools
11
12
  cert_chain: []
12
- date: 2020-07-14 00:00:00.000000000 Z
13
+ date: 2021-02-23 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: daemonite
@@ -84,6 +85,7 @@ files:
84
85
  - example/server.rb
85
86
  - example/server_deep.rb
86
87
  - example/server_values.rb
88
+ - example/server_values_callback.rb
87
89
  - example/server_xml.rb
88
90
  - example/test.rb
89
91
  - ext/opcua/client/client.c
@@ -123,7 +125,7 @@ homepage: https://github.com/etm/opcua-smart
123
125
  licenses:
124
126
  - LGPL-3.0
125
127
  metadata: {}
126
- post_install_message:
128
+ post_install_message:
127
129
  rdoc_options: []
128
130
  require_paths:
129
131
  - lib
@@ -138,8 +140,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
140
  - !ruby/object:Gem::Version
139
141
  version: '0'
140
142
  requirements: []
141
- rubygems_version: 3.1.2
142
- signing_key:
143
+ rubygems_version: 3.1.4
144
+ signing_key:
143
145
  specification_version: 4
144
146
  summary: Preliminary release of opcua (open62541) ruby bindings. C performance, Ruby
145
147
  elegance, simplicity, and productivity.