trikRuntime
trikControl::BrickFactory Class Reference

Factory that creates brick object for a real robot. More...

#include <brickFactory.h>

Static Public Member Functions

static BrickInterfacecreate (const QString &systemConfig, const QString &modelConfig, const QString &mediaPath)
 Method that creates brick for real robot, it meant to be the only way to create brick outside TrikControl. More...
 
static BrickInterfacecreate (const QString &configFilesPath=".", const QString &mediaPath=".")
 Convenience method that creates brick with default config files, "system-config.xml" and "model-config.xml". More...
 
static BrickInterfacecreate (trikHal::HardwareAbstractionInterface &hardwareAbstraction, const QString &systemConfig, const QString &modelConfig, const QString &mediaPath)
 Method that creates brick using given hardware abstraction layer, to be called from tests (they can use dummy hardware implementation to check trikControl configuration, device management and conversions capability). More...
 

Detailed Description

Factory that creates brick object for a real robot.

Member Function Documentation

BrickInterface * BrickFactory::create ( const QString &  systemConfig,
const QString &  modelConfig,
const QString &  mediaPath 
)
static

Method that creates brick for real robot, it meant to be the only way to create brick outside TrikControl.

Transfers ownership over BrickInterface object to caller.

Parameters
systemConfig- file name (with path) of system config, absolute or relative to current directory.
modelConfig- file name (with path) of model config, absolute or relative to current directory.
mediaPath- path to the directory with media files (it is expected to be ending with "/").
BrickInterface * BrickFactory::create ( const QString &  configFilesPath = ".",
const QString &  mediaPath = "." 
)
static

Convenience method that creates brick with default config files, "system-config.xml" and "model-config.xml".

Transfers ownership over BrickInterface object to caller.

Parameters
configFilesPath- path to system-config.xml and model-config.xml.
mediaPath- path to the directory with media files (it is expected to be ending with "/").
BrickInterface * BrickFactory::create ( trikHal::HardwareAbstractionInterface hardwareAbstraction,
const QString &  systemConfig,
const QString &  modelConfig,
const QString &  mediaPath 
)
static

Method that creates brick using given hardware abstraction layer, to be called from tests (they can use dummy hardware implementation to check trikControl configuration, device management and conversions capability).

Transfers ownership over BrickInterface object to caller.

Parameters
hardwareAbstraction- hardware abstraction layer implementation.
systemConfig- file name (with path) of system config, absolute or relative to current directory.
modelConfig- file name (with path) of model config, absolute or relative to current directory.
mediaPath- path to the directory with media files (it is expected to be ending with "/").

The documentation for this class was generated from the following files: