opcua 0.14 → 0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +20 -16
- data/Rakefile +12 -10
- data/cert/cert.h +52 -52
- data/cert/cert_key.h +101 -101
- data/example/bug5.rb +1 -1
- data/example/client_get_float.rb +12 -0
- data/example/client_method.rb +6 -3
- data/example/server.rb +8 -0
- data/example/server_browse.rb +6 -0
- data/example/server_values.rb +40 -0
- data/example/server_xml.rb +85 -0
- data/example/test +22 -0
- data/example/test.mpf +85 -0
- data/example/test1 +12 -0
- data/example/tester.mpf +85 -0
- data/example/turm.rb +13 -0
- data/ext/opcua/client/client.c +18 -8
- data/ext/opcua/helpers/finders.c +28 -0
- data/ext/opcua/helpers/finders.h +1 -0
- data/ext/opcua/helpers/values.c +32 -4
- data/ext/opcua/helpers/values.h +1 -2
- data/ext/opcua/server/server.c +75 -18
- data/opcua.gemspec +1 -1
- metadata +13 -4
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/helpers/values.c
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#include "values.h"
|
2
2
|
|
3
|
-
VALUE
|
3
|
+
VALUE mTYPES;
|
4
4
|
|
5
5
|
/* -- */
|
6
6
|
static void variant_set_one_dimension(UA_Variant *variant,UA_UInt32 len) { //{{{
|
@@ -154,8 +154,14 @@ bool value_to_variant(VALUE value, UA_Variant *variant, UA_UInt32 proposal) { //
|
|
154
154
|
case T_SYMBOL:
|
155
155
|
{
|
156
156
|
VALUE str = rb_obj_as_string(value);
|
157
|
-
|
158
|
-
|
157
|
+
if (proposal == UA_TYPES_STRING) {
|
158
|
+
UA_String tmp = UA_STRING(StringValuePtr(str));
|
159
|
+
UA_Variant_setScalarCopy(variant, &tmp, &UA_TYPES[UA_TYPES_STRING]);
|
160
|
+
} else if (proposal == UA_TYPES_BYTESTRING) {
|
161
|
+
printf("rrrrr\n");
|
162
|
+
UA_ByteString tmp = UA_BYTESTRING(StringValuePtr(str));
|
163
|
+
UA_Variant_setScalarCopy(variant, &tmp, &UA_TYPES[UA_TYPES_BYTESTRING]);
|
164
|
+
}
|
159
165
|
done = true;
|
160
166
|
break;
|
161
167
|
}
|
@@ -171,10 +177,11 @@ bool value_to_variant(VALUE value, UA_Variant *variant, UA_UInt32 proposal) { //
|
|
171
177
|
return done;
|
172
178
|
} //}}}
|
173
179
|
|
174
|
-
void Init_types() {/*{{{*/
|
180
|
+
void Init_types(VALUE mOPCUA) {/*{{{*/
|
175
181
|
mTYPES = rb_define_module_under(mOPCUA,"TYPES");
|
176
182
|
rb_define_const(mTYPES, "DATETIME", INT2NUM(UA_TYPES_DATETIME ));
|
177
183
|
rb_define_const(mTYPES, "BOOLEAN", INT2NUM(UA_TYPES_BOOLEAN ));
|
184
|
+
rb_define_const(mTYPES, "FLOAT", INT2NUM(UA_TYPES_FLOAT ));
|
178
185
|
rb_define_const(mTYPES, "DOUBLE", INT2NUM(UA_TYPES_DOUBLE ));
|
179
186
|
rb_define_const(mTYPES, "INT32", INT2NUM(UA_TYPES_INT32 ));
|
180
187
|
rb_define_const(mTYPES, "INT16", INT2NUM(UA_TYPES_INT16 ));
|
@@ -189,6 +196,9 @@ static VALUE UA_TYPES_DATETIME_to_value(UA_DateTime data) { //{{{
|
|
189
196
|
static VALUE UA_TYPES_BOOLEAN_to_value(UA_Boolean data) { //{{{
|
190
197
|
return data ? Qtrue : Qfalse;
|
191
198
|
} //}}}
|
199
|
+
static VALUE UA_TYPES_FLOAT_to_value(UA_Float data) { //{{{
|
200
|
+
return DBL2NUM((double)data);
|
201
|
+
} //}}}
|
192
202
|
static VALUE UA_TYPES_DOUBLE_to_value(UA_Double data) { //{{{
|
193
203
|
return DBL2NUM(data);
|
194
204
|
} //}}}
|
@@ -213,6 +223,9 @@ static VALUE UA_TYPES_UINT16_to_value(UA_UInt16 data) { //{{{
|
|
213
223
|
static VALUE UA_TYPES_STRING_to_value(UA_String data) { //{{{
|
214
224
|
return rb_str_export_locale(rb_str_new((char *)(data.data),data.length));
|
215
225
|
} //}}}
|
226
|
+
static VALUE UA_TYPES_BYTESTRING_to_value(UA_ByteString data) { //{{{
|
227
|
+
return rb_str_export_locale(rb_str_new((char *)(data.data),data.length));
|
228
|
+
} //}}}
|
216
229
|
|
217
230
|
VALUE extract_value(UA_Variant value) { //{{{
|
218
231
|
VALUE ret = rb_ary_new2(2);
|
@@ -228,6 +241,9 @@ VALUE extract_value(UA_Variant value) { //{{{
|
|
228
241
|
} else if (UA_Variant_hasScalarType(&value, &UA_TYPES[UA_TYPES_BOOLEAN])) {
|
229
242
|
rb_ary_store(ret,0,UA_TYPES_BOOLEAN_to_value(*(UA_Boolean *)value.data));
|
230
243
|
rb_ary_store(ret,1,ID2SYM(rb_intern("VariantType.Boolean")));
|
244
|
+
} else if (UA_Variant_hasScalarType(&value, &UA_TYPES[UA_TYPES_FLOAT])) {
|
245
|
+
rb_ary_store(ret,0,UA_TYPES_FLOAT_to_value(*(UA_Float *)value.data));
|
246
|
+
rb_ary_store(ret,1,ID2SYM(rb_intern("VariantType.Float")));
|
231
247
|
} else if (UA_Variant_hasScalarType(&value, &UA_TYPES[UA_TYPES_DOUBLE])) {
|
232
248
|
rb_ary_store(ret,0,UA_TYPES_DOUBLE_to_value(*(UA_Double *)value.data));
|
233
249
|
rb_ary_store(ret,1,ID2SYM(rb_intern("VariantType.Double")));
|
@@ -252,6 +268,11 @@ VALUE extract_value(UA_Variant value) { //{{{
|
|
252
268
|
} else if (UA_Variant_hasScalarType(&value, &UA_TYPES[UA_TYPES_STRING])) {
|
253
269
|
rb_ary_store(ret,0,UA_TYPES_STRING_to_value(*(UA_String *)value.data));
|
254
270
|
rb_ary_store(ret,1,ID2SYM(rb_intern("VariantType.String")));
|
271
|
+
} else if (UA_Variant_hasScalarType(&value, &UA_TYPES[UA_TYPES_BYTESTRING])) {
|
272
|
+
rb_ary_store(ret,0,UA_TYPES_BYTESTRING_to_value(*(UA_ByteString *)value.data));
|
273
|
+
rb_ary_store(ret,1,ID2SYM(rb_intern("VariantType.String")));
|
274
|
+
} else {
|
275
|
+
//printf("Unknown Datatype\n");
|
255
276
|
}
|
256
277
|
} else if (value.arrayDimensionsSize == 1 || (value.arrayDimensionsSize == 0 && value.arrayLength > 0)) {
|
257
278
|
if (UA_Variant_hasArrayType(&value, &UA_TYPES[UA_TYPES_DATETIME])) {
|
@@ -268,6 +289,13 @@ VALUE extract_value(UA_Variant value) { //{{{
|
|
268
289
|
for (int i=0; i < value.arrayLength; i++) {
|
269
290
|
rb_ary_push(res,UA_TYPES_BOOLEAN_to_value(((UA_Boolean *)value.data)[i]));
|
270
291
|
}
|
292
|
+
} else if (UA_Variant_hasArrayType(&value, &UA_TYPES[UA_TYPES_FLOAT])) {
|
293
|
+
VALUE res = rb_ary_new();
|
294
|
+
rb_ary_store(ret,0,res);
|
295
|
+
rb_ary_store(ret,1,ID2SYM(rb_intern("VariantType.Float")));
|
296
|
+
for (int i=0; i < value.arrayLength; i++) {
|
297
|
+
rb_ary_push(res,UA_TYPES_FLOAT_to_value(((UA_Float *)value.data)[i]));
|
298
|
+
}
|
271
299
|
} else if (UA_Variant_hasArrayType(&value, &UA_TYPES[UA_TYPES_DOUBLE])) {
|
272
300
|
VALUE res = rb_ary_new();
|
273
301
|
rb_ary_store(ret,0,res);
|
data/ext/opcua/helpers/values.h
CHANGED
@@ -4,9 +4,8 @@
|
|
4
4
|
#include <open62541.h>
|
5
5
|
#include <ruby.h>
|
6
6
|
|
7
|
-
VALUE mTYPES;
|
8
7
|
RUBY_EXTERN bool value_to_variant(VALUE value, UA_Variant *variant, UA_UInt32 proposal);
|
9
|
-
RUBY_EXTERN void Init_types();
|
8
|
+
RUBY_EXTERN void Init_types(VALUE mOPCUA);
|
10
9
|
RUBY_EXTERN VALUE extract_value(UA_Variant value);
|
11
10
|
|
12
11
|
#endif
|
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) {
|
562
593
|
UA_Variant arv; UA_Variant_init(&arv);
|
563
|
-
UA_Server_readValue(parent->master->master,
|
594
|
+
UA_Server_readValue(parent->master->master, ia, &arv);
|
564
595
|
|
565
|
-
|
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) {
|
600
|
+
UA_Variant arv; UA_Variant_init(&arv);
|
601
|
+
UA_Server_readValue(parent->master->master, oa, &arv);
|
602
|
+
|
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
|
}
|
@@ -719,6 +758,7 @@ static VALUE node_value_set(VALUE self, VALUE value) { //{{{
|
|
719
758
|
}
|
720
759
|
|
721
760
|
UA_Server_writeValue(ns->master->master, ns->id, variant);
|
761
|
+
UA_Variant_deleteMembers(&variant);
|
722
762
|
}
|
723
763
|
return self;
|
724
764
|
} //}}}
|
@@ -860,7 +900,7 @@ static VALUE server_add_namespace(VALUE self, VALUE name) { //{{{
|
|
860
900
|
char *nstr = (char *)StringValuePtr(str);
|
861
901
|
|
862
902
|
pss->default_ns = UA_Server_addNamespace(pss->master, nstr);
|
863
|
-
return
|
903
|
+
return INT2NUM(pss->default_ns);
|
864
904
|
} //}}}
|
865
905
|
static VALUE server_types(VALUE self) { //{{{
|
866
906
|
server_struct *pss;
|
@@ -913,6 +953,21 @@ static VALUE server_namespaces(VALUE self) { //{{{
|
|
913
953
|
RB_OBJ_FREEZE(ret);
|
914
954
|
return rb_ary_entry(ret,0);
|
915
955
|
} //}}}
|
956
|
+
static VALUE server_active_namespace(VALUE self) { //{{{
|
957
|
+
server_struct *pss;
|
958
|
+
Data_Get_Struct(self, server_struct, pss);
|
959
|
+
return UINT2NUM(pss->default_ns);
|
960
|
+
} //}}}
|
961
|
+
static VALUE server_active_namespace_set(VALUE self, VALUE val) { //{{{
|
962
|
+
server_struct *pss;
|
963
|
+
Data_Get_Struct(self, server_struct, pss);
|
964
|
+
|
965
|
+
if (NIL_P(val) || TYPE(val) != T_FIXNUM)
|
966
|
+
rb_raise(rb_eTypeError, "namespace is not an integer");
|
967
|
+
|
968
|
+
pss->default_ns = NUM2UINT(val);
|
969
|
+
return self;
|
970
|
+
} //}}}
|
916
971
|
|
917
972
|
void Init_server(void) {
|
918
973
|
mOPCUA = rb_define_module("OPCUA");
|
@@ -923,7 +978,7 @@ void Init_server(void) {
|
|
923
978
|
rb_define_const(mOPCUA, "BASEDATAVARIABLETYPE", INT2NUM(UA_NS0ID_BASEDATAVARIABLETYPE));
|
924
979
|
rb_define_const(mOPCUA, "PROPERTYTYPE", INT2NUM(UA_NS0ID_PROPERTYTYPE));
|
925
980
|
|
926
|
-
Init_types();
|
981
|
+
Init_types(mOPCUA);
|
927
982
|
|
928
983
|
cServer = rb_define_class_under(mOPCUA, "Server", rb_cObject);
|
929
984
|
cNode = rb_define_class_under(cServer, "Node", rb_cObject);
|
@@ -940,6 +995,8 @@ void Init_server(void) {
|
|
940
995
|
rb_define_method(cServer, "initialize", server_init, 0);
|
941
996
|
rb_define_method(cServer, "run", server_run, 0);
|
942
997
|
rb_define_method(cServer, "add_namespace", server_add_namespace, 1);
|
998
|
+
rb_define_method(cServer, "active_namespace", server_active_namespace, 0);
|
999
|
+
rb_define_method(cServer, "active_namespace=", server_active_namespace_set, 1);
|
943
1000
|
rb_define_method(cServer, "types", server_types, 0);
|
944
1001
|
rb_define_method(cServer, "references", server_references, 0);
|
945
1002
|
rb_define_method(cServer, "objects", server_objects, 0);
|
@@ -956,7 +1013,7 @@ void Init_server(void) {
|
|
956
1013
|
rb_define_method(cNode, "exists?", node_exists, 0);
|
957
1014
|
|
958
1015
|
rb_define_method(cTypeTopNode, "add_object_type", node_add_object_type, 1);
|
959
|
-
rb_define_method(cTypeTopNode, "add_reference_type", node_add_reference_type,
|
1016
|
+
rb_define_method(cTypeTopNode, "add_reference_type", node_add_reference_type, 2);
|
960
1017
|
rb_define_method(cTypeTopNode, "folder", node_type_folder, 0);
|
961
1018
|
|
962
1019
|
rb_define_method(cTypeSubNode, "add_object_type", node_add_object_type, 1);
|
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.19"
|
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.19'
|
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-07-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: daemonite
|
@@ -63,8 +63,8 @@ description: see https://github.com/etm/opcua-smart
|
|
63
63
|
email: juergen.mangler@gmail.com
|
64
64
|
executables: []
|
65
65
|
extensions:
|
66
|
-
- ext/opcua/server/extconf.rb
|
67
66
|
- ext/opcua/client/extconf.rb
|
67
|
+
- ext/opcua/server/extconf.rb
|
68
68
|
extra_rdoc_files:
|
69
69
|
- README.md
|
70
70
|
files:
|
@@ -74,6 +74,7 @@ files:
|
|
74
74
|
- cert/cert.h
|
75
75
|
- cert/cert_key.h
|
76
76
|
- example/bug5.rb
|
77
|
+
- example/client_get_float.rb
|
77
78
|
- example/client_get_sync.rb
|
78
79
|
- example/client_get_value.rb
|
79
80
|
- example/client_method.rb
|
@@ -81,8 +82,16 @@ files:
|
|
81
82
|
- example/client_subscription.rb
|
82
83
|
- example/kelch.KMT
|
83
84
|
- example/server.rb
|
85
|
+
- example/server_browse.rb
|
84
86
|
- example/server_deep.rb
|
87
|
+
- example/server_values.rb
|
88
|
+
- example/server_xml.rb
|
89
|
+
- example/test
|
90
|
+
- example/test.mpf
|
85
91
|
- example/test.rb
|
92
|
+
- example/test1
|
93
|
+
- example/tester.mpf
|
94
|
+
- example/turm.rb
|
86
95
|
- ext/opcua/client/client.c
|
87
96
|
- ext/opcua/client/client.h
|
88
97
|
- ext/opcua/client/extconf.rb
|
@@ -135,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
144
|
- !ruby/object:Gem::Version
|
136
145
|
version: '0'
|
137
146
|
requirements: []
|
138
|
-
rubygems_version: 3.
|
147
|
+
rubygems_version: 3.1.2
|
139
148
|
signing_key:
|
140
149
|
specification_version: 4
|
141
150
|
summary: Preliminary release of opcua (open62541) ruby bindings. C performance, Ruby
|