![]() |
An open-source, flexible 3D physical simulation framework
|
"ControllerManagerInterface" declares the interfaces for all controller operations that are used for the communication between the simulation modules. More...
#include <ControllerManagerInterface.h>
Public Member Functions | |
virtual | ~ControllerManagerInterface () |
Destructor. More... | |
virtual void | getListController (std::vector< core_objects_exchange > *controllerList) const =0 |
Gives information about core exchange data for controllers. More... | |
virtual int | getControllerCount (void) const =0 |
Returns the number of controllers that are currently present in the simulation. More... | |
virtual const ControllerData | getFullController (unsigned long index) const =0 |
Gives all information of a certain controller. More... | |
virtual void | removeController (unsigned long index)=0 |
Removes a controller from the simulation. More... | |
virtual void | setControllerAutoMode (unsigned long id, bool mode)=0 |
Sets the mode of the controller with the given id. More... | |
virtual void | setControllerIP (unsigned long id, const std::string &ip)=0 |
Sets the IP of the controller with the given id. More... | |
virtual void | setControllerPort (unsigned long id, int port)=0 |
Sets the port of the controller with the given id. More... | |
virtual bool | getControllerAutoMode (unsigned long id) const =0 |
Gets the mode of the controller with the given id. More... | |
virtual const std::string | getControllerIP (unsigned long id) const =0 |
Gets the IP of the controller with the given id. More... | |
virtual int | getControllerPort (unsigned long id) const =0 |
Gets the port of the controller with the given id. More... | |
virtual void | connectController (unsigned long id)=0 |
Connects the controller with the given id. More... | |
virtual void | disconnectController (unsigned long id)=0 |
Disconnects the controller with the given id. More... | |
virtual void | updateControllers (double calc_ms)=0 |
This function updates all controllers with timing value calc_ms in miliseconds. More... | |
virtual void | resetControllerData (void)=0 |
Resets the data of all controllers. More... | |
virtual void | clearAllControllers (void)=0 |
Destroys all controllers in the simulation. More... | |
virtual void | handleError (void)=0 |
virtual unsigned long | addController (const ControllerData &controllerData)=0 |
Add a controller to the simulation. More... | |
virtual void | setDefaultPort (int port)=0 |
Sets the default port, with which all controllers are created. More... | |
virtual int | getDefaultPort (void) const =0 |
Gets the default port, with which all controllers are created. More... | |
virtual bool | isLoadingAllowed (void) const =0 |
Checks weather adding new controllers is allowed. More... | |
virtual void | setLoadingAllowed (bool allowed)=0 |
Allows or forbids adding new controllers. More... | |
virtual std::list< sReal > | getSensorValues (unsigned long id)=0 |
"ControllerManagerInterface" declares the interfaces for all controller operations that are used for the communication between the simulation modules.
The class defines only pure virtual functions that are implemented within the simulation and can be used everywhere by accessing this interface via the ControlCenter class.
It is very important to assure the serialization between the threads to have the desired results. Currently the verified use of the functions is only guaranteed by calling it within the main thread (update callback from gui_thread
).
Definition at line 61 of file ControllerManagerInterface.h.
|
inlinevirtual |
Destructor.
Definition at line 67 of file ControllerManagerInterface.h.
|
pure virtual |
Add a controller to the simulation.
Implemented in mars::sim::ControllerManager.
|
pure virtual |
Destroys all controllers in the simulation.
Implemented in mars::sim::ControllerManager.
|
pure virtual |
Connects the controller with the given id.
id | The id of the controller that is to be connected. |
Implemented in mars::sim::ControllerManager.
|
pure virtual |
Disconnects the controller with the given id.
id | The id of the controller that is to be disconnected. |
Implemented in mars::sim::ControllerManager.
|
pure virtual |
Gets the mode of the controller with the given id.
id | The id of the controller whose mode is needed. |
Implemented in mars::sim::ControllerManager.
|
pure virtual |
Returns the number of controllers that are currently present in the simulation.
Implemented in mars::sim::ControllerManager.
|
pure virtual |
Gets the IP of the controller with the given id.
id | The id of the controller whose IP is needed. |
Implemented in mars::sim::ControllerManager.
|
pure virtual |
Gets the port of the controller with the given id.
id | The id of the controller whose port is needed. |
Implemented in mars::sim::ControllerManager.
|
pure virtual |
Gets the default port, with which all controllers are created.
Implemented in mars::sim::ControllerManager.
|
pure virtual |
Gives all information of a certain controller.
index | The unique id of the controller to get information for. |
Implemented in mars::sim::ControllerManager.
|
pure virtual |
Gives information about core exchange data for controllers.
controllerList | A pointer to a vector that is filled with a core_objects_exchange struct for every controller. The vector is cleared in the beginning of this function. |
Implemented in mars::sim::ControllerManager.
|
pure virtual |
Implemented in mars::sim::ControllerManager.
|
pure virtual |
Implemented in mars::sim::ControllerManager.
|
pure virtual |
Checks weather adding new controllers is allowed.
true
if allowed, false
otherwise. Implemented in mars::sim::ControllerManager.
|
pure virtual |
Removes a controller from the simulation.
index | The unique id of the controller to remove form the simulation. |
Implemented in mars::sim::ControllerManager.
|
pure virtual |
Resets the data of all controllers.
Implemented in mars::sim::ControllerManager.
|
pure virtual |
Sets the mode of the controller with the given id.
id | The id of the controller whose mode is to be set. |
mode | The new mode. |
Implemented in mars::sim::ControllerManager.
|
pure virtual |
Sets the IP of the controller with the given id.
id | The id of the controller whose IP is to be set. |
ip | The new IP. |
Implemented in mars::sim::ControllerManager.
|
pure virtual |
Sets the port of the controller with the given id.
id | The id of the controller whose port is to be set. |
mode | The new port. |
Implemented in mars::sim::ControllerManager.
|
pure virtual |
Sets the default port, with which all controllers are created.
port | The default port. |
Implemented in mars::sim::ControllerManager.
|
pure virtual |
Allows or forbids adding new controllers.
allowed | Indicates if adding will be allowed or not. |
Implemented in mars::sim::ControllerManager.
|
pure virtual |
This function updates all controllers with timing value calc_ms
in miliseconds.
calc_ms | The timing value in miliseconds. |
Implemented in mars::sim::ControllerManager.