📄 operations.idl
字号:
#ifndef ORO_OPERATIONS_IDL#define ORO_OPERATIONS_IDLmodule RTT{ module Corba { typedef sequence<any> AnyArguments; exception WrongNumbArgException { long wanted; long received; }; exception WrongTypeArgException { long whicharg; string expected; string received; }; /** * An expression is an object which returns a value. * @ingroup CompIDL */ interface Expression { /** * Retrieve the latest result of * evaluate(), without retriggering * evaluation. */ any value(); /** * Evaluate this expression. * @return true if the evaluation was succesful. * If the expression evaluates to a boolean, it * returns this boolean. */ boolean evaluate(); /** * Evaluate and return the result of the expression. */ any get(); /** * Return the type of the expression in a human readable * format. */ string getType(); /** * Return the type name of the expression as it is known * to the Orocos Type System. */ string getTypeName(); /** * Return the result of value() as a text string. */ string toString(); /** * Call this method to free this object. */ void destroyExpression(); }; /** * An expression of which the result can be set to * a value. An simple example is an expression consisting of * only a variable. * @ingroup CompIDL */ interface AssignableExpression : Expression { /** * Evaluate the expression and set the result * (which should be a reference type) to * a value. * @return false if \a value is of the wrong type. */ boolean set(in any value); /** * Set the value of the expression from \a value. * @return false if \a value is of the wrong type. */ boolean fromString(in string value); }; /** * An Action is an object which executes a function. */ interface Action { /** * Execute this action. * @return true if the action was succesful. * If the action evaluates to a boolean, it * returns this boolean. */ boolean execute(); /** * Send and execute the action with new arguments. */ boolean executeAny(in AnyArguments args) raises (WrongNumbArgException, WrongTypeArgException); /** * Reset this action. * Required for Actions used within a command, * It must be reset before execute is invoked. */ void reset(); /** * Call this method to free this object. */ void destroyAction(); }; /** * A method is both an Expression and an Action. * @ingroup CompIDL */ interface Method : Expression, Action { }; /** * A command consists of an action to be * executed remotely and a condition, to be * evaluated remotely. * @ingroup CompIDL */ interface Command { /** * Send and execute the contained command. The * arguments used are the last arguments provided * or the one given upon command creation. */ boolean execute(); /** * Send and execute the command with new arguments. */ boolean executeAny(in AnyArguments args) raises (WrongNumbArgException, WrongTypeArgException); /** * Check if the Command was sent to the receiving task, * thus if execute() was called. * @retval true if sent to the command processor. * @retval false otherwise. */ boolean sent(); /** * Check if the Command was accepted by the receiving task. * @retval true if accepted by the command processor. * @retval false otherwise. */ boolean accepted(); /** * Check if the Command was executed by the receiving task. * @retval true if executed by the command processor. * @retval false otherwise. */ boolean executed(); /** * Check the return value of the Command when it is * executed. * @retval true if accepted() and the command returned true, * indicating that it is valid. * @retval false otherwise. */ boolean valid(); /** * Evaluate if the command is done. * @retval true if accepted(), valid() was true and the * completion condition was true as well. * @retval false otherwise. */ boolean done(); /** * Reset the command. * Required before invoking execute() a second time. */ void reset(); /** * Call this method to free this object. */ void destroyCommand(); }; };};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -