|
AuboStudio SDK
0.6.3
|
|
|
|
|
\chinese 脚本写入器 此接口提供生成脚本代码的支持。 \endchinese \english ScriptWriter This interface provides support for generating Script code. 更多...
#include <script_writer.h>
Public 成员函数 | |
| ScriptWriter (ScriptWriter &f) | |
| ScriptWriter (ScriptWriter &&f) | |
| virtual | ~ScriptWriter () |
| void | setLabel (int lineno, const std::string &comment) |
| void | appendLine (const std::string &script_line) |
| \chinese 使用自动缩进添加一行脚本代码。 | |
| void | appendVectorDouble (const std::vector< double > &value) |
| void | appendRaw (const std::string &script) |
| \chinese 按原样追加脚本代码,不使用自动缩进。 | |
| std::string | generateScript () |
| \chinese 生成包含完整脚本代码的字符串。 | |
| void | writeChildren () |
| \chinese 当为具有子节点的节点生成脚本代码时使用此方法。让子节点生成代码。 \endchinese \english Use this method when generating script code for a node that has children nodes. | |
| void | assign (VariablePtr variable, const std::string &expression, bool sync=false) |
| void | assign (const std::string &variableName, const ExpressionPtr &expression, bool sync=false) |
| \chinese | |
| void | assign (VariablePtr variable, const ExpressionPtr &expression, bool sync=false) |
| \chinese | |
| void | incrementVariable (const std::string &variable_name) |
| \chinese 变量值加1。 | |
| void | note (const std::string &expression) |
| \chinese 添加注释。 \endchinese \english Add a note. | |
| void | sleep (double seconds) |
| \chinese 休眠指定秒数。 \endchinese \english Sleep for a number of seconds. | |
| void | sync () |
| \chinese 用完当前帧剩余时间。 \endchinese \english Sync. | |
| void | defineFunction (const std::string &func_name) |
| \chinese 定义函数。 \endchinese \english Define a function. | |
| void | anonyFunction (const std::string &func_name) |
| void | setRobotIndex (int robot_index) |
| void | returnMethod () |
| \chinese 返回。 \endchinese \english Return from method. | |
| void | end () |
| \chinese 插入end。 \endchinese \english Insert an end. | |
| void | lineFeed () |
| \chinese 插入空行。 \endchinese \english Insert an empty line. | |
| void | setPayload (double mass, double x, double y, double z) |
| \chinese 设置负载质量和重心。 \endchinese \english Sets the mass and Center of Gravity of the payload. | |
| void | setTcp (const std::vector< double > &pose) |
| \chinese 设置TCP。 \endchinese \english Set the Tool Center Point. | |
| void | ifCondition (const ExpressionPtr &expression) |
| \chinese 开始if条件。 \endchinese \english Start an if-conditional. | |
| void | ifNotCondition (const ExpressionPtr &expression) |
| \chinese 开始取反的if条件。 \endchinese \english Start a negated if-conditional. | |
| void | elseIfCondition (const ExpressionPtr &expression) |
| \chinese 添加else-if分支。 \endchinese \english Adds an else-if branch. | |
| void | elseCondition () |
| \chinese 添加else分支。 \endchinese \english Adds an else branch. | |
| void | forCondition (int count, int step) |
| \chinese 开始for循环。 \endchinese \english Starts a for-loop. | |
| void | whileTrue () |
| \chinese 开始while true循环。 \endchinese \english Starts a while true loop. | |
| void | whileCondition (const ExpressionPtr &expression) |
| \chinese 开始while循环。 \endchinese \english Starts a while-loop. | |
| void | whileNot (const ExpressionPtr &expression) |
| \chinese 开始取反的while循环。 \endchinese \english Starts a negated while-loop. | |
| void | defineThread (const std::string &thread_name, bool loop_or_not) |
| \chinese 定义线程。 \endchinese \english Start a thread definition. | |
| void | runThread (const std::string &thread_name) |
| \chinese 启动线程。 \endchinese \english Start a thread. | |
| void | killThread (const std::string &thread_name) |
| \chinese 终止线程。 \endchinese \english Kill a thread. | |
| std::string | getResolvedVariable (const std::string &variable_name) |
| \chinese 获取可在脚本中使用的已注册变量名。 | |
| void | increaseIndent () |
| void | decreaseIndent () |
Private 成员函数 | |
| ScriptWriter () | |
Private 属性 | |
| void * | d_ { nullptr } |
友元 | |
| class | DataSwitch |
\chinese 脚本写入器 此接口提供生成脚本代码的支持。 \endchinese \english ScriptWriter This interface provides support for generating Script code.
\endenglish
在文件 script_writer.h 第 23 行定义.
| arcs::aubo_scope::ScriptWriter::ScriptWriter | ( | ScriptWriter & | f | ) |
| arcs::aubo_scope::ScriptWriter::ScriptWriter | ( | ScriptWriter && | f | ) |
|
virtual |
|
private |
| void arcs::aubo_scope::ScriptWriter::anonyFunction | ( | const std::string & | func_name | ) |
| void arcs::aubo_scope::ScriptWriter::appendLine | ( | const std::string & | script_line | ) |
\chinese 使用自动缩进添加一行脚本代码。
| script_line | 要追加的脚本代码行。 \endchinese \english Adds a single line of script code using auto-indentation. |
| script_line | single line of script code to append. \endenglish |
| void arcs::aubo_scope::ScriptWriter::appendRaw | ( | const std::string & | script | ) |
\chinese 按原样追加脚本代码,不使用自动缩进。
| script | 要追加的脚本代码。 \endchinese \english Adds script code appending the script code as is without using auto-indentation. |
| script | script code to append. \endenglish |
| void arcs::aubo_scope::ScriptWriter::appendVectorDouble | ( | const std::vector< double > & | value | ) |
| void arcs::aubo_scope::ScriptWriter::assign | ( | const std::string & | variableName, |
| const ExpressionPtr & | expression, | ||
| bool | sync = false ) |
\chinese
变量赋值。在无local或global限定符的情况下赋值。
| variableName | 变量名称。 |
| expression | 赋给变量的表达式。 \endchinese \english |
Variable assignment. Assigns the variable without a local or global qualifier.
| variableName | name of the variable, not null. |
| expression | expression that is assigned to the variable, not null. \endenglish |
引用了 sync().

