Function

int * findfields (FILE * infofile)

Arguments

infofile
The input file to be searched

Preconditions

The input file has been opened, but no data read

Postconditions

The header line of the input file has been read

SRS Refs

3.2.1.6b

Author

caedwa

Date

30/9/02

This function searches through the header line of the opened input file, and locates the required fields. It returns an array which contains the positions of all of the required fields. The position is the position of the field from left to right, with 0 begin the leftmost field.

Pseudocode

Get first line of infofile

While characters remaining in line

Find next recognised field and incremement pointer Record position Return list of positions

Function

long gettimediff (struct timeval * starttime)

Arguments

starttime
The time to compare the current time against

Preconditions

None

Postconditions

None

SRS Refs

3.2.1.6b, 3.2.1.6c

Author

caedwa

Date

30/09/02

This function returns the difference in time between now (which must be the most recent of the two times) and the time given. The difference is given in milliseconds.


Function

int find_match (char * string)

Arguments

string
String to be checked

Preconditions

string is a null-terminated string

Postconditions

None

SRS Refs

3.2.1.6b

Author

caedwa

Date

30/09/02

This function returns the field id value associated with the field name given at teh start of the string. If no known field name is given, it returns -1.


Function

struct logger_data * getfields (char * string)

Arguments

string
The string to be searched

Preconditions

string is a null-terminated string containing a data line from the input file

Postconditions

None

SRS Refs

3.2.1.6b

Author

caedwa

Date

30/09/02

Function

FILE * openinfofile ( void)

Arguments

void
no arguments

Description

Preconditions

None

Postconditions

The input file has been opened

SRS Refs

3.2.1.6

Author

caedwa

Date

30/09/02