10 #include <server/include/basePipeServer/ConnectionHandler.hpp> 15 using namespace armnn;
16 using namespace gatordmock;
19 static volatile bool run =
true;
27 std::string commandFile,
44 commandLineParser.
ParseFile(commandFile, mockService);
52 int main(
int argc,
char* argv[])
64 std::vector<std::thread> threads;
68 arm::pipe::ConnectionHandler connectionHandler(cmdLine.
GetUdsNamespace(),
true);
72 auto basePipeServer = connectionHandler.GetNewBasePipeServer(cmdLine.
IsEchoEnabled());
74 if (basePipeServer !=
nullptr)
80 std::this_thread::sleep_for(std::chrono::milliseconds(100u));
83 std::for_each(threads.begin(), threads.end(), [](std::thread& t){t.join();});
bool ProcessCommandLine(int argc, char *argv[])
int main(int argc, char *argv[])
void exit_capture(int signum)
bool CreateMockService(std::unique_ptr< arm::pipe::BasePipeServer > basePipeServer, std::string commandFile, bool isEchoEnabled)
void ParseFile(std::string CommandFile, GatordMockService &mockService)
Copyright (c) 2021 ARM Limited and Contributors.
void IgnoreUnused(Ts &&...)
std::string GetCommandFile()
bool WaitForStreamMetaData()
Once the connection is open wait to receive the stream meta data packet from the client.
std::string GetUdsNamespace()
bool LaunchReceivingThread()
Start the thread that will receive all packets and print them nicely to stdout.
Use Boost program options to process the command line.
A class that implements a Mock Gatord server.
This class parses a command file for the GatordMockService.
void WaitForReceivingThread()
This is a placeholder method to prevent main exiting.
void SendConnectionAck()
Send a connection acknowledged packet back to the client.