1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
// Determine Transmission File Naming
sprintf(tranFn,"%sTran.txt",sysPrefix); // Transmission Logging Kevin ver 4.264 June 27/2014
// Open Transmission File - Append/Text
tranLog = fopen(tranFn,"at"); // append, text Added Kevin June 27/2014 Transmission / Affiliation Logging
// Check for Transmission File Opening
if(tranLog == NULL) // Unknown Affil / Trans Logging Kevin June 27/2014
{
shouldNever("Transmission File: 0001TRAN.TXT Open Failed");
}
// Write data to Transmission File ..
strcpy(transcode,"Tr");
LongTimeTmp = localtime(&now);
sprintf(tmDateResult,"%04d/%02d/%02d %02d:%02d:%02d",1900+LongTimeTmp->tm_year,1+LongTimeTmp->tm_mon,LongTimeTmp->tm_mday,LongTimeTmp->tm_hour,LongTimeTmp->tm_min,LongTimeTmp->tm_sec);
sprintf(radiocode,"%5hu",callingDes->theCode);
sprintf(transtype,"%s",flagbytes[flags]);
sprintf(groupcode,"%4hu",destDes->theCode);
fputs(tmDateResult,tranLog); // DateTime of Transmission
fputc(',',tranLog); // Comma
fputs(radiocode,tranLog); // Transmitting Radio Code
fputc(',',tranLog); // Comma
fputs(transcode,tranLog); // Tr String
fputc(',',tranLog); // Comma
fputs(transtype,tranLog); // Transmission Type
fputc(',',tranLog); // Comma
fputs(groupcode,tranLog); // Group Code
fputc('\n',tranLog); // End of line
// Write to Transmission File Option ? Using fprintf
//LongTimeTmp = localtime(&now);
//sprintf(tmDateResult,"%04d/%02d/%02d %02d:%02d:%02d",1900+LongTimeTmp->tm_year,1+LongTimeTmp->tm_mon,LongTimeTmp->tm_mday,LongTimeTmp->tm_hour,LongTimeTmp->tm_min,LongTimeTmp->tm_sec);
// Log Radio Transmission .. ver 4.224 June 23/2014
//fprintf(tranLog,"%s,Valid Transmission Noted:,%5hu,Tr->,%4hu,%s \n", tmDateResult,callingDes->theCode,destDes->theCode,destDes->titleString());
// Close of Transmission File
if(tranLog )
{
fclose(tranLog);
}
else
{
sprintf(tempArea,"CLOSE of 0001TRAN.TXT failed");
shouldNever(tempArea);
}
|