NIST Biometric Evaluation Framework
Software components for biometric technology evaluations
|
Receive enumerations as commands over the network. More...
#include <be_process_commandcenter.h>
Inherited by BiometricEvaluation::Process::CommandParser< T >.
Classes | |
class | Command |
Parsed command received from the network. More... | |
Public Member Functions | |
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... | |
Receive enumerations as commands over the network.
Definition at line 31 of file be_process_commandcenter.h.
|
inline |
Constructor.
port | Port to listen on for commands. |
Definition at line 56 of file be_process_commandcenter.h.
|
default |
Destructor (default).
|
inline |
Determine if there are commands waiting.
Definition at line 80 of file be_process_commandcenter.h.
|
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. |
invalidCommandResponse | Optional string to send, such as usage, that will be sent when an unrecognized command is received. |
Definition at line 104 of file be_process_commandcenter.h.
|
inline |
Send a string response to a client.
clientID | ID of client to communicate with. |
response | Printable string to send to client. |
prefix | String to prefix to responses. |
suffix | String to append to responses. |
Definition at line 172 of file be_process_commandcenter.h.
|
inline |
Break the connection with a client.
clientID | ID of the client to disconect. |
Definition at line 193 of file be_process_commandcenter.h.