API Reference
This page lists the client plugin APIs available for secondary development, organized by header under the SDK include/ directory.
plugincommon.h
| Header: | #include "plugincommon.h" |
Macros
XPLUGIN_REGISTER(KEY, CLASS_NAME)
XPLUGIN_REGISTER registers a user plugin class with the Rokae+ client so that the client can create an instance after the dynamic library is loaded.
KEY is the plugin identifier, typically the string macro PLUGIN_NAME defined in the Qt project file (.pro).
CLASS_NAME is the plugin class name. It must derive from PluginBase.
- The macro takes effect when the dynamic library is loaded. It registers CLASS_NAME with the process-wide plugin factory so the client can later create an instance of that plugin.
- KEY must match the plugin name used when packaging and deploying. See Creating the Plugin Package.
- CLASS_NAME must be defined in namespace
xplugin.
See also PluginBase.
Enum Types
enum xplugin::enLanguage
This enum type describes the UI language. UI translation is done with Qt .qm files. There is no exported language-registration API.
| Constant | Value | Description |
|---|---|---|
xplugin::English | 0 | English |
xplugin::Chinese | 1 | Chinese |
xplugin::OtherLanguage | 0xFF | Other language |
enum xplugin::enThrowLogLevel
This enum type describes the level of the bottom-right HMI popup shown by ThrowLog().
| Constant | Value | Description |
|---|---|---|
xplugin::Info | 0 | Information |
xplugin::Warning | 1 | Warning |
xplugin::Error | 2 | Error |
xplugin::NoneLogType | 0xFF | No level |
See also ThrowLog().
PluginBase Class
The PluginBase class is the abstract base class of all user plugins.
| Header: | #include "plugincommon.h" |
| Inherits: | QObject |
Public Functions
PluginBase(QObject *parent = nullptr) | |
virtual | ~PluginBase() |
virtual void | init() |
virtual void | afterInit() |
virtual void | render() |
virtual void | idle() |
virtual void | detach() |
void | setDefaultGlobalSheet(bool useful = true) |
bool | getDefaultGlobalSheet() const |
void | setPluginLabel(const QString &lbl) |
QString | getPluginLabel() const |
Detailed Description
The PluginBase class is the base class of all secondary-development plugins. The derived class must live in namespace xplugin. Copying is disabled (the copy constructor and copy-assignment operator are deleted).
The client calls overridable functions in this order: init(), afterInit(), render(), idle(), detach(). The default implementations are empty. See the corresponding member function documentation below for each stage.
Recommended patterns for UI mounting and for associating with other HMI modules (for example, registering auxiliary-programming commands) are shown in Examples.
Register the derived class with XPLUGIN_REGISTER(). See that macro for parameter meanings and constraints.
See also XPLUGIN_REGISTER(), setPluginLabel(), CreateCenterWidget(), and Examples.
Member Function Documentation
[virtual] void PluginBase::init()
Plugin initialization hook.
Complete this plugin’s own initialization here (create UI and data, and mount to the center area, status bar, side panel, physical buttons, and so on as needed). Place association with other HMI modules in afterInit(); do not assume other modules have finished initialization in this stage. The default implementation is empty.
See also afterInit() and CreateCenterWidget().
[virtual] void PluginBase::afterInit()
Called after init().
Handle association with other HMI modules here (for example, construct RLManager and register auxiliary-programming commands). The default implementation is empty.
See also init() and RL Auxiliary Programming.
[virtual] void PluginBase::render()
Called when startup enters the render stage. Perform UI or style-related work as needed. This function is invoked as the lifecycle advances; it is not a refresh API that runs repeatedly on data changes. The default implementation is empty.
[virtual] void PluginBase::idle()
Called at the last stage of startup, when the module has entered the runnable state. No mandatory business logic; implement as needed or leave empty. Not a periodic timer callback. The default implementation is empty.
[virtual] void PluginBase::detach()
Called when the plugin is unloaded. Reimplement this function to release resources owned by the plugin (for example, disconnect signals connected by the plugin, and destroy objects that require explicit cleanup). The default implementation is empty.
UI mounted to the HMI with functions such as CreateCenterWidget() and CreateStatusBar() is cleaned up by the framework when the plugin is destroyed; it generally need not be handled in this function.
void PluginBase::setDefaultGlobalSheet(bool useful = true)
Sets whether this plugin uses the HMI global style sheet. The client reads this flag in render(): when true, the client applies the global style. Set it before render(), typically in the constructor. Passing false means the plugin must load its own style.
See also getDefaultGlobalSheet().
bool PluginBase::getDefaultGlobalSheet() const
Returns whether this plugin uses the HMI global style sheet.
See also setDefaultGlobalSheet().
void PluginBase::setPluginLabel(const QString &lbl)
Sets the label shown in the Process package menu. The client reads this label before calling the plugin init(); set it in the constructor of the user plugin class derived from PluginBase. The label string may use tr() to support language-pack translation.
See also getPluginLabel() and CreateCenterWidget().
QString PluginBase::getPluginLabel() const
Returns the label shown in the Process package menu.
See also setPluginLabel().
Interface Management
| Header: | #include "interface/interfacemanager.h" |
PhysicalButton Struct
The PhysicalButton struct describes a physical button.
| Member | Type | Description |
|---|---|---|
text | QString | Button text |
touched_icon | QString | Icon path when pressed; may be empty |
untouched_icon | QString | Icon path when released; may be empty |
exec_function | std::function<void(bool is_pressed)> | Function called on press or release;true means pressed, false means released |
See also CreatePhyButtonList().
InterfaceManager Class
The InterfaceManager class provides data, status, and motion APIs beyond HMI mounting.
| Header: | #include "interface/interfacemanager.h" |
| Inherits: | QObject |
Public Functions
Signals
[signal] void | sigNetworkConnect() |
[signal] void | sigNetworkDisConnect(bool status) |
Detailed Description
Obtain the global interface object with xPluginInterface(). Except for signals, the InterfaceManager member functions below are invoked through this reference.
Unless noted, InterfaceManager member functions must be called on the UI thread. If the controller is not connected, XService get functions return an empty QJsonValue and set / command functions return false. execCommandXServiceData() returns the JSON boolean false when disconnected, not an empty QJsonValue.
For commandCustomData(), pluginName is the controller plugin name. For subscription APIs such as connectXServiceData() and connectNetworkStatus(), pluginName is the calling plugin’s own identifier and must match PLUGIN_NAME in the Qt project file (.pro) and the key passed to XPLUGIN_REGISTER().
See also Data Communication.
Member Function Documentation
QJsonArray InterfaceManager::commandCustomData(QObject *obj, const QString &pluginName, const QString &key, const QString &val)
Sends one string key/value to the named controller plugin. Returns a reply QJsonArray (may be empty on failure or empty reply). obj is the request context: the QObject that initiates this call (for example, the current plugin or UI object); pass nullptr when no specific object is associated. pluginName is the target controller plugin name. key is the field name. val is the field value (string).
The final JSON sent to the controller looks like:
[
{
"<pluginName>": {
"<key>": "<val>"
}
}
]
The outer object key is the value of pluginName; the inner field name is key and its value is val.
See also Data Communication.
QJsonArray InterfaceManager::commandCustomData(QObject *obj, const QString &pluginName, const QJsonObject &json)
Sends a set of fields to the named controller plugin. Returns a reply QJsonArray (may be empty on failure or empty reply). obj is the request context: the QObject that initiates this call (for example, the current plugin or UI object); pass nullptr when no specific object is associated. pluginName is the target controller plugin name. json is the field object for that plugin.
The final JSON sent to the controller looks like:
[
{
"<pluginName>": <json>
}
]
The outer object key is the value of pluginName; the value is json.
See also Data Communication.
QJsonArray InterfaceManager::commandCustomData(QObject *obj, const QJsonObject &json)
Sends custom data to a controller plugin. The caller must shape json as plugin-name → field object. Returns a reply QJsonArray (may be empty on failure or empty reply). obj is the request context: the QObject that initiates this call (for example, the current plugin or UI object); pass nullptr when no specific object is associated. json is the object to send; top-level keys must be plugin names, and values must be field objects for those plugins.
json must be organized as:
{
"<pluginName>": {
"<key>": "<val>"
}
}
The final JSON sent to the controller looks like:
[
{
"<pluginName>": {
"<key>": "<val>"
}
}
]
See also Data Communication.
QJsonArray InterfaceManager::commandCustomData(QObject *obj, const QJsonArray &arr)
Sends several custom-data entries to controller plugins in one call. The caller must shape arr as a list of plugin-name → field-object records. Returns a reply QJsonArray (may be empty on failure or empty reply). obj is the request context: the QObject that initiates this call (for example, the current plugin or UI object); pass nullptr when no specific object is associated. arr is the array to send; each element must be a plugin-name → field-object object.
arr must be organized as:
[
{
"<pluginName1>": { ... }
},
{
"<pluginName2>": { ... }
}
]
The final JSON sent to the controller is the same as arr.
See also Data Communication.
QJsonValue InterfaceManager::getNodeData(const QString &key)
Reads HMI local data for key and returns a QJsonValue.
QJsonValue InterfaceManager::getXServiceData(const QString &key)
Reads XService node data for key from the controller. Returns an empty QJsonValue when the controller is not connected.
See also setXServiceData().
QJsonValue InterfaceManager::getXServiceData(const QString &key, const QString &subKey)
Reads XService node data for subKey under key from the controller. Returns an empty QJsonValue when the controller is not connected.
See also setXServiceData().
bool InterfaceManager::setXServiceData(const QString &key, const QVariant &var)
Writes the XService node at key to the controller synchronously. Returns true when the controller is connected, false when it is not.
See also getXServiceData().
bool InterfaceManager::setXServiceData(const QString &key, const QString &subKey, const QVariant &var)
Writes the XService node at subKey under key to the controller synchronously. Returns true when the controller is connected, false when it is not.
See also getXServiceData().
bool InterfaceManager::commandXServiceData(const QString &key, const QVariant &var)
Sends an XService command to the controller asynchronously. Returns true when the controller is connected, false when it is not; the return value indicates connectivity only, not whether the command succeeded, and the call does not wait for the result. key is the command path. var is the command argument.
See also execCommandXServiceData().
QJsonValue InterfaceManager::execCommandXServiceData(const QString &key, const QVariant &var)
Runs an XService command on the controller synchronously and returns the result JSON. Returns the JSON boolean false when the controller is not connected. key is the command path. var is the command argument.
See also commandXServiceData().
bool InterfaceManager::connectXServiceData(const QString &pluginName, const QString &serviceKey, std::function<void(const QVariant &data)> callBack, const QString &key = "")
Subscribes to the specified XService node. When the node changes, the client calls callBack(data), where data is the node's latest value. This function may be called more than once for the same serviceKey. Returns true on success, false on failure. To cancel a subscription, call disconnectXServiceData().
pluginName is the identifier of the plugin that calls this function; it must match that plugin’s PLUGIN_NAME macro in the Qt project file (.pro) and the key passed to XPLUGIN_REGISTER().
serviceKey is the path of that node.
callBack is the callback invoked when the node data changes.
key is deprecated and must not be used.
callBack is a std::function invoked by the client outside the plugin DLL. The plugin must be built with the same compiler, toolset, and calling convention as the client.
See also disconnectXServiceData().
bool InterfaceManager::disconnectXServiceData(const QString &pluginName, const QString &serviceKey, const QString &key = "")
Cancels the subscription to the specified XService node. This function returns true.
pluginName is a reserved parameter and currently does not participate in this function's logic.
serviceKey must be the node path used at registration.
key is deprecated and must not be used.
See also connectXServiceData().
bool InterfaceManager::rcRequest(const QString &module, const QString &command, const QJsonValue &data = QJsonValue(), int timeout = 4800)
Sends an RC request asynchronously by module and command. This function returns immediately after sending the request and does not include the command result. To obtain a result, use rcExecRequest().
Returns true if the request was sent successfully, or false if the controller is disconnected or the request could not be sent. The return value does not indicate command success or failure.
After this function returns, the client may still receive the response in the background, but does not deliver the result to the caller. On failure, it records an error or warning log. If no response arrives within timeout, it records a timeout log and ignores any later response.
module is the module name. command is the command name. Together they identify the request target.
data is the request body; empty QJsonValue by default.
timeout is the client's background wait time for a response; default 4800 ms.
See also rcRequestFullCommand() and rcExecRequest().
bool InterfaceManager::rcRequestFullCommand(const QString &full_command, const QJsonValue &request_val = QJsonValue(), int timeout = 4800)
Sends an RC request asynchronously by full command path. This function returns immediately after sending the request and does not include the command result. To obtain a result, use rcExecRequestFullCommand().
Returns true if the request was sent successfully, or false if the controller is disconnected or the request could not be sent. The return value does not indicate command success or failure.
After this function returns, the client may still receive the response in the background, but does not deliver the result to the caller. On failure, it records an error or warning log. If no response arrives within timeout, it records a timeout log and ignores any later response.
full_command is the full command path and must include both the module name and the command name.
request_val is the request body; empty QJsonValue by default.
timeout is the client's background wait time for a response; default 4800 ms.
See also rcRequest() and rcExecRequestFullCommand().
QJsonValue InterfaceManager::rcExecRequest(const QString &module, const QString &command, const QJsonValue &data = QJsonValue(), bool has_log = true, int timeout = 1600)
Sends an RC request synchronously by module and command, and returns the result. This function returns after a response arrives or the wait times out. Returns an empty QJsonValue if the controller is disconnected.
module is the module name. command is the command name. Together they identify the request target.
data is the request body; empty QJsonValue by default.
has_log controls whether to record related logs; default true.
timeout is the wait time for a response; default 1600 ms.
See also rcExecRequestFullCommand() and rcRequest().
QJsonValue InterfaceManager::rcExecRequestFullCommand(const QString &full_command, const QJsonValue &request_val = QJsonValue(), bool has_log = true, int timeout = 1600)
Sends an RC request synchronously by full command path, and returns the result. This function returns after a response arrives or the wait times out. Returns an empty QJsonValue if the controller is disconnected.
full_command is the full command path and must include both the module name and the command name.
request_val is the request body; empty QJsonValue by default.
has_log controls whether to record related logs; default true.
timeout is the wait time for a response; default 1600 ms.
See also rcExecRequest() and rcRequestFullCommand().
QString InterfaceManager::connectNetworkStatus(bool isConnect, const QString &pluginName, QObject *obj, std::function<void()> callBack, const QString &id = "")
Registers a callback for the network connected or disconnected event. Returns a subscription id for use with disconnectNetworkStatus().
isConnect is true to subscribe to the connected event, or false to subscribe to the disconnected event.
pluginName is the identifier of the calling plugin itself; it must match the PLUGIN_NAME macro in that plugin's Qt project file (.pro) and the key passed to XPLUGIN_REGISTER().
obj is the context object and must be a valid QObject (for example a widget owned by the plugin). The subscription is removed automatically when it is destroyed. If nullptr is passed, the callback is never invoked.
callBack is the callback invoked when the event occurs.
id is a reserved parameter and currently does not participate in this function's logic. To cancel the subscription, use this function's return value.
callBack is a std::function and is invoked by the client outside the plugin dynamic library. The plugin must be built with the same compiler, toolset, and calling convention as the client.
See also disconnectNetworkStatus() and sigNetworkConnect().
void InterfaceManager::disconnectNetworkStatus(bool isConnect, const QString &pluginName, const QString &id = "")
Cancels a network-status callback by subscription id.
id must be the return value of connectNetworkStatus(); if it is empty, this function does nothing.
isConnect and pluginName are reserved parameters and currently do not participate in this function's logic.
See also connectNetworkStatus().
bool InterfaceManager::getRobotConnected()
Returns whether the controller is connected.
See also getRobotIP() and sigNetworkConnect().
QString InterfaceManager::getRobotID()
Returns the robot ID.
bool InterfaceManager::getRobotEleStatus()
Returns whether the robot is powered on.
See also changeRobotPowerStatue().
bool InterfaceManager::getRobotOperateIsHand()
Returns whether the robot is in manual mode. true is manual; false is automatic.
See also changeRobotModelStatue().
QString InterfaceManager::getRobotPhyStatus()
Returns a string describing the current run state.
int InterfaceManager::getUserOperateLevel()
Returns the current user permission level.
QString InterfaceManager::getRobotIP()
Returns the IP address of the connected controller.
See also getRobotConnected().
QString InterfaceManager::getRobotType()
Returns the current robot model name.
int InterfaceManager::getRobotModelType()
Returns the robot template code from the controller.
bool InterfaceManager::changeRobotPowerStatue(bool status, bool isRsync = true)
Sets power state. status is true to power on; false to power off. isRsync is true for a synchronous send; false for an asynchronous send, whose return value indicates whether the request was sent.
This changes controller power state.
See also getRobotEleStatus().
bool InterfaceManager::changeRobotModelStatue(bool isHand, bool isRsync = true)
Sets manual / automatic mode. isHand is true to select manual, false to select automatic. isRsync is true for a synchronous send; false for an asynchronous send, whose return value indicates whether the request was sent.
This changes the controller run mode.
See also getRobotOperateIsHand().
bool InterfaceManager::startRunningFilter(bool doOpen)
Opens or closes the start filter. doOpen is true to open the filter; false to close it. When open, call startRunning() to start the current program.
See also startRunning(), stopRunningFilter(), and XPluginEventType.
bool InterfaceManager::stopRunningFilter(bool doOpen)
Opens or closes the stop filter. doOpen is true to open the filter; false to close it. When open, call stopRunning() to stop the current program.
See also stopRunning(), startRunningFilter(), and XPluginEventType.
bool InterfaceManager::startRunning()
Starts the current program. This function enqueues the start request in the event queue and returns immediately; it does not wait for the program to start. Returns false if the controller is not connected or the request cannot be queued; returns true if queued successfully.
See also stopRunning() and startRunningFilter().
bool InterfaceManager::stopRunning()
Stops the current program. This function enqueues the stop request in the event queue and returns immediately; it does not wait for the program to stop. Returns false if the controller is not connected or the request cannot be queued; returns true if queued successfully.
See also startRunning() and stopRunningFilter().
QString InterfaceManager::getCurTool()
Returns the current tool name.
See also getToolList() and getCurWobj().
QString InterfaceManager::getCurWobj()
Returns the current work-object name.
See also getWobjList() and getCurTool().
QStringList InterfaceManager::getToolList()
Returns the tool list.
See also getCurTool().
QStringList InterfaceManager::getWobjList()
Returns the work-object list.
See also getCurWobj().
QStringList InterfaceManager::getSpeedList()
Returns the speed list.
See also getZoneList().
QStringList InterfaceManager::getZoneList()
Returns the zone list.
See also getSpeedList().
QStringList InterfaceManager::getVarDataList(const QString &type = "")
Returns the names of custom variables in the current HMI project. When type is empty, returns all names; when non-empty, returns only names whose type equals type.
See also addVarData().
bool InterfaceManager::addVarData(const QString &name, QVariant value, bool isPers = false)
Creates a basic variable. Returns false if name is empty, the controller is not connected, or a variable with the same name already exists. On hot-update failure, rolls back and returns false. name is the variable name. value is the initial value. isPers is true to create a persistent variable; default false.
See also delVarData() and updateVarData().
bool InterfaceManager::delVarData(const QString &name)
Deletes a variable by name. Types socketserver, socketconn, and serials are not supported. name is the variable name.
See also addVarData().
bool InterfaceManager::delVarData(const QList<QString> &names)
Deletes variables by name list. Types socketserver, socketconn, and serials are not supported. names is the variable name list.
See also addVarData().
bool InterfaceManager::updateVarData(const QString &name, QVariant value)
Updates a basic variable by name. name is the variable name. value is the new value.
See also getVarObjDataByName().
QJsonObject InterfaceManager::getVarObjDataByName(const QString &name)
Returns the JSON object of the specified variable. Empty object if not found. name is the variable name.
QVector<QString> InterfaceManager::getValuesOfPERSVars(const QVector<QString> &names)
Reads current values of persistent variables as strings. names is the variable name list.
See also setValuesOfPERSVars().
int InterfaceManager::setValuesOfPERSVars(const QVector<QString> &names, const QVector<QVariant> &values)
Sets a group of persistent variables. names is the variable name list. values is the new value list corresponding one-to-one with names. Returns 0 on success, -1 if names and values differ in length, and -0xF0 if the connected controller's xCore version does not support this interface.
See also getValuesOfPERSVars() and registPERSVars().
int InterfaceManager::registPERSVars(const QVector<QString> &names)
Adds persistent variables to the monitor selection list for later reading. names is the variable name list to register. Returns 0 on success, and -0xF0 if the connected controller's xCore version does not support this interface.
See also getRegistedPERSVars().
QVector<QVariant> InterfaceManager::getRegistedPERSVars()
Returns the current values of persistent variables previously added to the monitor selection list by registPERSVars(). The caller must invoke this function again as needed to obtain updated values. Returns an empty container if there is no data, or if the connected controller's xCore version does not support this interface.
See also registPERSVars().
QStringList InterfaceManager::getPointNameList()
Returns point names in the current HMI project.
See also getPointObjDataByName().
QJsonObject InterfaceManager::getPointObjDataByName(const QString &pointName)
Returns the complete JSON object for the point identified by pointName. Empty object if not found. pointName is the point name.
See also getPointDataByName().
QVector<double> InterfaceManager::getPointDataByName(const QString &pointName, const QString &valueIndex = "[0][0][0]")
Returns the Cartesian pose components for the given point name and index, in the order x, y, z, a, b, c. Returns an empty vector if the point, index, or pose is missing. pointName is the point name. valueIndex is the array index; default "[0][0][0]".
QJsonValue InterfaceManager::getCurrentPointData(const QString &toolName = "", const QString &wobjName = "")
Synchronously reads the current robot pose and returns it as JSON. When toolName is empty, uses the tool currently selected in the HMI; if none is selected, uses tool0. When wobjName is empty, uses the work object currently selected in the HMI; if none is selected, uses wobj0.
See also addCurrentPoint().
bool InterfaceManager::addCurrentPoint(const QString &pointName, bool isJoint, const QString &toolName, const QString &wobjName, const QString &valueIndex = "[0][0][0]")
Writes the robot's current pose into the named point. Returns false if the controller is not connected. For a multi-dimensional point, updates only the element at valueIndex and leaves other indices unchanged. For a single-element point that already exists, removes that point and writes a full replacement. If no point with the same name exists, creates a new one. pointName is the point name. isJoint is true to write a joint point, false to write a Cartesian point. toolName and wobjName are the tool and work-object frame names used when reading the current pose. valueIndex is the array index; default "[0][0][0]".
See also getCurrentPointData() and setPointCartData().
bool InterfaceManager::setPointCartData(const QString &pointName, const QVector<double> &xyz_abc, const QString &valueIndex = "[0][0][0]")
Writes Cartesian coordinates at the index given by valueIndex. xyz_abc is x, y, z, a, b, c in that order; its length must be at least 6, and only the first six elements are used. Returns false if fewer than six elements are provided, or if the point or index is missing. pointName is the point name. valueIndex is the array index; default "[0][0][0]".
See also addCurrentPoint().
int InterfaceManager::checkPointMoveTo(const QString &pointFrom, const QString &pointTo)
Checks whether motion from pointFrom to pointTo is reachable. Returns 0 if the check passed, 1 if the two names refer to the same point, and -2 if the path check failed. pointFrom is the start point name. pointTo is the end point name.
See also checkPointSame() and moveToStart().
int InterfaceManager::checkPointSame(const QString &pointFrom, const QString &pointTo)
Compares the two point-name strings. Returns 1 if they are equal, otherwise 0. This interface does not compare poses. pointFrom is the first point name. pointTo is the second point name.
See also checkPointMoveTo().
void InterfaceManager::moveToStart(int &errCode, const QString &pointNameTo, int speed, bool isMoveJ)
Moves to the specified point. This interface uses only the data at index [0][0][0] of that point. Sets errCode to -1 if the point is not found or that index does not exist. This overload fixes confCheck to true, so robot configuration data (conf) is required at that index; if it is missing, errCode is set to -2. Sets errCode to 0 when the motion command is issued successfully. pointNameTo is the target point name. speed is written to the trajectory as speed / 1000.0. isMoveJ is true for joint-space motion and false for Cartesian linear motion.
This interface issues a robot motion command. Confirm site conditions before calling.
See also moveToStop() and checkPointMoveTo().
void InterfaceManager::moveToStart(int &errCode, const QString &pointNameTo, int speed, bool confCheck, bool isMoveJ)
Moves to the specified point. This interface uses only the data at index [0][0][0] of that point. Sets errCode to -1 if the point is not found or that index does not exist. When confCheck is true or isMoveJ is true, robot configuration data (conf) must be present at that index; otherwise errCode is set to -2. Sets errCode to 0 when the motion command is issued successfully. pointNameTo is the target point name. speed is written to the trajectory as speed / 1000.0. confCheck specifies whether configuration data stored with the point is required; configuration selects the solution used to reach the target. isMoveJ is true for joint-space motion and false for Cartesian linear motion.
This interface issues a robot motion command. Confirm site conditions before calling.
See also moveToStop() and checkPointMoveTo().
void InterfaceManager::moveToStop()
Stops motion started by moveToStart().
See also moveToStart().
QStringList InterfaceManager::getProjectList()
Returns project names.
See also createProject() and changeProject().
int InterfaceManager::createProject(const QString &projectName, const QString &desc = "", bool isUsed = false)
Creates a project. The name must not be empty, _temp, or xstack_default. Returns 0 on success, -1 if the name is invalid, -2 if the project directory already exists, and -3 if the directory could not be created. projectName is the project name. desc is the project description; empty by default. isUsed is true to switch to the new project as the current HMI project after creation; default false.
See also changeProject() and removeProject().
int InterfaceManager::changeProject(const QString &projectName)
Switches the current HMI project. Returns -1 if the name is invalid (empty or _temp), -2 if the project directory does not exist, and 0 on success. projectName is the target project name.
See also createProject().
int InterfaceManager::removeProject(const QString &projectName)
Deletes a project and its directory. Returns -1 if the name is invalid, -2 if the project does not exist, -3 if removing the directory failed, and 0 on success. projectName is the project name to delete.
This interface deletes the project directory and clears related controller tasks. The operation is irreversible. Confirm site conditions before calling.
See also createProject().
QHash<QString, QVariant> InterfaceManager::getIOHash()
Returns all IO names and current values. Returns an empty map if the controller is not connected.
See also getIOByType() and getIOValue().
QStringList InterfaceManager::getIOByType(const QString &sigType)
Returns the list of IO names for the given signal type. sigType accepts only "DI", "DO", "GI", "GO", "AI", and "AO", case-sensitively; returns an empty list if the string is not recognized.
See also getIOHash() and setIOValue().
QStringList InterfaceManager::getIOByType(int sigType)
Returns the list of IO names for the given signal type. sigType values map as follows: 1 to "DI", 2 to "DO", 3 to "GI", 4 to "GO", 5 to "AI", and 6 to "AO". Returns an empty list if sigType is outside the range 1–6.
See also getIOHash() and setIOValue().
bool InterfaceManager::setIOValue(const QString &name, int sigType, bool value)
Sets the boolean value of the specified IO. name is the IO name. sigType is the signal type integer; value meanings match getIOByType(int). value is the target value.
For DI (sigType 1) and DO (sigType 2): system-preset IO must not be written; DI may be written only when input simulation mode is active. If these conditions are not met, the function returns false and does not issue a write.
When the conditions are met, the write is issued asynchronously. The return value is always false; callers must not use it to determine whether the write succeeded.
This interface issues an IO write request and may affect field device state. Confirm conditions before calling.
See also getIOValue().
bool InterfaceManager::setIOValue(const QString &name, const QString &sigType, bool value)
Sets the IO value with the signal type given as a string. sigType accepts only "DI", "DO", "GI", "GO", "AI", and "AO", case-sensitively, mapping to integers 1–6; subsequent behavior matches setIOValue(const QString &, int, bool). An unrecognized string is treated as -1: DI/DO checks are skipped, the write is still issued asynchronously, and the return value remains always false; callers must not use it to determine whether the write succeeded.
This interface issues an IO write request and may affect field device state. Confirm conditions before calling.
See also getIOValue().
bool InterfaceManager::getIOValue(const QString &name)
Returns the boolean value of the specified IO. Returns false if the controller is not connected, if the read fails, or if the name is not present. A false return may mean the IO is actually false, or that one of the failures above occurred; callers must not rely on the return value alone to diagnose the cause. name is the IO name.
See also setIOValue().
QHash<QString, QStringList> InterfaceManager::getRegisterHash()
Returns all register names and their current values. Keys are register names; values are string lists.
See also getRegisterValue().
QJsonValue InterfaceManager::getRegisterValue()
Returns the full register list as JSON.
See also getRegisterHash().
Signal Documentation
[signal] void InterfaceManager::sigNetworkConnect()
Emitted when both the controller RC channel and XService are connected.
See also sigNetworkDisConnect() and connectNetworkStatus().
[signal] void InterfaceManager::sigNetworkDisConnect(bool status)
Emitted when the controller RC channel is disconnected. status is true for an intentional disconnect; false for other disconnect reasons.
See also sigNetworkConnect() and connectNetworkStatus().
Related Non-Members
These functions and xPluginInterface() are declared in the same header in namespace xplugin. For examples of mounting the center page, status bar, and similar UI, see UI Interface.
Related Non-Members
Related Non-Members Documentation
InterfaceManager &xplugin::xPluginInterface()
Returns the process-wide InterfaceManager singleton. Obtaining the singleton reference is thread-safe. Invoking its business APIs through this object must be done on the UI thread unless otherwise noted; do not call them concurrently from multiple threads.
QString xplugin::GetPluginVersion()
Returns the version string of the client plugin library.
int xplugin::CreateCenterWidget(const QString &pluginName, QWidget *widget)
Registers widget as the plugin's center page. Typically called from init(). Returns -1 if pluginName is empty, -2 if no matching plugin module is found, and 0 after the call completes. A null widget is ignored and the function still returns 0. pluginName is the plugin identifier; must match PLUGIN_NAME. widget is the center-page widget.
See also CreateStatusBar() and CreateRightExpandWidgte().
int xplugin::CreateStatusBar(const QString &pluginName, QWidget *widget, int index = 1)
Adds widget to the specified slot of the bottom status bar. The same plugin may call this more than once with different index values to add multiple widgets. Returns -1 if pluginName is empty, -2 if no matching plugin module is found, 0 if widget is null or the add fails, and 1 on success. pluginName is the plugin identifier; must match PLUGIN_NAME. widget is the status-bar widget. index is the slot index; default 1.
See also CreateCenterWidget().
int xplugin::CreateRightExpandWidgte(const QString &pluginName, QWidget *widget, const QString &name = "")
Registers widget as a right expand-panel page. Returns -1 if pluginName is empty, -2 if no matching plugin module is found, -1 if registration fails (including when the expand sidebar is unavailable or widget is null), and 0 on success. pluginName is the plugin identifier; must match PLUGIN_NAME. widget is the expand-panel widget. name is the name of this expand-panel page, used later by SwitchRightExpandWidgte(); when empty, the plugin name is used.
See also SwitchRightExpandWidgte() and GetRightExpandSideBar().
int xplugin::SwitchRightExpandWidgte(const QString &pluginName = "", const QString &name = "")
Switches the right expand-panel page, or hides the expand sidebar. When pluginName is empty, hides the expand sidebar and returns 0. When no matching plugin module is found, the expand sidebar is also hidden and the function returns -2. Returns 0 after the target page is switched successfully. pluginName is the plugin identifier. name is the expand-panel page name: when empty, the plugin name is used, and the plugin's default expand page is shown; when non-empty, it must match the name passed to CreateRightExpandWidgte().
See also CreateRightExpandWidgte().
int xplugin::CreatePhyButtonList(const QString &pluginName, const QString &type, const QList<PhysicalButton> &left_buttons, const QList<PhysicalButton> &right_buttons, QStringList center_texts = QStringList(""))
Registers a set of physical buttons with the HMI. Returns -1 if pluginName is empty, -2 if no matching plugin module is found, and 0 on success. pluginName is the plugin identifier; must match PLUGIN_NAME. type is the button-group type used later with ChangePhyButtonStatus(). left_buttons and right_buttons are the left and right button lists. center_texts is the center text list. If this argument is omitted, the default is a list that contains one empty string.
See also ChangePhyButtonStatus(), ChangeModelWindowStatus(), and PhysicalButton.
int xplugin::ChangePhyButtonStatus(const QString &pluginName, const QString &type, bool enable)
Enables or disables the physical-button group of the given type. Returns -1 if pluginName is empty, -2 if no matching plugin module is found, and 0 on success. pluginName is the plugin identifier. type must match the value used with CreatePhyButtonList(). enable is true to enable and false to disable.
See also CreatePhyButtonList().
int xplugin::ChangeModelWindowStatus(const QString &pluginName, bool status)
Sets the plugin modal state. Returns -1 if pluginName is empty, -2 if no matching plugin module is found, and 0 on success. pluginName is the plugin identifier. status is true to enter modal state (physical buttons do not respond) and false to exit modal state.
See also ChangePhyButtonStatus().
int xplugin::ChangeFullScreen(const QString &pluginName, bool isFull)
Enters or leaves fullscreen for the plugin center page. Returns -1 if pluginName is empty, -2 if no matching plugin module is found, and 0 on success. pluginName is the plugin identifier. isFull is true to enter fullscreen and false to leave fullscreen.
int xplugin::GetRightExpandSideBar(QWidget **out_right_expand_side_widget)
Obtains the HMI right expand-sidebar widget pointer and writes it to out_right_expand_side_widget. The sidebar is the container for expand-panel pages. The caller must pass a valid QWidget **; if the sidebar is unavailable, the written pointer may be null. Returns 0.
See also CreateRightExpandWidgte() and SwitchRightExpandWidgte().
int xplugin::ThrowLog(const QString &pluginName, enThrowLogLevel level, const QString &msg)
Shows a popup at the bottom-right of the HMI. Returns -1 if pluginName is empty, -2 if no matching plugin module is found, and 0 after the popup is shown successfully. pluginName is the plugin identifier. level is the popup level; see enThrowLogLevel. msg is the popup text.
See also enThrowLogLevel.
int xplugin::GetPluginDataPath(QString &dataPath, const QString &pluginName)
Obtains the plugin data path for pluginName and writes it to dataPath. The path has the form xplugins/client/<pluginName>/. Returns -1 if pluginName is empty, -2 if no matching plugin module is found, and 0 on success. dataPath is an output parameter that receives the plugin data path. pluginName is the plugin identifier; must match PLUGIN_NAME.
RL Auxiliary Programming
This section describes the APIs for registering custom commands with HMI auxiliary programming (the RL editor).
RLManager Class
The RLManager class registers custom commands with auxiliary programming.
| Header: | #include "rl/rlmanager.h" |
| Inherits: | QObject |
Public Functions
Detailed Description
RLManager is the plugin-side entry point for registering commands with auxiliary programming. Construct this object in afterInit() and complete registration there.
Commands may be registered in either of the following ways.
Method 1: Step-by-step registration
Must call:
createGroups(): create the command groupcreateTypeKey(): register the command namecreateTypeToGroup(): attach the command to a group
May call as needed:
createSkeleton(): create interpreter textcreateInsDescribe(): create the command description textcreateInsDefault(): create the default output textcreatePattern(): create a regular-expression matching toolcreateInsertWidget(): create an insert widgetcreatePropertyWidget(): create a property widget
Method 2: createData()
Creates an ordinary command in one call. Command-name registration, group attachment, and related steps are performed internally, so the mandatory APIs under Method 1 need not be called separately.
Note: If an insert widget or property widget is provided, the widget class must derive from RLContentBase.
Member Function Documentation
void RLManager::createGroups(const QString &lab, const QString &groupName)
Creates a command group. This API must be called when registering step by step. lab is the group label. groupName is the group name used with createTypeToGroup().
See also createTypeToGroup().
void RLManager::createTypeKey(const QString &type)
Creates a command name. This API must be called when registering step by step. type is the command name.
See also createTypeToGroup().
void RLManager::createTypeToGroup(const QString &groupName, const QString &type)
Adds a command to a command group. This API must be called when registering step by step. groupName is the group name. type is the command name.
See also createGroups() and createTypeKey().
void RLManager::createTypeToGroup(const QString &groupName, const QStringList &typeList)
Adds multiple commands to a command group. This API must be called when registering step by step (either this overload or the single-command overload). groupName is the group name. typeList is the list of command names.
See also createGroups() and createTypeKey().
void RLManager::createSkeleton(const QString &type, const QString &str)
Creates interpreter text. type is the command name. str is the interpreter text.
void RLManager::createInsDescribe(const QString &type, const QString &str)
Creates the command description text. type is the command name. str is the description text.
void RLManager::createInsDefault(const QString &type, const QString &strDef)
Creates the default output text. type is the command name. strDef is the default output text.
void RLManager::createPattern(const QString &type, const QString &str)
Creates a regular-expression matching tool. type is the command name. str is the regular expression.
void RLManager::createInsertWidget(const QString &type, std::function<RLContentBase *()> func = [] { return nullptr; })
Creates an insert widget. func must return a RLContentBase subclass. type is the command name. func creates the insert widget; returns a null pointer by default.
See also createPropertyWidget() and RLContentBase.
void RLManager::createPropertyWidget(const QString &type, std::function<RLContentBase *()> func = [] { return nullptr; })
Creates a property widget. type is the command name. func creates the property widget; returns a null pointer by default.
See also createInsertWidget().
void RLManager::createData(const QString &groupName, const QString &type, const QString &desc, std::function<RLContentBase *()> func1 = [] { return nullptr; }, std::function<RLContentBase *()> func2 = [] { return nullptr; })
Quickly creates an ordinary command. groupName is the group name. type is the command name. desc is the description text. func1 creates the insert widget; returns a null pointer by default. func2 creates the property widget; returns a null pointer by default.
See also createGroups() and createTypeKey().
RLContentBase Class
The RLContentBase class is the base class for plugin-side insert widgets and property widgets.
| Header: | #include "rl/rlcontentbase.h" |
| Inherits: | QWidget |
Public Functions
RLContentBase(QWidget *parent = nullptr) | |
void | setType(const QString &type) |
const QString & | getType() |
virtual void | FillWith(const QString &str) |
virtual QString | ToString() |
virtual bool | CheckInsert() |
virtual bool | CheckReplace() |
Detailed Description
Widget classes registered with createInsertWidget(), createPropertyWidget(), or createData() must derive from this class. When an instruction is inserted or edited, the HMI calls these virtual functions: FillWith() fills the widget from existing instruction text, CheckInsert() / CheckReplace() validate whether submission is allowed, and ToString() returns the instruction text to write into the program. The base-class defaults produce no useful output and fail validation; derived classes must override the virtual functions as required by the command.
Member Function Documentation
void RLContentBase::setType(const QString &type)
Sets the RL command type. type is the command type.
const QString &RLContentBase::getType()
Returns the RL command type previously set.
[virtual] void RLContentBase::FillWith(const QString &str)
Fills the current widget with the given instruction text, typically for property editing. The default implementation is empty. str is the instruction text to apply.
See also ToString().
[virtual] QString RLContentBase::ToString()
Builds the instruction text to write into the program from the current widget contents. The default implementation returns an empty string.
See also FillWith().
[virtual] bool RLContentBase::CheckInsert()
When the user inserts a new instruction through the insert widget, validates whether the current widget contents may be written into the program. Returns true to allow and false to reject. The default implementation returns false.
See also CheckReplace().
[virtual] bool RLContentBase::CheckReplace()
When the user edits an existing instruction through the property widget, validates whether the current widget contents may be submitted. Returns true to allow and false to reject. The default implementation returns false.
See also CheckInsert().
Event System
This section describes the APIs for publishing and subscribing to plugin events. For usage examples and built-in event types, see the Event System feature topic.
XPluginEventSystem Class
The XPluginEventSystem class provides a publish–subscribe event API.
| Header: | #include "event/xplugineventsystem.h", #include "event/xpluginevent.h" |
| Inherits: | QObject |
Public Types
| enum | XPluginEventType |
Public Functions
Related Non-Members
XPluginEventSystem & | xPluginEvent() |
Detailed Description
Obtain the process-wide XPluginEventSystem instance with xPluginEvent(), and invoke subscribe, publish, and related APIs through that instance. The constructor is protected; plugins must access this class through that entry point and must not construct it directly.
Member Type Documentation
enum xplugin::XPluginEventType
This enum describes event types. Values are grouped by range:
| Range | Meaning |
|---|---|
0x0000–0x0FFF | System events (core framework events) |
0x1000–0x1FFF | Hardware events (physical buttons, IO, etc.) |
0x2000–0x2FFF | Network events (connection status, data reception, etc.) |
0x3000–0x3FFF | XService events (data changes, etc.) |
0x4000–0x4FFF | RC events (data changes, etc.) |
0x5000–0x5FFF | UI events (data changes, etc.) |
0x8000–0xFFFF | User-defined events (plugins may register dynamically) |
| Constant | Value | Description |
|---|---|---|
xplugin::SystemEventStart | 0x0000 | Start marker of the system-event range |
xplugin::None | 0x0000 | No event |
xplugin::HardEventStart | 0x1000 | Start marker of the hardware-event range |
xplugin::NetworkEventStart | 0x2000 | Start marker of the network-event range |
xplugin::NetworkConnected | 0x2001 | Network connected |
xplugin::NetworkDisconnected | 0x2002 | Network disconnected |
xplugin::NetworkError | 0x2003 | Network error |
xplugin::XServiceEventStart | 0x3000 | Start marker of the XService-event range |
xplugin::XServiceDataChange | 0x3001 | XService node data changed |
xplugin::RCEventStart | 0x4000 | Start marker of the RC-event range |
xplugin::RCPowerStatusChange | 0x4001 | Power status changed |
xplugin::RCRunModelChange | 0x4011 | Manual / automatic mode changed |
xplugin::RCRunStart | 0x4021 | Program started |
xplugin::RCRunStop | 0x4022 | Program stopped |
xplugin::RCBeforeRunStart | 0x4023 | Before program start |
xplugin::RCBeforeRunStop | 0x4024 | Before program stop |
xplugin::RCNotifyDataChange | 0x4031 | RC notify data changed |
xplugin::UIEventStart | 0x5000 | Start marker of the UI-event range |
xplugin::UserEventStart | 0x8000 | Start marker of the user-defined range |
xplugin::MaxEventType | 0xFFFF | End marker of event-type values |
See also registerCustomEventType() and subscribe().
Member Function Documentation
XPluginEventSystem &xplugin::xPluginEvent()
Returns the process-wide XPluginEventSystem instance. Use this reference to call subscribe, publish, and related APIs.
See also subscribe() and publish().
QString XPluginEventSystem::subscribe(XPluginEventType type, std::function<void(const XPluginEvent &)> handler, const QString &pluginName, QObject *context = nullptr)
Subscribes to the given event type and returns a subscription id. type is the event type. handler is the event handler callback. pluginName identifies the subscribing plugin and is used for bulk unsubscription by plugin. pluginName should match the PLUGIN_NAME macro in the plugin Qt project file (.pro).
context must be a valid QObject (for example a widget owned by the plugin). If the object is destroyed, the subscription is removed automatically. If nullptr is passed, the callback is never invoked.
See also subscribeFiltered(), subscribeOnce(), and unsubscribe().
QString XPluginEventSystem::subscribeFiltered(XPluginEventType type, std::function<bool(const XPluginEvent &)> filter, std::function<void(const XPluginEvent &)> handler, const QString &pluginName, QObject *context = nullptr)
Subscribes to the given event type and invokes handler only when filter returns true. Returns a subscription id. type is the event type. filter is the filter function. handler is the event handler callback. pluginName identifies the subscribing plugin and is used for bulk unsubscription by plugin. pluginName should match the PLUGIN_NAME macro in the plugin Qt project file (.pro).
context is optional. If a valid QObject is passed, the subscription is removed automatically when the object is destroyed. If nullptr is passed, handler still runs when filter returns true; the caller must unsubscribe explicitly.
See also subscribe() and unsubscribe().
QString XPluginEventSystem::subscribeOnce(XPluginEventType type, std::function<void(const XPluginEvent &)> handler, const QString &pluginName, QObject *context = nullptr)
One-shot subscription: unsubscribes automatically after the first delivery. Returns a subscription id. type is the event type. handler is the event handler callback. pluginName identifies the subscribing plugin and is used for bulk unsubscription by plugin. pluginName should match the PLUGIN_NAME macro in the plugin Qt project file (.pro).
context is optional. If a valid QObject is passed, the subscription is removed automatically when the object is destroyed. If nullptr is passed, handler is still invoked when the event arrives, and the subscription is still removed automatically after the first delivery.
See also subscribe() and unsubscribe().
bool XPluginEventSystem::unsubscribe(const QString &subscriptionId)
Removes the subscription with the given id. Returns true on success; returns false if no matching subscription is found. subscriptionId is the value returned by subscribe(), subscribeFiltered(), or subscribeOnce().
See also unsubscribeByPlugin() and unsubscribeByType().
int XPluginEventSystem::unsubscribeByPlugin(const QString &pluginName)
Removes all subscriptions for the given plugin. Returns the number of subscriptions removed. pluginName is the plugin identifier passed at subscription time.
See also unsubscribe() and unsubscribeByTypeAndPlugin().
int XPluginEventSystem::unsubscribeByType(XPluginEventType eventType)
Removes all subscriptions of the given event type. Returns the number of subscriptions removed. eventType is the event type.
See also unsubscribe() and unsubscribeByTypeAndPlugin().
int XPluginEventSystem::unsubscribeByTypeAndPlugin(const QString &pluginName, XPluginEventType eventType)
Removes all subscriptions of one event type for one plugin. Returns the number of subscriptions removed. pluginName is the plugin identifier passed at subscription time. eventType is the event type.
See also unsubscribeByPlugin() and unsubscribeByType().
void XPluginEventSystem::publish(const XPluginEvent &event)
Publishes an event synchronously, delivering it to matching subscribers on the calling thread. event is the event object to publish.
See also publishAsync().
void XPluginEventSystem::publish(XPluginEventType type, const QVariant &data = QVariant(), const QString &source = QString())
Builds an XPluginEvent from type, data, and source, then delivers it synchronously to matching subscribers on the calling thread. type is the event type. data is the event data; empty by default. source is the event source identifier; empty by default.
See also publishAsync().
void XPluginEventSystem::publishAsync(const XPluginEvent &event)
Publishes an event asynchronously. Returns immediately and may be called safely from a non-UI thread. event is the event object to publish.
See also publish().
void XPluginEventSystem::publishAsync(XPluginEventType type, const QVariant &data = QVariant(), const QString &source = QString())
Builds an XPluginEvent from type, data, and source, then publishes it asynchronously. Returns immediately and may be called safely from a non-UI thread. type is the event type. data is the event data; empty by default. source is the event source identifier; empty by default.
See also publish().
XPluginEventType XPluginEventSystem::registerCustomEventType(const QString &name)
Registers a user-defined event type and returns its type value. Returns None when no more custom types are available. name is the name of the type; subscribe and publish match on the returned type value, not on name.
See also XPluginEventType.
void XPluginEventSystem::registerAllEvents()
Registers built-in client event listeners. Called by the client at startup; secondary plugins generally need not call it.
Log Output
This section describes the plugin logging macros. Plugins can use them to write debug and runtime messages to the console and to log files.
| Header: | #include "log/logmanager.h" |
| Prerequisite: | Define PLUGIN_NAME in the Qt project file (.pro) |
| Log directory: | ./log/xplugin/<PLUGIN_NAME>/ |
LOG_MIN_FILE_LEVEL and LOG_MIN_Q_LEVEL in the Qt project file (.pro) limit the output severity. When LOG_ENABLE_DETAILS is defined, log entries append the function name and line number.
Macros
| Macro | Level |
|---|---|
DLOG / ILOG / WLOG / ELOG / SLOG | Debug / Info / Warning / Error / Sudo |
DSLOG / ISLOG / WSLOG / ESLOG / SSLOG | Same, with spaces between streamed items |
Macro Documentation
Usage is like QDebug:
ILOG << "message" << value;
File Sync
This section describes the APIs for pushing and pulling files between the HMI and a controller module.
SyncTool Class
The SyncTool class synchronizes files or directories between a local path and a controller module.
| Header: | #include "utils/synctool.h" |
| Inherits: | QObject |
Public Functions
Detailed Description
Obtain the process-wide SyncTool instance with instance(), then call the push or pull APIs. The constructor is private; plugins must access this class through that entry point and must not construct it directly. When the controller is not connected, push and pull APIs return false. A push or pull call returns only after the transfer has finished.
Member Function Documentation
[static] SyncTool *SyncTool::instance()
Returns the SyncTool singleton.
See also pushFile() and pullFile().
bool SyncTool::pushFile(const QString &from_path, const QString &to_module = "hmi", bool has_err = true)
Pushes a local directory to a controller module and shows a progress dialog. Returns true on success; returns false on failure.
from_path is the local source directory. If the directory does not exist, the function tries to create it; on failure it shows an error and returns false.
to_module is the target controller module name; default "hmi".
When has_err is true and the transfer fails, an error popup is shown; default true.
See also pushOneFile() and pullFile().
bool SyncTool::pushOneFile(const QString &from_path, const QString &to_module = "hmi", bool has_err = true)
Pushes a single local file to a controller module. Returns true on success; returns false on failure. This function does not show a progress dialog.
from_path is the local source file path; if the file does not exist, the transfer fails and the function returns false.
to_module is the target controller module name; default "hmi".
When has_err is true and the transfer fails, an error popup is shown; default true.
See also pushFile().
bool SyncTool::pullFile(const QString &from_module = "hmi", const QString &to_path = "", bool has_dialog = true, bool has_err = true)
Pulls directory data from a controller module to a local path. Returns true on success; returns false on failure.
from_module is the source controller module name; default "hmi".
to_path is the local destination path; empty by default. If the directory does not exist, the function tries to create it; on failure it shows an error and returns false.
When has_dialog is true, a progress dialog is shown; default true.
When has_err is true and the transfer fails, an error popup is shown; default true.
See also pushFile().