diff options
| author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-01-12 22:54:13 -0600 |
|---|---|---|
| committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-01-12 22:54:13 -0600 |
| commit | dc91899c25b1c87bfd33531715c8ca3498044a43 (patch) | |
| tree | baf1460c1f9e87a2c4eb04e3e1b9498cdb979eed /servers/logic_analyzer_server_lin/src/main.cpp | |
| parent | 061289c61346568047e75a15f4ab1b874e4654d1 (diff) | |
| download | ulab-dc91899c25b1c87bfd33531715c8ca3498044a43.tar.gz ulab-dc91899c25b1c87bfd33531715c8ca3498044a43.zip | |
Add initial version of a logic analyzer server
Diffstat (limited to 'servers/logic_analyzer_server_lin/src/main.cpp')
| -rw-r--r-- | servers/logic_analyzer_server_lin/src/main.cpp | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/servers/logic_analyzer_server_lin/src/main.cpp b/servers/logic_analyzer_server_lin/src/main.cpp new file mode 100644 index 0000000..75b905e --- /dev/null +++ b/servers/logic_analyzer_server_lin/src/main.cpp @@ -0,0 +1,64 @@ +/*************************************************************************** + * Copyright (C) 2014 by Timothy Pearson * + * kb9vqf@pearsoncomputing.net * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include <sys/types.h> +#include <sys/socket.h> +#include <netdb.h> +#include <pwd.h> +#include <limits.h> +#include <stdio.h> +#include <unistd.h> +#include <stdlib.h> + +#include <tqdatetime.h> +#include <tqfile.h> +#include <tqdir.h> + +#include <tdeapplication.h> +#include <tdestartupinfo.h> +#include <tdecmdlineargs.h> +#include <tdeaboutdata.h> +#include <ksimpleconfig.h> + +#include "logic_analyzer_server.h" + +static const char description[] = I18N_NOOP("uLab Logic Analyzer Server"); + +static const char version[] = "v0.0.1"; + +int main(int argc, char *argv[]) +{ + TDEAboutData aboutData( "ulab_logic_analyzer_server", I18N_NOOP("uLab Logic Analyzer Server"), + version, description, TDEAboutData::License_GPL, + "(c) 2014, Timothy Pearson"); + aboutData.addAuthor("Timothy Pearson",0, "kb9vqf@pearsoncomputing.net"); + TDECmdLineArgs::init( argc, argv, &aboutData ); + TDEApplication::disableAutoDcopRegistration(); + + TDEApplication app(false, false); + + TDEStartupInfo::appStarted(); + + KSimpleConfig config(TQDir::currentDirPath() + "/ulab_logicanalyzerserver.conf", false); + config.setGroup("Server"); + LogicAnalyzerServer logicanalyzersvr(0, config.readNumEntry("port", 4017), &config); + return app.exec(); + +} |
