python-module/cpplmodule.cc
/**
 * Get node parameters from disk.
 */
Get node parameters from disk.
Get node parameters from disk .
static PyObject *cpplmodule_read_node_parameters_from_file(PyObject *self, PyObject *args)
{
  PyObject *retval;
  char *nodeParamsPath, *nodeRuntimeParamsPath;
  long long pd_key;
  PolicyDefinition *pd;
  NodeParameters *np;
  if (!PyArg_ParseTuple(args, "ssL", &nodeParamsPath, &nodeRuntimeParamsPath, &pd_key)) {
    return NULL;
  }
  pd = pd_list.at(pd_key);
  try {
    np = cppl_read_node_parameters_from_file(nodeParamsPath, nodeRuntimeParamsPath, pd);
  }
  catch (std::string s) {
    return PyErr_Format(CpplError, "%s", s.c_str());
  }
  long long np_key = (long long)np;
  np_list[np_key] = np;
  retval = Py_BuildValue("L", np_key);
  return retval;
}
static PyObject * cpplmodule_read_node_parameters_from_file ( PyObject * self , PyObject * args ) { PyObject * retval ; char * nodeParamsPath , * nodeRuntimeParamsPath ; long long pd_key ; PolicyDefinition * pd ; NodeParameters * np ; if ( ! PyArg_ParseTuple ( args , " " , & nodeParamsPath , & nodeRuntimeParamsPath , & pd_key ) ) { return NULL ; } pd = pd_list . at ( pd_key ) ; try { np = cppl_read_node_parameters_from_file ( nodeParamsPath , nodeRuntimeParamsPath , pd ) ; } catch ( std :: string s ) { return PyErr_Format ( CpplError , " " , s . c_str ( ) ) ; } long long np_key = ( long long ) np ; np_list [ np_key ] = np ; retval = Py_BuildValue ( " " , np_key ) ; return retval ; }
Get node parameters from disk.
Get node parameters from disk .