27 #ifndef ORO_COMP_TCP_REPORTING_COMMAND_HPP 28 #define ORO_COMP_TCP_REPORTING_COMMAND_HPP 30 #include <rtt/os/Mutex.hpp> 48 std::vector<Command*> cmds;
49 RTT::os::MutexRecursive commands;
50 unsigned int parseParameters( std::string& ipt, std::string& cmd, std::string** params );
99 virtual bool is(std::string& cmd)
const;
107 virtual RealCommand* getRealCommand(
const std::vector<Command*>& cmds)
const = 0;
112 static Command* find(
const std::vector<Command*>& cmds,
const std::string& cmp);
117 bool operator==(
const std::string& cmp)
const;
118 bool operator!=(
const std::string& cmp)
const;
119 bool operator<(
const Command& cmp )
const;
124 const std::string& getName()
const;
138 virtual RealCommand* getRealCommand(
const std::vector<Command*>& cmds)
const;
148 unsigned int _minargs;
149 unsigned int _maxargs;
155 virtual void maincode(
int argc, std::string* args ) = 0;
161 bool sendError102()
const;
173 void toupper( std::string* args,
int index )
const;
180 void toupper( std::string* args,
int start,
int stop )
const;
186 inline Socket& socket()
const;
196 virtual bool correctSyntax(
unsigned int argc, std::string* args );
201 const char* getSyntax()
const;
206 virtual RealCommand* getRealCommand(
const std::vector<Command*>& cmds)
const;
211 void execute(
int argc, std::string* args );
This class manages the connection with one single client.
TcpReportingInterpreter(Datasender *parent)
After setup, the interpreter will only recognize the command 'VERSION 1.0' by default.
Reads a line from the client and interprete it.
Datasender * getConnection() const
Get the marshaller associated with the current connection.
const std::vector< Command * > & giveCommands() const
Return a reference to the command list.
Another name for a command.
The Orocos Component Library.
void removeCommand(const char *name)
Remove support for the given command name.
Real command which can be executed.
void setVersion10()
Accept all valid commands (except 'VERSION 1.0')
void addCommand(Command *command)
Add support for the given command.