GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > MSG / V3-0-2

Constituent: msg2src     Tag: linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

MSG_readMsg.c File Reference

Read a .msg file. More...

#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "PBS/MBA.h"
#include "MSG/MSG_pubdefs.h"
#include "M2S_msgs.h"
#include "MSG_m2sdefs.h"

Include dependency graph for MSG_readMsg.c:

Include dependency graph

Defines

#define MSG_TOKEN_DONTCARE   0
 Quoted or unquoted.

#define MSG_TOKEN_NOQUOTE   1
 Token must not be quoted.

#define MSG_TOKEN_QUOTE   2
 Token must be quoted.

#define MSG_TOKEN_ABSENT   3
 Token must be absent.

#define MSG_K_SPECIAL   31
 Number of special characters in formatting statements.


Enumerations

enum  _MSG_filemode {
  MSG_FM_FACILITY,
  MSG_FM_MESSAGES
}
 File searching mode. More...


Functions

unsigned int nextToken (char *fmsg, int lnum, char *lbeg, char *lcur, char *lend, char **tbeg, char **tend, int flag)
 Return pointers to the next token on a line.

unsigned int parseFacility (MSG_FacDefinition *fac, char *fmsg, int lnum, char *lbeg, char *lcur, char *lend)
 Parse the facility name.

unsigned int parseMessage (MSG_FacDefinition *fac, char *fmsg, int lnum, char *lbeg, char *lend)
 Parse a message line.

unsigned int parseText (unsigned int *nsub, unsigned int *fsub, char *fmsg, int lnum, char *lbeg, char *tbeg, char *tend)
 Parse a formatting string.

void printError (char *fmsg, int lnum, char *msg, char *lbeg, char *tloc)
 Error during parsing of .msg file ... indicate location.

unsigned int MSG_readMsg (MSG_FacDefinition *fac, char *fmsg)
 Read a .msg file.


Variables

const char s_upper [] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
 The upper case alphabet.

const char s_allow [] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_"
 The character set allowed in message name.

const char s_severity [] = "SWIE"
 Allowed severity characters in correct severity code order.


Detailed Description

Read a .msg file.

CVS $Id: MSG_readMsg.c,v 1.6 2005/09/22 01:45:07 apw Exp $
Author:
A.P.Waite

Enumeration Type Documentation

enum _MSG_filemode
 

File searching mode.

Enumeration values:
MSG_FM_FACILITY  Looking for the facility description line
MSG_FM_MESSAGES  Looking for message description lines


Function Documentation

unsigned int MSG_readMsg MSG_FacDefinition fac,
char *  fmsg
 

Read a .msg file.

Parameters:
fac Facility structure into which to read the file
fmsg Name of message file to read
Return values:
0 Success
1 Failure
Read and parse a .msg file.

Here is the call graph for this function:

unsigned int nextToken char *  fmsg,
int  lnum,
char *  lbeg,
char *  lcur,
char *  lend,
char **  tbeg,
char **  tend,
int  flag
[static]
 

Return pointers to the next token on a line.

Parameters:
fmsg Message file name
lnum Line number in .msg file
lbeg Pointer to start of line
lcur Pointer to point where token searching should start
lend Pointer to end of line (actually the null terminator)
tbeg Start of next token (returned)
tend End of next token (returned)
flag Constraint on token search
Return values:
0 Success
1 Failure
Find next token in the line.

Here is the call graph for this function:

unsigned int parseFacility MSG_FacDefinition fac,
char *  fmsg,
int  lnum,
char *  lbeg,
char *  lcur,
char *  lend
[static]
 

Parse the facility name.

Parameters:
fac Pointer to facility structure
fmsg Message file name
lnum Line number in .msg file
lbeg Pointer to beginning of line
lcur Current pointer in line
lend Pointer to end of line
Return values:
0 Success
1 Failure
Parse a facility line in a .msg file.

Here is the call graph for this function:

unsigned int parseMessage MSG_FacDefinition fac,
char *  fmsg,
int  lnum,
char *  lbeg,
char *  lend
[static]
 

Parse a message line.

Parameters:
fac Pointer to facility structure
fmsg Message file name
lnum Line number in .msg file
lbeg Pointer to beginning of line
lend Pointer to end of line
Return values:
0 Success
1 Failure
Parse a message line in a .msg file.

Here is the call graph for this function:

unsigned int parseText unsigned int *  nsub,
unsigned int *  fsub,
char *  fmsg,
int  lnum,
char *  lbeg,
char *  tbeg,
char *  tend
[static]
 

Parse a formatting string.

Parameters:
nsub Number of substitutions in formatting string
fsub Pattern of substitutions in formatting string
fmsg Message file name
lnum Line number in .msg file
lbeg Pointer to beginning of line
tbeg Pointer to beginning of text formatting string
tend Pointer to end of text formatting string
Return values:
0 Success
1 Failure
Parse a text formatting string (third token of a message line in a .msg file).

Here is the call graph for this function:

void printError char *  fmsg,
int  lnum,
char *  msg,
char *  lbeg,
char *  tloc
[static]
 

Error during parsing of .msg file ... indicate location.

Parameters:
fmsg Message file name
lnum Line number where error occured
msg Arbitrary text describing error
lbeg Pointer to text of line
tloc Character offset in line to where error detected


Generated on Thu Sep 22 08:09:20 2005 by doxygen 1.3.3