mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-21 13:15:40 -05:00
Event History, Add New .bat file for cygwin portable that will also open and tail an event_log file; #287
Add an initial system event for users to see when started;
This commit is contained in:
@@ -48,21 +48,24 @@ set datetimestr=%d%_%t%
|
|||||||
set rnd=%RANDOM%
|
set rnd=%RANDOM%
|
||||||
|
|
||||||
@REM set log file relative filepath
|
@REM set log file relative filepath
|
||||||
set "log=.\logs\log_%datetimestr%_%rnd%.txt"
|
set "clog=.\logs\console_log_%datetimestr%_%rnd%.txt"
|
||||||
|
set "elog=.\logs\event_log_%datetimestr%_%rnd%.txt"
|
||||||
|
|
||||||
@REM create the log file now with touch
|
@REM create the log file now with touch
|
||||||
.\dsd-fme\touch.exe %log%
|
.\dsd-fme\touch.exe %clog%
|
||||||
|
.\dsd-fme\touch.exe %elog%
|
||||||
|
|
||||||
@REM Launch Tail to display the log in a seperate console window
|
@REM Launch Tail to display the console log and event log in a seperate console windows
|
||||||
start .\dsd-fme\tail.exe -n 40 -f %log%
|
start .\dsd-fme\tail.exe -n 40 -f %clog%
|
||||||
|
start .\dsd-fme\tail.exe -n 40 -f %elog%
|
||||||
|
|
||||||
@REM start dsd-fme with options and log
|
@REM start dsd-fme with options and log
|
||||||
.\dsd-fme\dsd-fme.exe %options% 2> %log%
|
.\dsd-fme\dsd-fme.exe %options% -~ %elog% 2> %clog%
|
||||||
|
|
||||||
echo ----------------------------------------------------------------------------------
|
echo ----------------------------------------------------------------------------------
|
||||||
echo ----------------------------------------------------------------------------------
|
echo ----------------------------------------------------------------------------------
|
||||||
echo For any errors, see: %log%
|
echo For any errors, see: %clog%
|
||||||
echo Forward %log% and Options: "%options%"
|
echo Forward %clog% and Options: "%options%"
|
||||||
echo to developer on Github or Radio Reference for troubleshooting.
|
echo to developer on Github or Radio Reference for troubleshooting.
|
||||||
echo ----------------------------------------------------------------------------------
|
echo ----------------------------------------------------------------------------------
|
||||||
echo ----------------------------------------------------------------------------------
|
echo ----------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -1620,6 +1620,38 @@
|
|||||||
openPulseOutput(opts);
|
openPulseOutput(opts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//push a DSD-FME started event so users can see what this section does, and also gives users an idea of when context started
|
||||||
|
watchdog_event_datacall (opts, state, 0, 0, "Any decoded voice calls or data calls display here;", 0);
|
||||||
|
push_event_history (&state->event_history_s[0]);
|
||||||
|
init_event_history (&state->event_history_s[0], 0, 1);
|
||||||
|
watchdog_event_datacall (opts, state, 0, 0, "DSD-FME Started and Event History Initialized;", 0);
|
||||||
|
push_event_history (&state->event_history_s[0]);
|
||||||
|
init_event_history (&state->event_history_s[0], 0, 1);
|
||||||
|
|
||||||
|
if (opts->event_out_file[0] != 0)
|
||||||
|
{
|
||||||
|
char * timestr = getTimeN(time(NULL));
|
||||||
|
char * datestr = getDateN(time(NULL));
|
||||||
|
char event_string[2000];
|
||||||
|
memset (event_string, 0, sizeof(event_string));
|
||||||
|
sprintf (event_string, "%s %s DSD-FME Started and Event History Initialized;", datestr, timestr);
|
||||||
|
write_event_to_log_file (opts, state, event_string);
|
||||||
|
memset (event_string, 0, sizeof(event_string));
|
||||||
|
sprintf (event_string, "%s %s Any decoded voice calls or data calls display here;", datestr, timestr);
|
||||||
|
write_event_to_log_file (opts, state, event_string);
|
||||||
|
|
||||||
|
if (timestr != NULL)
|
||||||
|
{
|
||||||
|
free (timestr);
|
||||||
|
timestr = NULL;
|
||||||
|
}
|
||||||
|
if (datestr != NULL)
|
||||||
|
{
|
||||||
|
free (datestr);
|
||||||
|
datestr = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//test P25 moto alias by loading in test vectors captured from a system and dumped on forum (see dsd_gps.c)
|
//test P25 moto alias by loading in test vectors captured from a system and dumped on forum (see dsd_gps.c)
|
||||||
// apx_embedded_alias_test_phase1(opts, state); //enable this to run test
|
// apx_embedded_alias_test_phase1(opts, state); //enable this to run test
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user