脚本写入器 此接口提供生成脚本代码的支持。
更多...
#include <script_writer.h>
|
| | ScriptWriter (ScriptWriter &f) |
| | ScriptWriter (ScriptWriter &&f) |
| virtual | ~ScriptWriter () |
| void | setLabel (int lineno, const std::string &comment) |
| void | appendLine (const std::string &script_line) |
| | 使用自动缩进添加一行脚本代码。
|
| void | appendVectorDouble (const std::vector< double > &value) |
| void | appendRaw (const std::string &script) |
| | 按原样追加脚本代码,不使用自动缩进。
|
| std::string | generateScript () |
| | 生成包含完整脚本代码的字符串。
|
| void | writeChildren () |
| | 当为具有子节点的节点生成脚本代码时使用此方法。让子节点生成代码。
|
| void | assign (VariablePtr variable, const std::string &expression, bool sync=false) |
| void | assign (const std::string &variableName, const ExpressionPtr &expression, bool sync=false) |
| void | assign (VariablePtr variable, const ExpressionPtr &expression, bool sync=false) |
| void | incrementVariable (const std::string &variable_name) |
| | 变量值加1。
|
| void | note (const std::string &expression) |
| | 添加注释。
|
| void | sleep (double seconds) |
| | 休眠指定秒数。
|
| void | sync () |
| | 用完当前帧剩余时间。
|
| void | defineFunction (const std::string &func_name) |
| | 定义函数。
|
| void | anonyFunction (const std::string &func_name) |
| void | setRobotIndex (int robot_index) |
| void | returnMethod () |
| | 返回。
|
| void | end () |
| | 插入end。
|
| void | lineFeed () |
| | 插入空行。
|
| void | setPayload (double mass, double x, double y, double z) |
| | 设置负载质量和重心。
|
| void | setTcp (const std::vector< double > &pose) |
| | 设置TCP。
|
| void | ifCondition (const ExpressionPtr &expression) |
| | 开始if条件。
|
| void | ifNotCondition (const ExpressionPtr &expression) |
| | 开始取反的if条件。
|
| void | elseIfCondition (const ExpressionPtr &expression) |
| | 添加else-if分支。
|
| void | elseCondition () |
| | 添加else分支。
|
| void | forCondition (int count, int step) |
| | 开始for循环。
|
| void | whileTrue () |
| | 开始while true循环。
|
| void | whileCondition (const ExpressionPtr &expression) |
| | 开始while循环。
|
| void | whileNot (const ExpressionPtr &expression) |
| | 开始取反的while循环。
|
| void | defineThread (const std::string &thread_name, bool loop_or_not) |
| | 定义线程。
|
| void | runThread (const std::string &thread_name) |
| | 启动线程。
|
| void | killThread (const std::string &thread_name) |
| | 终止线程。
|
| std::string | getResolvedVariable (const std::string &variable_name) |
| | 获取可在脚本中使用的已注册变量名。
|
| void | increaseIndent () |
| void | decreaseIndent () |
脚本写入器 此接口提供生成脚本代码的支持。
在文件 script_writer.h 第 23 行定义.
◆ ScriptWriter() [1/3]
| arcs::aubo_scope::ScriptWriter::ScriptWriter |
( |
ScriptWriter & | f | ) |
|
◆ ScriptWriter() [2/3]
| arcs::aubo_scope::ScriptWriter::ScriptWriter |
( |
ScriptWriter && | f | ) |
|
◆ ~ScriptWriter()
| virtual arcs::aubo_scope::ScriptWriter::~ScriptWriter |
( |
| ) |
|
|
virtual |
◆ ScriptWriter() [3/3]
| arcs::aubo_scope::ScriptWriter::ScriptWriter |
( |
| ) |
|
|
private |
◆ anonyFunction()
| void arcs::aubo_scope::ScriptWriter::anonyFunction |
( |
const std::string & | func_name | ) |
|
◆ appendLine()
| void arcs::aubo_scope::ScriptWriter::appendLine |
( |
const std::string & | script_line | ) |
|
◆ appendRaw()
| void arcs::aubo_scope::ScriptWriter::appendRaw |
( |
const std::string & | script | ) |
|
◆ appendVectorDouble()
| void arcs::aubo_scope::ScriptWriter::appendVectorDouble |
( |
const std::vector< double > & | value | ) |
|
◆ assign() [1/3]
| void arcs::aubo_scope::ScriptWriter::assign |
( |
const std::string & | variableName, |
|
|
const ExpressionPtr & | expression, |
|
|
bool | sync = false ) |
变量赋值。在无local或global限定符的情况下赋值。
- 参数
-
| variableName | 变量名称。 |
| expression | 赋给变量的表达式。 |
引用了 sync().
◆ assign() [2/3]
| void arcs::aubo_scope::ScriptWriter::assign |
( |
VariablePtr | variable, |
|
|
const ExpressionPtr & | expression, |
|
|
bool | sync = false ) |
变量赋值。
- 参数
-
| variable | 变量。 |
| expression | 表达式。 |
引用了 sync().
◆ assign() [3/3]
| void arcs::aubo_scope::ScriptWriter::assign |
( |
VariablePtr | variable, |
|
|
const std::string & | expression, |
|
|
bool | sync = false ) |
◆ decreaseIndent()
| void arcs::aubo_scope::ScriptWriter::decreaseIndent |
( |
| ) |
|
◆ defineFunction()
| void arcs::aubo_scope::ScriptWriter::defineFunction |
( |
const std::string & | func_name | ) |
|
◆ defineThread()
| void arcs::aubo_scope::ScriptWriter::defineThread |
( |
const std::string & | thread_name, |
|
|
bool | loop_or_not ) |
◆ elseCondition()
| void arcs::aubo_scope::ScriptWriter::elseCondition |
( |
| ) |
|
◆ elseIfCondition()
| void arcs::aubo_scope::ScriptWriter::elseIfCondition |
( |
const ExpressionPtr & | expression | ) |
|
◆ end()
| void arcs::aubo_scope::ScriptWriter::end |
( |
| ) |
|
◆ forCondition()
| void arcs::aubo_scope::ScriptWriter::forCondition |
( |
int | count, |
|
|
int | step ) |
◆ generateScript()
| std::string arcs::aubo_scope::ScriptWriter::generateScript |
( |
| ) |
|
生成包含完整脚本代码的字符串。
- 返回
- 生成的脚本字符串。
◆ getResolvedVariable()
| std::string arcs::aubo_scope::ScriptWriter::getResolvedVariable |
( |
const std::string & | variable_name | ) |
|
获取可在脚本中使用的已注册变量名。
- 参数
-
- 返回
- 可在脚本中使用的变量名。
◆ ifCondition()
| void arcs::aubo_scope::ScriptWriter::ifCondition |
( |
const ExpressionPtr & | expression | ) |
|
◆ ifNotCondition()
| void arcs::aubo_scope::ScriptWriter::ifNotCondition |
( |
const ExpressionPtr & | expression | ) |
|
◆ increaseIndent()
| void arcs::aubo_scope::ScriptWriter::increaseIndent |
( |
| ) |
|
◆ incrementVariable()
| void arcs::aubo_scope::ScriptWriter::incrementVariable |
( |
const std::string & | variable_name | ) |
|
◆ killThread()
| void arcs::aubo_scope::ScriptWriter::killThread |
( |
const std::string & | thread_name | ) |
|
◆ lineFeed()
| void arcs::aubo_scope::ScriptWriter::lineFeed |
( |
| ) |
|
◆ note()
| void arcs::aubo_scope::ScriptWriter::note |
( |
const std::string & | expression | ) |
|
◆ returnMethod()
| void arcs::aubo_scope::ScriptWriter::returnMethod |
( |
| ) |
|
◆ runThread()
| void arcs::aubo_scope::ScriptWriter::runThread |
( |
const std::string & | thread_name | ) |
|
◆ setLabel()
| void arcs::aubo_scope::ScriptWriter::setLabel |
( |
int | lineno, |
|
|
const std::string & | comment ) |
◆ setPayload()
| void arcs::aubo_scope::ScriptWriter::setPayload |
( |
double | mass, |
|
|
double | x, |
|
|
double | y, |
|
|
double | z ) |
◆ setRobotIndex()
| void arcs::aubo_scope::ScriptWriter::setRobotIndex |
( |
int | robot_index | ) |
|
◆ setTcp()
| void arcs::aubo_scope::ScriptWriter::setTcp |
( |
const std::vector< double > & | pose | ) |
|
◆ sleep()
| void arcs::aubo_scope::ScriptWriter::sleep |
( |
double | seconds | ) |
|
◆ sync()
| void arcs::aubo_scope::ScriptWriter::sync |
( |
| ) |
|
◆ whileCondition()
| void arcs::aubo_scope::ScriptWriter::whileCondition |
( |
const ExpressionPtr & | expression | ) |
|
◆ whileNot()
| void arcs::aubo_scope::ScriptWriter::whileNot |
( |
const ExpressionPtr & | expression | ) |
|
◆ whileTrue()
| void arcs::aubo_scope::ScriptWriter::whileTrue |
( |
| ) |
|
◆ writeChildren()
| void arcs::aubo_scope::ScriptWriter::writeChildren |
( |
| ) |
|
当为具有子节点的节点生成脚本代码时使用此方法。让子节点生成代码。
◆ DataSwitch
◆ d_
| void* arcs::aubo_scope::ScriptWriter::d_ { nullptr } |
|
private |
该类的文档由以下文件生成: