GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > EMSG / V1-1-0
Constituent: emsg_st     Tag: sun-gcc
#include "stdio.h"
#include "stdarg.h"
#include "time.h"
#include "EMSG/EMSG_pubdefs.h"
#include "EMSG/EMSG_database.h"
Include dependency graph for EMSG_database.c:
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. |
|
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.
|