|
NIST Biometric Evaluation Framework
Software components for biometric technology evaluations
|
Abstraction to parse messages received via CommandCenter. More...
#include <be_process_commandcenter.h>
Inherits BiometricEvaluation::Process::CommandCenter< T, typename >.
Public Member Functions | |
| virtual void | parse (const typename CommandCenter< T >::Command &command)=0 |
| Parse command. More... | |
| bool | getNextCommand (typename CommandCenter< T >::Command &command, int numSeconds=-1) |
| Get the next command. More... | |
| void | setUsage (const std::string &usage) |
| String sent when an invalid command is received. More... | |
| std::string | getUsage () const |
| CommandParser (uint16_t port=MessageCenter::DEFAULT_PORT) | |
| Constructor. More... | |
| virtual | ~CommandParser ()=default |
| Virtual destructor (default). More... | |
Public Member Functions inherited from BiometricEvaluation::Process::CommandCenter< T, typename > | |
| CommandCenter (uint16_t port=MessageCenter::DEFAULT_PORT) | |
| Constructor. More... | |
| ~CommandCenter ()=default | |
| Destructor (default). More... | |
| bool | hasPendingCommands () |
| Determine if there are commands waiting. More... | |
| bool | getNextCommand (Command &command, int numSeconds=-1, std::string invalidCommandResponse="") |
| Get the next command. More... | |
| void | sendResponse (uint32_t clientID, const std::string &response, const std::string prefix=">> ", const std::string suffix="\n") |
| Send a string response to a client. More... | |
| void | disconnectClient (uint32_t clientID) |
| Break the connection with a client. More... | |
Abstraction to parse messages received via CommandCenter.
Definition at line 207 of file be_process_commandcenter.h.
|
inline |
Constructor.
| port | Port to listen on for commands. |
Definition at line 277 of file be_process_commandcenter.h.
|
virtualdefault |
Virtual destructor (default).
|
pure virtual |
Parse command.
Implement this method as a switch statement of your command enumeration.
|
inline |
Get the next command.
| command | Reference to a Command that will be populated when this method returns true. |
| numSeconds | Number of seconds to wait for a command, or -1 to block indefinitely. |
Definition at line 237 of file be_process_commandcenter.h.
|
inline |
String sent when an invalid command is received.
| usage | String to send when an invalid command is received. |
Definition at line 256 of file be_process_commandcenter.h.
|
inline |
Definition at line 264 of file be_process_commandcenter.h.