SIS - Application Programmatic Interface, Reference Manual - ICS ...
SIS - Application Programmatic Interface, Reference Manual - ICS ...
SIS - Application Programmatic Interface, Reference Manual - ICS ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>SIS</strong>-<strong>Application</strong> <strong>Programmatic</strong> <strong>Interface</strong>, <strong>Reference</strong> <strong>Manual</strong><br />
Appendix A – C-API function declaration<br />
Here follows a list of the type definitions of data types seen in the argument list of<br />
some functions of the <strong>SIS</strong> C application programmatic interface (C-API):<br />
typedef char l _name[LOGINAM_SIZE];<br />
typedef char name_buffer[INPUT_LOGINAM_SIZE];<br />
struct category_set {<br />
name_buffer fcl;<br />
name_buffer cat;<br />
int direction; /* FORWARD, BACKWARD, BOTH_DIR */<br />
};<br />
typedef struct category_set categories_set[NUMBER_OF_CATEGORIES];<br />
typedef struct cm_value {<br />
int type; /* TYPE_INT, TYPE_STRING, TYPE_FLOAT,<br />
TYPE_NODE, TYPE_EMPTY, TYPE_TIME */<br />
int sysid;<br />
union {<br />
TIME t;<br />
char *s;<br />
int n;<br />
float r;<br />
}value;<br />
}cm_value;<br />
typedef struct cm_value cm_value;<br />
Here follows a list of functions to set the cm_value fields.<br />
char *cm_to_str(cm_value *val);<br />
void print_val(cm_value *cmv);<br />
int assign_node(cm_value *cmv, char *s, int sysid);<br />
int assign_string(cm_value *cmv, char *s);<br />
void assign_time(cm_value *cmv, TIME t);<br />
void assign_int(cm_value *cmv, int n);<br />
void assign_float(cm_value *cmv, float r);<br />
void assign_empty(cm_value *cmv);<br />
ATTENTION !!! Since the system dynamically allocates space to return string<br />
information to a cm_value structure, this space should be freed when not needed<br />
(see section 6.8.2) on memory management.<br />
In the following pagesof the appendix we present the complete listing of the definition<br />
of the functions the API consists of.<br />
August 2002/v2.2.2 -43- <strong>ICS</strong>-FORTH