From a21620d32a8a0a8d527c061e2a22d51009d75877 Mon Sep 17 00:00:00 2001 From: Colm Donelan Date: Fri, 11 Oct 2019 13:09:49 +0100 Subject: IVGCVSW-3721 Add support for startup sequence (Mock Gatord service). * Receive and process the stream metadata from the client. * Send the connection ack packet. * Wait in a receiving thread and print the packets. * GatordMockTest and Impl for PeriodicCounterCapture CommandHandler * CaptureData class to retain packet data * MockUtils * Update SocketProfilingConnection to fix non blocking receipt of packets. * Restructure directory layout following review comments. * Extract the mock service into a static library in the cmake files. Signed-off-by: Colm Donelan Signed-off-by: Keith Davis Signed-off-by: Mike Kelly Signed-off-by: Finn Williams Signed-off-by: Kevin May Change-Id: I33c1c9f93976708c9315f71290d42cff53b8c075 --- .../profiling/gatordmock/CommandLineProcessor.hpp | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 tests/profiling/gatordmock/CommandLineProcessor.hpp (limited to 'tests/profiling/gatordmock/CommandLineProcessor.hpp') diff --git a/tests/profiling/gatordmock/CommandLineProcessor.hpp b/tests/profiling/gatordmock/CommandLineProcessor.hpp new file mode 100644 index 0000000000..0eed23ace8 --- /dev/null +++ b/tests/profiling/gatordmock/CommandLineProcessor.hpp @@ -0,0 +1,39 @@ +// +// Copyright © 2019 Arm Ltd. All rights reserved. +// SPDX-License-Identifier: MIT +// +#pragma once + +#include + +namespace armnn +{ + +namespace gatordmock +{ + + +/// Use Boost program options to process the command line. +/// -h or --help to print the options. +/// -n or --namespace to specify the UDS namespace that the server will be listening on. +/// -e or --echo print all sent and received packets to stdout. +/// -f or --file The path to the file that contains instructions for the mock gatord. +class CommandLineProcessor +{ +public: + bool ProcessCommandLine(int argc, char *argv[]); + bool IsEchoEnabled() { return m_Echo; } + + std::string GetUdsNamespace() { return m_UdsNamespace; } + std::string GetCommandFile() { return m_File; } + +private: + std::string m_UdsNamespace; + std::string m_File; + + bool m_Echo; +}; + +} // namespace gatordmock + +} // namespace armnn -- cgit v1.2.1