Skip to content

Commit

Permalink
app_ruby: implemented KSR.pv.gete(...)
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Aug 27, 2018
1 parent 7bd55ca commit de5561d
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/modules/app_ruby/app_ruby_api.c
Expand Up @@ -245,10 +245,12 @@ int sr_kemi_ruby_return_int(sr_kemi_t *ket, int rc)
*/
static VALUE sr_kemi_ruby_return_none(int rmode)
{
if(rmode==0) {
return Qnil;
if(rmode==1) {
return rb_str_new_cstr("<<null>>");
} else if(rmode==2) {
return rb_str_new_cstr("");
}
return rb_str_new_cstr("<<null>>");
return Qnil;
}

/**
Expand Down Expand Up @@ -320,6 +322,14 @@ static VALUE app_ruby_pv_getw(int argc, VALUE* argv, VALUE self)
return app_ruby_pv_get_mode(argc, argv, self, 1);
}

/**
*
*/
static VALUE app_ruby_pv_gete(int argc, VALUE* argv, VALUE self)
{
return app_ruby_pv_get_mode(argc, argv, self, 2);
}

/**
*
*/
Expand Down Expand Up @@ -549,6 +559,7 @@ static VALUE app_ruby_pv_is_null(int argc, VALUE* argv, VALUE self)
static ksr_ruby_export_t _sr_kemi_pv_R_Map[] = {
{"PV", "get", app_ruby_pv_get},
{"PV", "getw", app_ruby_pv_getw},
{"PV", "gete", app_ruby_pv_gete},
{"PV", "seti", app_ruby_pv_seti},
{"PV", "sets", app_ruby_pv_sets},
{"PV", "unset", app_ruby_pv_unset},
Expand Down

0 comments on commit de5561d

Please sign in to comment.