#include <stdio.h>
#include <string.h>
#include <time.h>
#include "md5.h"
#include "wlcstdc.h"
Include dependency graph for scdata.h:
This graph shows which files directly or indirectly include this file:
Data Structures | |
struct | SCs_data |
struct | SCr_errno |
Defines | |
#define | SCR_MAX_NOCHECK 5 |
#define | TIMELEN 9 |
#define | DATELEN 11 |
#define | MD5LEN 16 |
Enumerations | |
enum | SCr_error_type { SCr_err_startup = 0, SCr_err_nocheck = 1, SCr_err_file_format = 2, SCr_err_sys_disk = 3, SCr_err_transfer = 4, SCr_err_unloged = 5, SCr_err_types = 6 } |
enum | SCt_error_type { SCt_err_argc = 1, SCt_err_no_twlset = 3, SCt_err_no_owlset = 5, SCt_err_no_wlset = 7, SCt_err_no_terr = 11, SCt_err_pre_sh = 13, SCt_err_post_sh = 15, SCt_err_over = 17 } |
Functions | |
const char * | SCr_err_to_str (int type) |
void | scode_time (char *give, time_t timer) |
void | scode_date (char *give, time_t timer) |
void | SCr_err_fwrite (FILE *dst, const struct SCr_errno *err) |
void | SCr_err_fread (FILE *src, struct SCr_errno *err) |
int | SCs_data_fwrite (FILE *dst, const struct SCs_data *data) |
int | SCs_data_fread (FILE *src, struct SCs_data *data) |
int | md5file (FILE *fp, unsigned char *digest) |
Variables | |
const char * | SC_wlset_name |
const char * | SC_worklogs_dir |
const char * | SC_errorlog_name |
#define DATELEN 11 |
The length of a string with a date in ISO format
#define MD5LEN 16 |
The lenght of a string with the MD5 checksum
#define SCR_MAX_NOCHECK 5 |
The number of maximum unsuccessful communication tray's with SCslave module
#define TIMELEN 9 |
The length of a string with time in format HH:MM:SS
enum SCr_error_type |
Error types codes returned and logged in errorlog file by the SCrunner program. See the "Selection Check Developers Manual" for more detail.
enum SCt_error_type |
Transfer type error codes
int md5file | ( | FILE * | fp, | |
unsigned char * | digest | |||
) |
Generates a MD5 checksum for a file. This is a modification of a function from md5sum source.
fp | file for witch the checksum will be generated | |
digest | byte array in witch the checksume will be stored, must be at least MD5LEN big |
void scode_date | ( | char * | give, | |
time_t | timer | |||
) |
Generates a string with the date from 'timer' in ISO format.
give | generated string | |
timer | source date |
void scode_time | ( | char * | give, | |
time_t | timer | |||
) |
Generates a string with time 'timer' in format HH:MM:SS.
give | generated string | |
timer | source time |
void SCr_err_fread | ( | FILE * | src, | |
struct SCr_errno * | err | |||
) |
Reads an error from the error log file
src | source file | |
err | the error |
void SCr_err_fwrite | ( | FILE * | dst, | |
const struct SCr_errno * | err | |||
) |
Writes an error to the errorlog file
dst | destination file | |
err | the error |
const char* SCr_err_to_str | ( | int | type | ) |
Converts code of an error type to its name.
type | error type from SCr_error_type |
int SCs_data_fread | ( | FILE * | src, | |
struct SCs_data * | data | |||
) |
Reades a SCslave data record from worklog file.
src | source file | |
data | SCslave data record |
int SCs_data_fwrite | ( | FILE * | dst, | |
const struct SCs_data * | data | |||
) |
Writes a data record from SCslave to a worklog file.
dst | destination file | |
data | data record from SCslave |
const char * SC_errorlog_name |
the name of the error log file
const char* SC_wlset_name |
the name of a wlset type file
const char * SC_worklogs_dir |
the name of the directory that holds worklog files