Method: RCSimCinterface.rcsim_make_systemT
- Defined in:
- ext/hruby_sim/hruby_rcsim_build.c
.rcsim_make_systemT(name) ⇒ Object
Creating a systemT C object.
205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 |
# File 'ext/hruby_sim/hruby_rcsim_build.c', line 205
VALUE rcsim_make_systemT(VALUE mod, VALUE name) {
// printf("rcsim_make_systemT\n");
/* Allocates the systemT. */
SystemT systemT = (SystemT)malloc(sizeof(SystemTS));
// printf("systemT=%p\n",systemT);
/* Set it up. */
systemT->kind = SYSTEMT;
systemT->owner = NULL;
systemT->name = strdup(StringValueCStr(name));
// printf("systemT->name=%p\n",systemT->name);
systemT->num_inputs = 0;
systemT->inputs = NULL;
systemT->num_outputs = 0;
systemT->outputs = NULL;
systemT->num_inouts = 0;
systemT->inouts = NULL;
systemT->scope = NULL;
// printf("Created systemT with kind=%d and name=%s\n",systemT->kind,systemT->name);
/* Returns the C systemT embedded into a ruby VALUE. */
VALUE res;
rcsim_to_value(SystemTS,systemT,res);
return res;
}
|