
Name: |
int gfdReadStatusFileHeader (int fid, | |
Inputs: |
int fid |
|
Outputs: |
struct cp_status_header_s header |
|
Returns: |
GFD_SUCCESS |
|
|
GFDBAD_STATUS_FILE |
|
|
GFDNO_STATUS_FILE |
|
Includes: |
gfdstatu.h |
|
|
gfdmsg.h | |
|
gfdipc.h |
|
The gfdReadStatusFileHeader( ) function reads version, size, and date information from a status file.
One field in the status-file header shows the number of fax channels active in the chassis. Also in the header file is a cp_status_header data-structure definition for a header of a status file. Table 41 lists the fields in a status-file header. A data structure for the status table is in GFDSTATU.H, which is the header file for status functions included in GDK. This structure follows:
struct cp_status_header_s {
short cp_status_version; /* version of status file */
short cp_header_size; /* size of header (bytes) */
short cp_record_size; /* allocated size for each card */
short cp_max_channel; /* number of channels allocated */
time_t cp_last_update; /* time of last update */
};
Table 41. Fields in the Status-File Header
Data Type |
Field Name |
Description |
int |
Version of the status file. | |
int |
Size of the header in bytes. | |
int |
Allocated size for each fax channel. | |
int |
Number of fax channels active in the chassis. | |
time_t |
Time of last update. |
#include "gfdstatu.h"
#include "gfdmsg.h"
#include "gfdipc.h"
struct cp_status_header_s header;
/*Display header inforrmation*/
gfdReadStatusFileHeader (status_fid, &header);
printf ("Status file is version %d\n", header.cp_status_version);
printf ("Status file reports %d active channels\n",
header.cp_max_channel);
printf ("Status file last updated %s\n",
ctime(&header.cp_last_update));
Click here to contact Dialogic Customer Engineering
Copyright 2000, Dialogic Corporation