|
MIDAS
|
Classes | |
| struct | msg_buffer_entry |
Variables | |
| static std::deque< msg_buffer_entry > | gMsgBuf |
| static std::mutex | gMsgBufMutex |
dox dox
|
static |
Definition at line 1080 of file midas.cxx.


| std::string cm_get_error | ( | INT | code | ) |
Convert error code to string. Used after cm_connect_experiment to print error string in command line programs or windows programs.
| code | Error code as defined in midas.h |
| string | Error string |
Definition at line 468 of file midas.cxx.


| INT cm_msg | ( | INT | message_type, |
| const char * | filename, | ||
| INT | line, | ||
| const char * | routine, | ||
| const char * | format, | ||
| ... | |||
| ) |
This routine can be called whenever an internal error occurs or an informative message is produced. Different message types can be enabled or disabled by setting the type bits via cm_set_msg_print().
| message_type | (See midas_macro). |
| filename | Name of source file where error occured |
| line | Line number where error occured |
| routine | Routine name. |
| format | message to printout, ... Parameters like for printf() |
Definition at line 930 of file midas.cxx.

| INT cm_msg1 | ( | INT | message_type, |
| const char * | filename, | ||
| INT | line, | ||
| const char * | facility, | ||
| const char * | routine, | ||
| const char * | format, | ||
| ... | |||
| ) |
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
| message_type | See midas_macro. |
| filename | Name of source file where error occured |
| line | Line number where error occured |
| facility | Logging file name |
| routine | Routine name |
| format | message to printout, ... Parameters like for printf() |
Definition at line 988 of file midas.cxx.


Definition at line 500 of file midas.cxx.


| INT EXPRT cm_msg_facilities | ( | STRING_LIST * | list | ) |
Retrieve list of message facilities by searching logfiles on disk
| list | List of facilities |
Definition at line 517 of file midas.cxx.


This routine can be called to process messages buffered by cm_msg(). Normally it is called from cm_yield() and cm_disconnect_experiment() to make sure all accumulated messages are processed.
Definition at line 880 of file midas.cxx.


|
static |
Definition at line 764 of file midas.cxx.


| void cm_msg_get_logfile | ( | const char * | fac, |
| time_t | t, | ||
| std::string * | filename, | ||
| std::string * | linkname, | ||
| std::string * | linktarget | ||
| ) |
Definition at line 552 of file midas.cxx.


Write message to logging file. Called by cm_msg.
| message_type | Message type |
| message | Message string |
| facility | Message facility, filename in which messages will be written |
Definition at line 677 of file midas.cxx.


Definition at line 487 of file midas.cxx.


| INT cm_msg_register | ( | EVENT_HANDLER * | func | ) |
Register a dispatch function for receiving system messages.
| func | Dispatch function. |
Definition at line 1066 of file midas.cxx.


Retrieve newest messages from "midas" facility log file
| n_message | Number of messages to retrieve |
| message | buf_size bytes of messages, separated by characters. The returned number of bytes is normally smaller than the initial buf_size, since only full lines are returned. |
| *buf_size | Size of message buffer to fill |
Definition at line 1349 of file midas.cxx.


|
static |
Definition at line 1111 of file midas.cxx.


| INT cm_msg_retrieve2 | ( | const char * | facility, |
| time_t | t, | ||
| INT | n_message, | ||
| char ** | messages, | ||
| int * | num_messages | ||
| ) |
Retrieve old messages from log file
| facility | Logging facility ("midas", "chat", "lazy", ...) |
| t | Return messages logged before and including time t, value 0 means start with newest messages |
| min_messages | Minimum number of messages to return |
| messages | messages, newest first, separated by characters. caller should free() this buffer at the end. |
| num_messages | Number of messages returned |
Definition at line 1279 of file midas.cxx.


Definition at line 839 of file midas.cxx.


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.
| system_mask | Bit masks for MERROR, MINFO etc. to send system messages. |
| user_mask | Bit masks for MERROR, MINFO etc. to send messages to the user callback. |
| func | Function which receives all printout. By setting "puts", messages are just printed to the screen. |
Definition at line 660 of file midas.cxx.


|
static |