XORDE  v1.0
eXtensible Operational Robotic Development Environment
Public Member Functions | List of all members
ModuleBaseAppONB Class Reference

ONB module base for external modules. More...

#include <ModuleBaseAppONB.h>

Inheritance diagram for ModuleBaseAppONB:
ModuleBaseONB

Public Member Functions

 ModuleBaseAppONB (QString in_id, QString host, QString port, QObject *parent=nullptr)
 Declare the module with given name and host and port. More...
 
 ~ModuleBaseAppONB () override
 Close the connection on destroying.
 
bool tryConnect ()
 Try connect to the host. More...
 
void closeConnect ()
 Disconnect from the host.
 
- Public Member Functions inherited from ModuleBaseONB
 ModuleBaseONB (QObject *parent=nullptr)
 Default constructor. Runs timestamp timer.
 
 ~ModuleBaseONB ()
 It had to destroy the components but something went wrong.
 
template<class T >
void declareComponent (T *component)
 Declare the ONB component. More...
 
void setIcon (QImage icon)
 Set an icon to the module. More...
 
void setIcon (QString filename)
 Set an icon to the module from file. More...
 
ComponentBasecomponent (unsigned short id)
 Get the component by id. More...
 
void log (QString message)
 Send the arbitrary message to the core's log output.
 
QList< QJsonObject > getClassesInfo () const
 WHY?? it must be in proxy!
 
QJsonArray getComponentsConfigList () const
 it's too.
 
virtual QJsonObject getJsonConfig () const
 why?? why it is located here?
 

Additional Inherited Members

- Signals inherited from ModuleBaseONB
void componentCreated (unsigned short id)
 Notify when the component is created with assigned componentID by the core. More...
 

Detailed Description

ONB module base for external modules.

Use it if you want create an external module.

Constructor & Destructor Documentation

ModuleBaseAppONB::ModuleBaseAppONB ( QString  in_id,
QString  host,
QString  port,
QObject *  parent = nullptr 
)
explicit

Declare the module with given name and host and port.

Parameters
in_idThe name of the module.
hostThe name or IP address of the host to connect.
portThe port to connect.

Member Function Documentation

bool ModuleBaseAppONB::tryConnect ( )

Try connect to the host.

Returns
true if success or connection is already established, false if connection is failed.