Instrument Control Lib
Framework to control Oscilloscopes, SMUs, Function Generators and DC Powersupplies via Ethernet.
CommandLineInterfaceDefines.h
Go to the documentation of this file.
1 
5 #pragma once
6 
7 #include <string> // std::string
8 
10 #define STARTUP_TEXT "Instrument control lib command line..." << std::endl << "Type 'help' to get a list of available commands" << std::endl;
12 #define PROMPT_SYMBOL "$ "
14 #define RESPONSE_INVALID_COMMAND " Command not found. Type 'help' to get list of available commands." << std::endl;
16 #define MESSAGE_EXIT_CLI "Exit command line interface";
18 #define HELP_MESSAGE_INDENTATION 10
19 
20 #ifdef __WIN32__
21 #define TIMEOUT_IN_MS 0 // TODO timeout not supported yet on windows
22 #else
23 #define TIMEOUT_IN_MS 2000
24 #endif
25 
27 {
50 };
51 
53 {
55  const char *command;
56  const char *description;
57 
58  void (*func)(std::string &);
59 } typedef CLICommandStruct;
CLI_Commands
Definition: CommandLineInterfaceDefines.h:27
@ CUSTOM_COMMAND1
Definition: CommandLineInterfaceDefines.h:49
@ CLI_CONNECT
Definition: CommandLineInterfaceDefines.h:31
@ CLI_COMMAND_NOT_FOUND
Definition: CommandLineInterfaceDefines.h:47
@ CLI_GET_DEVICE_IDENTITY
Definition: CommandLineInterfaceDefines.h:43
@ CLI_SEND_CUSTOM_COMMAND
Definition: CommandLineInterfaceDefines.h:41
@ CLI_SUPPORTED_DEVICES
Definition: CommandLineInterfaceDefines.h:35
@ CLI_SELECT_DEVICE
Definition: CommandLineInterfaceDefines.h:39
@ CLI_HELP
Definition: CommandLineInterfaceDefines.h:29
@ CLI_QUIT
Definition: CommandLineInterfaceDefines.h:45
@ CLI_DISCONNECT
Definition: CommandLineInterfaceDefines.h:33
@ CLI_ACTIVE_DEVICES
Definition: CommandLineInterfaceDefines.h:37
Definition: CommandLineInterfaceDefines.h:53
CLI_Commands identifier
Definition: CommandLineInterfaceDefines.h:54
const char * command
Definition: CommandLineInterfaceDefines.h:55
const char * description
Definition: CommandLineInterfaceDefines.h:56
void(* func)(std::string &)
Definition: CommandLineInterfaceDefines.h:58