The following are some example calls to the above functions. Note that it is assumed that the connection to xrtic has been established elsewhere:
int connect_flag; rtic_get_flag_connect(&connect_flag); printf(``The connection is ''); if (connect_flag) { printf(``Up\n''); } else { printf(``Down\n''); }
float ftmp; int ID; ID = 2; rtic_get_scalar(ID,&ftmp); printf(``The value of parameter %d is %f\n'',ID,ftmp);Note that it is assumed that the ID submitted to rtic_get_scalar() is within range. The user is encouraged to use rtic_check_ID() to check all IDs.
rtic_set_scalar(2, 100.2);Note: as of the time of this writing, there is no way to alter matrix values from a user's module.
[time][ratio][val0][val1]...[valN]:do the following:
struct data_struct *data; int index; data = (struct data_struct *) malloc(sizeof(struct data_struct)); while(1) { rtic_get_data(data); printf("[%.2e][%i]", (double)(data->time/1.0e9), data->factor); for(index=0;index<RTIC_MAX_DATA_BUF;index++) printf("[%.2e]", data->val[index]); printf("\n"); }