1 // 2 // Copyright © 2019 Arm Ltd and Contributors. All rights reserved. 3 // SPDX-License-Identifier: MIT 4 // 5 #pragma once 6 7 #include <string> 8 9 namespace armnn 10 { 11 12 namespace gatordmock 13 { 14 15 /// 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. 20 class CommandLineProcessor 21 { 22 public: 23 bool ProcessCommandLine(int argc, char* argv[]); IsEchoEnabled()24 bool IsEchoEnabled() 25 { 26 return m_Echo; 27 } 28 GetUdsNamespace()29 std::string GetUdsNamespace() 30 { 31 return m_UdsNamespace; 32 } GetCommandFile()33 std::string GetCommandFile() 34 { 35 return m_File; 36 } 37 38 private: 39 std::string m_UdsNamespace; 40 std::string m_File; 41 42 bool m_Echo; 43 }; 44 45 } // namespace gatordmock 46 47 } // namespace armnn 48