Class: OpalKelly::OkCScriptEngine

Inherits:
Object
  • Object
show all
Defined in:
ext/OpalKelly/FrontPanelDLL_wrap.cxx

Instance Method Summary collapse

Instance Method Details

#LoadFile(*args) ⇒ Object



27074
27075
27076
27077
27078
27079
27080
27081
27082
27083
27084
27085
27086
27087
27088
27089
27090
27091
27092
27093
27094
27095
27096
27097
27098
27099
27100
27101
27102
27103
27104
27105
27106
27107
27108
27109
27110
27111
27112
27113
27114
27115
27116
27117
27118
27119
27120
27121
27122
27123
27124
# File 'ext/OpalKelly/FrontPanelDLL_wrap.cxx', line 27074

SWIGINTERN VALUE
_wrap_okCScriptEngine_LoadFile(int argc, VALUE *argv, VALUE self) {
  OpalKelly::ScriptEngine *arg1 = (OpalKelly::ScriptEngine *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_OpalKelly__ScriptEngine, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "OpalKelly::ScriptEngine *","LoadFile", 1, self )); 
  }
  arg1 = reinterpret_cast< OpalKelly::ScriptEngine * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","LoadFile", 2, argv[0] )); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","LoadFile", 2, argv[0])); 
    }
    arg2 = ptr;
  }
  {
    /*@SWIG:/home/runner/work/frontpanel-release/frontpanel-release/frontpanel-src/FrontPanelDLL/FrontPanelDLL.i,300,okExceptionHandlingCode@*/	try {
      (arg1)->LoadFile((std::string const &)*arg2);
    } catch (const okPyAXIOperationException& e) {
      okRbRaiseAXIOperation(e);
      goto fail;
    } catch (const okPyAXITransferException& e) {
      okRbRaiseAXITransfer(e);
      goto fail;
    } catch (const okFrontPanelException& e) {
      okRbRaiseFrontPanel(e);
      goto fail;
    } catch (const std::exception& e) {
      SWIG_Error(SWIG_RuntimeError, e.what());
      goto fail;
    }
    /*@SWIG@*/
  }
  if (SWIG_IsNewObj(res2)) delete arg2;
  return Qnil;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return Qnil;
}

#LoadScript(*args) ⇒ Object



27006
27007
27008
27009
27010
27011
27012
27013
27014
27015
27016
27017
27018
27019
27020
27021
27022
27023
27024
27025
27026
27027
27028
27029
27030
27031
27032
27033
27034
27035
27036
27037
27038
27039
27040
27041
27042
27043
27044
27045
27046
27047
27048
27049
27050
27051
27052
27053
27054
27055
27056
27057
27058
27059
27060
27061
27062
27063
27064
27065
27066
27067
27068
27069
27070
27071
# File 'ext/OpalKelly/FrontPanelDLL_wrap.cxx', line 27006

SWIGINTERN VALUE
_wrap_okCScriptEngine_LoadScript(int argc, VALUE *argv, VALUE self) {
  OpalKelly::ScriptEngine *arg1 = (OpalKelly::ScriptEngine *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  int res3 = SWIG_OLDOBJ ;
  
  if ((argc < 2) || (argc > 2)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_OpalKelly__ScriptEngine, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "OpalKelly::ScriptEngine *","LoadScript", 1, self )); 
  }
  arg1 = reinterpret_cast< OpalKelly::ScriptEngine * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","LoadScript", 2, argv[0] )); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","LoadScript", 2, argv[0])); 
    }
    arg2 = ptr;
  }
  {
    std::string *ptr = (std::string *)0;
    res3 = SWIG_AsPtr_std_string(argv[1], &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::string const &","LoadScript", 3, argv[1] )); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","LoadScript", 3, argv[1])); 
    }
    arg3 = ptr;
  }
  {
    /*@SWIG:/home/runner/work/frontpanel-release/frontpanel-release/frontpanel-src/FrontPanelDLL/FrontPanelDLL.i,300,okExceptionHandlingCode@*/	try {
      (arg1)->LoadScript((std::string const &)*arg2,(std::string const &)*arg3);
    } catch (const okPyAXIOperationException& e) {
      okRbRaiseAXIOperation(e);
      goto fail;
    } catch (const okPyAXITransferException& e) {
      okRbRaiseAXITransfer(e);
      goto fail;
    } catch (const okFrontPanelException& e) {
      okRbRaiseFrontPanel(e);
      goto fail;
    } catch (const std::exception& e) {
      SWIG_Error(SWIG_RuntimeError, e.what());
      goto fail;
    }
    /*@SWIG@*/
  }
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return Qnil;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return Qnil;
}

#PrependToScriptPath(*args) ⇒ Object



27127
27128
27129
27130
27131
27132
27133
27134
27135
27136
27137
27138
27139
27140
27141
27142
27143
27144
27145
27146
27147
27148
27149
27150
27151
27152
27153
27154
27155
27156
27157
27158
27159
27160
# File 'ext/OpalKelly/FrontPanelDLL_wrap.cxx', line 27127

SWIGINTERN VALUE
_wrap_okCScriptEngine_PrependToScriptPath(int argc, VALUE *argv, VALUE self) {
  OpalKelly::ScriptEngine *arg1 = (OpalKelly::ScriptEngine *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_OpalKelly__ScriptEngine, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "OpalKelly::ScriptEngine *","PrependToScriptPath", 1, self )); 
  }
  arg1 = reinterpret_cast< OpalKelly::ScriptEngine * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string(argv[0], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","PrependToScriptPath", 2, argv[0] )); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","PrependToScriptPath", 2, argv[0])); 
    }
    arg2 = ptr;
  }
  (arg1)->PrependToScriptPath((std::string const &)*arg2);
  if (SWIG_IsNewObj(res2)) delete arg2;
  return Qnil;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return Qnil;
}

#RunScriptFunction(*args, self) ⇒ Object



27296
27297
27298
27299
27300
27301
27302
27303
27304
27305
27306
27307
27308
27309
27310
27311
27312
27313
27314
27315
27316
27317
27318
27319
27320
27321
27322
27323
27324
27325
27326
27327
27328
27329
27330
27331
27332
27333
27334
27335
27336
27337
27338
27339
27340
27341
27342
27343
27344
# File 'ext/OpalKelly/FrontPanelDLL_wrap.cxx', line 27296

SWIGINTERN VALUE _wrap_okCScriptEngine_RunScriptFunction(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[4];
  int ii;
  
  argc = nargs + 1;
  argv[0] = self;
  if (argc > 4) SWIG_fail;
  for (ii = 1; (ii < argc); ++ii) {
    argv[ii] = args[ii-1];
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OpalKelly__ScriptEngine, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_okCScriptEngine_RunScriptFunction__SWIG_1(nargs, args, self);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OpalKelly__ScriptEngine, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = swig::asptr(argv[2], (std::vector< OpalKelly::ScriptValue,std::allocator< OpalKelly::ScriptValue > >**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_okCScriptEngine_RunScriptFunction__SWIG_0(nargs, args, self);
        }
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 4, "RunScriptFunction", 
    "    std::vector< OpalKelly::ScriptValue,std::allocator< OpalKelly::ScriptValue > > RunScriptFunction(std::string const &name, std::vector< OpalKelly::ScriptValue,std::allocator< OpalKelly::ScriptValue > > const &cargs)\n"
    "    std::vector< OpalKelly::ScriptValue,std::allocator< OpalKelly::ScriptValue > > RunScriptFunction(std::string const &name)\n");
  
  return Qnil;
}