1#ifndef AUBO_SCOPE_SCRIPT_WRITER_H
2#define AUBO_SCOPE_SCRIPT_WRITER_H
23 void setLabel(
int lineno,
const std::string &comment);
70 void assign(VariablePtr variable,
const std::string &expression,
80 void assign(
const std::string &variableName,
81 const ExpressionPtr &expression,
bool sync =
false);
88 void assign(VariablePtr variable,
const ExpressionPtr &expression,
103 void note(
const std::string &expression);
172 void setTcp(
const std::vector<double> &pose);
#define ARCS_CLASS_FORWARD(C)
Macro that forward declares a class and defines the respective smartpointers through ARCS_DECLARE_PTR...
This interface provides support for generating Script code.
void setLabel(int lineno, const std::string &comment)
ScriptWriter(ScriptWriter &&f)
std::string generateScript()
Generate a string with the full script code.
ScriptWriter(ScriptWriter &f)
void anonyFunction(const std::string &func_name)
void sync()
Uses up the remaining "physical" time a thread has in the current frame.
void whileTrue()
Starts a while true loop.
void sleep(double seconds)
Sleep for a number of seconds.
void killThread(const std::string &thread_name)
killThread
void appendLine(const std::string &script_line)
Adds a single line of script code using auto-indentation.
void ifNotCondition(const ExpressionPtr &expression)
Start a negated if-conditional
void assign(VariablePtr variable, const ExpressionPtr &expression, bool sync=false)
void incrementVariable(const std::string &variable_name)
Add 1 to the variable value.
void defineFunction(const std::string &func_name)
void setPayload(double mass, double x, double y, double z)
void forCondition(int count, int step)
Starts a for-loop with tow loop invariants.
void note(const std::string &expression)
Add a note.
void assign(const std::string &variableName, const ExpressionPtr &expression, bool sync=false)
void runThread(const std::string &thread_name)
Start a previously defined thread.
void elseCondition()
Adds an else branch.
void whileCondition(const ExpressionPtr &expression)
Starts a while-loop with a loop invariant.
void appendRaw(const std::string &script)
Adds script code appending the script code as is without using auto-indentation.
void setTcp(const std::vector< double > &pose)
void appendVectorDouble(const std::vector< double > &value)
void assign(VariablePtr variable, const std::string &expression, bool sync=false)
void elseIfCondition(const ExpressionPtr &expression)
Adds an else-if branch.
void lineFeed()
Insert an empty line.
void returnMethod()
Return from method.
std::string getResolvedVariable(const std::string &variable_name)
void ifCondition(const ExpressionPtr &expression)
Start an if-conditional.
void defineThread(const std::string &thread_name, bool loop_or_not)
Start a thread definition with a given thread name.
void setRobotIndex(int robot_index)
void whileNot(const ExpressionPtr &expression)
Starts a while-loop with a negated loop invariant.