From f75ac25e6e93ab167b5f3cfdecbbbf286fdc4fed Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Fri, 24 Jan 2014 14:11:19 +0100 Subject: Implement remote control and global_stats, and add to configuration --- src/DabMux.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/DabMux.cpp') diff --git a/src/DabMux.cpp b/src/DabMux.cpp index d1198f1..4e10287 100644 --- a/src/DabMux.cpp +++ b/src/DabMux.cpp @@ -123,7 +123,7 @@ typedef DWORD32 uint32_t; using namespace std; /* Global stats server */ -StatsServer global_stats(12720); //TODO define port +StatsServer* global_stats; static unsigned char Padding_FIB[] = { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -288,6 +288,8 @@ int main(int argc, char *argv[]) vector::iterator output; dabProtection* protection = NULL; + BaseRemoteController* rc; + unsigned int currentFrame; int returnCode = 0; int result; @@ -312,6 +314,8 @@ int main(int argc, char *argv[]) bool enableTist = false; unsigned timestamp = 0; + int statsserverport = 0; + unsigned long time_seconds = 0; struct timeval mnsc_time; @@ -337,7 +341,7 @@ int main(int argc, char *argv[]) string conf_file = argv[2]; parse_configfile(conf_file, outputs, ensemble, &enableTist, &FICL, - &factumAnalyzer, &limit); + &factumAnalyzer, &limit, rc, &statsserverport); printSubchannels(ensemble->subchannels); cerr << endl; @@ -361,6 +365,13 @@ int main(int argc, char *argv[]) } } + if (statsserverport != 0) { + global_stats = new StatsServer(statsserverport); + } + else { + global_stats = new StatsServer(); + } + etiLog.log(info, "CRC-DABMUX starting up"); -- cgit v1.2.3