Functions | |
INT | cm_get_error (INT code, char *string) |
INT | cm_set_msg_print (INT system_mask, INT user_mask, int(*func)(const char *)) |
INT | cm_msg_log (INT message_type, const char *message) |
INT | cm_msg_log1 (INT message_type, const char *message, const char *facility) |
INT | cm_msg (INT message_type, char *filename, INT line, const char *routine, const char *format,...) |
INT | cm_msg1 (INT message_type, char *filename, INT line, const char *facility, const char *routine, const char *format,...) |
INT | cm_msg_register (void(*func)(HNDLE, HNDLE, EVENT_HEADER *, void *)) |
INT | cm_msg_retrieve (INT n_message, char *message, INT *buf_size) |
|
Convert error code to string. Used after cm_connect_experiment to print error string in command line programs or windows programs.
Definition at line 288 of file midas.c. Referenced by cm_connect_experiment(). |
|
|
This routine is similar to cm_msg(). It differs from cm_msg() only by the logging destination being a file given through the argument list i.e:facility For internal use only.
|
|
Write message to logging file. Called by cm_msg.
Definition at line 350 of file midas.c. Referenced by cm_msg(). |
|
Write message to logging file. Called by cm_msg(). For internal use only.
Definition at line 419 of file midas.c. Referenced by cm_msg1(). |
|
Register a dispatch function for receiving system messages.
|
|
Retrieve old messages from log file
|
|
Set message masks. When a message is generated by calling cm_msg(), it can got to two destinatinons. First a user defined callback routine and second to the "SYSMSG" buffer. A user defined callback receives all messages which satisfy the user_mask.
int message_print(const char *msg) { char str[160]; memset(str, ' ', 159); str[159] = 0; if (msg[0] == '[') msg = strchr(msg, ']')+2; memcpy(str, msg, strlen(msg)); ss_printf(0, 20, str); return 0; } ... cm_set_msg_print(MT_ALL, MT_ALL, message_print); ...
Definition at line 333 of file midas.c. Referenced by cm_connect_experiment1(), and main(). |