| void arcs::aubo_scope::ScriptWriter::assign | ( | VariablePtr | variable, |
| const ExpressionPtr & | expression, | ||
| bool | sync = false ) |
| void arcs::aubo_scope::ScriptWriter::assign | ( | VariablePtr | variable, |
| const std::string & | expression, | ||
| bool | sync = false ) |
| void arcs::aubo_scope::ScriptWriter::decreaseIndent | ( | ) |
| void arcs::aubo_scope::ScriptWriter::defineFunction | ( | const std::string & | func_name | ) |
\chinese 定义函数。 \endchinese \english Define a function.
| func_name | function name. \endenglish |
| void arcs::aubo_scope::ScriptWriter::defineThread | ( | const std::string & | thread_name, |
| bool | loop_or_not ) |
\chinese 定义线程。 \endchinese \english Start a thread definition.
| thread_name | the thread name, |
| loop_or_not | whether loops. \endenglish |
| void arcs::aubo_scope::ScriptWriter::elseCondition | ( | ) |
\chinese 添加else分支。 \endchinese \english Adds an else branch.
\endenglish
| void arcs::aubo_scope::ScriptWriter::elseIfCondition | ( | const ExpressionPtr & | expression | ) |
\chinese 添加else-if分支。 \endchinese \english Adds an else-if branch.
| expression | the expression. \endenglish |
| void arcs::aubo_scope::ScriptWriter::end | ( | ) |
\chinese 插入end。 \endchinese \english Insert an end.
\endenglish
| void arcs::aubo_scope::ScriptWriter::forCondition | ( | int | count, |
| int | step ) |
\chinese 开始for循环。 \endchinese \english Starts a for-loop.
| count | loop count, |
| step | loop step. \endenglish |
| std::string arcs::aubo_scope::ScriptWriter::generateScript | ( | ) |
\chinese 生成包含完整脚本代码的字符串。
| std::string arcs::aubo_scope::ScriptWriter::getResolvedVariable | ( | const std::string & | variable_name | ) |
\chinese 获取可在脚本中使用的已注册变量名。
| variable_name | 变量名称。 |
| variable_name | a variable name. |
| void arcs::aubo_scope::ScriptWriter::ifCondition | ( | const ExpressionPtr & | expression | ) |
\chinese 开始if条件。 \endchinese \english Start an if-conditional.
| expression | the expression. \endenglish |
| void arcs::aubo_scope::ScriptWriter::ifNotCondition | ( | const ExpressionPtr & | expression | ) |
\chinese 开始取反的if条件。 \endchinese \english Start a negated if-conditional.
| expression | the expression. \endenglish |
| void arcs::aubo_scope::ScriptWriter::increaseIndent | ( | ) |
| void arcs::aubo_scope::ScriptWriter::incrementVariable | ( | const std::string & | variable_name | ) |
\chinese 变量值加1。
| variable_name | 要递增的变量名称。 \endchinese \english Add 1 to the variable value. |
| variable_name | the variable to increment. \endenglish |
| void arcs::aubo_scope::ScriptWriter::killThread | ( | const std::string & | thread_name | ) |
\chinese 终止线程。 \endchinese \english Kill a thread.
| thread_name | the thread name. \endenglish |
| void arcs::aubo_scope::ScriptWriter::lineFeed | ( | ) |
\chinese 插入空行。 \endchinese \english Insert an empty line.
\endenglish
| void arcs::aubo_scope::ScriptWriter::note | ( | const std::string & | expression | ) |
\chinese 添加注释。 \endchinese \english Add a note.
| expression | the note expression. \endenglish |
| void arcs::aubo_scope::ScriptWriter::returnMethod | ( | ) |
\chinese 返回。 \endchinese \english Return from method.
\endenglish
| void arcs::aubo_scope::ScriptWriter::runThread | ( | const std::string & | thread_name | ) |
\chinese 启动线程。 \endchinese \english Start a thread.
| thread_name | the thread name. \endenglish |
| void arcs::aubo_scope::ScriptWriter::setLabel | ( | int | lineno, |
| const std::string & | comment ) |
| void arcs::aubo_scope::ScriptWriter::setPayload | ( | double | mass, |
| double | x, | ||
| double | y, | ||
| double | z ) |
\chinese 设置负载质量和重心。 \endchinese \english Sets the mass and Center of Gravity of the payload.
\endenglish
| void arcs::aubo_scope::ScriptWriter::setRobotIndex | ( | int | robot_index | ) |
| void arcs::aubo_scope::ScriptWriter::setTcp | ( | const std::vector< double > & | pose | ) |
\chinese 设置TCP。 \endchinese \english Set the Tool Center Point.
\endenglish
| void arcs::aubo_scope::ScriptWriter::sleep | ( | double | seconds | ) |
\chinese 休眠指定秒数。 \endchinese \english Sleep for a number of seconds.
| seconds | amount of time to sleep in seconds. \endenglish |
| void arcs::aubo_scope::ScriptWriter::sync | ( | ) |
| void arcs::aubo_scope::ScriptWriter::whileCondition | ( | const ExpressionPtr & | expression | ) |
\chinese 开始while循环。 \endchinese \english Starts a while-loop.
| expression | the loop invariant. \endenglish |
| void arcs::aubo_scope::ScriptWriter::whileNot | ( | const ExpressionPtr & | expression | ) |
\chinese 开始取反的while循环。 \endchinese \english Starts a negated while-loop.
| expression | the loop invariant. \endenglish |
| void arcs::aubo_scope::ScriptWriter::whileTrue | ( | ) |
\chinese 开始while true循环。 \endchinese \english Starts a while true loop.
\endenglish
| void arcs::aubo_scope::ScriptWriter::writeChildren | ( | ) |
\chinese 当为具有子节点的节点生成脚本代码时使用此方法。让子节点生成代码。 \endchinese \english Use this method when generating script code for a node that has children nodes.
Let children nodes generate code. \endenglish
|
friend |
|
private |
在文件 script_writer.h 第 225 行定义.