blob: 9a55463ab059cf242b077fbb46768bc07cdb7a87 (
plain)
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
|
/**
* @file main.cpp
* @brief Mock XPL2 server on three protocol ports.
*/
#include "MockServer.h"
#include <QCommandLineParser>
#include <QCoreApplication>
int
main (int argc, char *argv[])
{
qSetMessagePattern ("MockServer [%{time HH:mm:ss.zzz}] %{message}");
QCoreApplication app (argc, argv);
QCommandLineParser parser;
parser.addOption ({ "wire-debug", "Log raw wire TX/RX to dev log" });
parser.addOption ({ "host", "Target host to connect to (default 127.0.0.1)",
"address", "127.0.0.1" });
parser.addHelpOption ();
parser.process (app);
if (parser.isSet ("wire-debug"))
MockServer::enableWireDebug ();
new MockServer (parser.value ("host"), &app);
return app.exec ();
}
|