# Overview of modem metrics

Modem metrics provide information about the performance of the receive modems during a fax session. Use this information to determine the quality of current line conditions during a fax session.

NaturalFax modem metrics provide an estimate of the signal-to-noise ratio (SNR) and the results of the training check frame (TCF). These metrics are valid when NaturalFax is acting as the receive fax machine. Modem metrics are available to NaturalFax through the NFX_FAX_STATUS structure in the snr and rx_training_zeros fields.

typedef struct
{
DWORD size;
DWORD rate;
DWORD ecm; /* Error correction mode: NFX_YES or NFX_NO */
DWORD resolution;
DWORD encoding;
DWORD pagewidth;
DWORD mode; /* NFX_MODE_IDLE, NFX_MODE_NEGOTIATING, */
/* NFX_MODE_TRANSMITING, NFX_MODE_RECEIVING, */
/* NFX_MODE_DISCONNECTING, NFX_MODE_FINISHED */
DWORD error; /* Last error code generated */
DWORD docnumber;/* Current document in progress */
DWORD pagenumber;/* Current page of the document */
DWORD badlines; /* Number of bad lines (or bad frames in */
/* ECM mode) during current session */
char filename[NFX_FILENAME_MAX];
/* Name of current file processed */
char remoteSID[NFX_MAX_SID];
/* Received SID from remote station */
BYTE remoteNSF[NFX_MAX_NSF];
/* Received NSF from remote station */
DWORD snr; /* Signal to noise ratio in dB */
DWORD rx_training_zeros;
/* Training zeros in the TCF */
/* in tens of milliseconds */
char remoteSUB[NFX_MAX_SUB];
/* Received Sub-Address string from */
/* remote station */
DWORD sub_sent;
/* Set if Sub-Address frame is sent to */
/* remote station */
DWORD modemtype;/* Modem used to transfer document */
} NFX_FAX_STATUS;