blob: 1724470dbb366d1a134f9222043567ed5060b701 [file] [log] [blame]
Colm Donelana21620d2019-10-11 13:09:49 +01001//
Jim Flynnbbfe6032020-07-20 16:57:44 +01002// Copyright © 2019 Arm Ltd and Contributors. All rights reserved.
Colm Donelana21620d2019-10-11 13:09:49 +01003// SPDX-License-Identifier: MIT
4//
5#pragma once
6
7#include <string>
8
9namespace armnn
10{
11
12namespace gatordmock
13{
14
Colm Donelana21620d2019-10-11 13:09:49 +010015/// Use Boost program options to process the command line.
16/// -h or --help to print the options.
17/// -n or --namespace to specify the UDS namespace that the server will be listening on.
18/// -e or --echo print all sent and received packets to stdout.
19/// -f or --file The path to the file that contains instructions for the mock gatord.
20class CommandLineProcessor
21{
22public:
Colm Donelanb682d842019-10-16 12:24:20 +010023 bool ProcessCommandLine(int argc, char* argv[]);
24 bool IsEchoEnabled()
25 {
26 return m_Echo;
27 }
Colm Donelana21620d2019-10-11 13:09:49 +010028
Colm Donelanb682d842019-10-16 12:24:20 +010029 std::string GetUdsNamespace()
30 {
31 return m_UdsNamespace;
32 }
33 std::string GetCommandFile()
34 {
35 return m_File;
36 }
Colm Donelana21620d2019-10-11 13:09:49 +010037
38private:
39 std::string m_UdsNamespace;
40 std::string m_File;
41
42 bool m_Echo;
43};
44
Colm Donelanb682d842019-10-16 12:24:20 +010045} // namespace gatordmock
Colm Donelana21620d2019-10-11 13:09:49 +010046
Colm Donelanb682d842019-10-16 12:24:20 +010047} // namespace armnn