GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > EMSG / V1-1-0
Constituent: emsg_st     Tag: linux-gcc
#include "stdarg.h"
#include "time.h"
Include dependency graph for EMSG_database.h:
This graph shows which files directly or indirectly include this file:
Data Structures | |
struct | _EMSG_MsgList |
List of messages used at run time. More... | |
struct | _EMSG_FacList |
List of facilities used at run time. More... | |
Typedefs | |
typedef unsigned int | EMSG_CbReportRtn (unsigned int code, struct timespec hack, const char *rtn, unsigned int nprm, va_list list) |
Signature for the MSG reporting routine. | |
typedef _EMSG_MsgList | EMSG_MsgList |
List of messages used at run time. | |
typedef _EMSG_FacList | EMSG_FacList |
List of facilities used at run time. | |
Functions | |
unsigned int | EMSG_find (unsigned int code, const EMSG_FacList **fdb, const EMSG_MsgList **mdb) |
Return facility and message database entries corresponding to code. | |
void | EMSG_insertFacility (const EMSG_FacList *fac) |
Insert a new facility into the store. | |
void | EMSG_removeFacility (const EMSG_FacList *fac) |
Remove an existing facility from the store. |
This file provides the structure definitions and function prototypes for inserting and removing contributions to the message database.
|
List of facilities used at run time.
This structure is used at run time to store a list of facilities. This is one of the structures used in the files generated by the |
|
List of messages used at run time.
This structure is used at run time to store a list of messages. This is one of the structures used in the files generated by the |
|
Return facility and message database entries corresponding to code. This routine searches for the facility and message descriptors corresponding to the message code provided as the first argument. If the code cannot be found, both descriptors are returned as NULL pointers (in addition to the return code indicating failure).
|
|
Insert a new facility into the store. This routine inserts a facility into the facility search list. This is all very "clever". Message facilities take advantage of the fact that a routine can be declared __attribute__((constructor)) which results in it being run either before the main routine starts up (typical for single-threaded host applications) or immediately after a module is loaded (typical for the multi-threaded VxWorks environment). This technique is really provided for C++ static constructors, but there's no reason not to take advantage of it. Thus every message facility source file contains a little stub routine declared constructor whose sole function is to call this routine with the address of the facility block.
|
|
Remove an existing facility from the store. This routine removes a facility from the facility search list. This is all very "clever". Message facilities take advantage of the fact that a routine can be declared __attribute__((destructor)) which results in it being run either after the main routine completes (typical for single-threaded host applications) or immediately before a module is unloaded (typical for the multi-threaded VxWorks environment). This technique is really provided for C++ static destructors, but there's no reason not to take advantage of it. Thus every message facility source file contains a little stub routine declared destructor whose sole function is to call this routine with the address of the facility block.
|