MotionLib
1.0.0
SamBuCa motion library
|
main entry-point More...
#include <MotionController.hpp>
Public Member Functions | |
MotionController () | |
Construct a new MotionController object. | |
std::size_t | load (const std::string &config) |
Construct platforms and devices based on given configuration string. More... | |
std::size_t | getDeviceCount () const |
Get the number of registered devices. More... | |
DeviceBase::Shared | getDevice (const DeviceId &address) |
get a generic device according to its address More... | |
template<typename T > | |
std::shared_ptr< T > | getDevice (const DeviceId &address) |
Get the device object pointer. More... | |
std::set< DeviceId > | getDeviceList () const |
retrieve complete list of devices | |
std::set< DeviceId > | getDeviceList (DeviceType type) const |
retrieve complete list of devices of a given type More... | |
std::set< std::string > | getAliasList () const |
Get current Alias list. | |
DeviceId | getAlias (const std::string &alias) const |
Get the given alias. More... | |
bool | addAlias (const std::string &alias, const DeviceId &deviceId, bool override=true) |
add an alias More... | |
void | removeAlias (const std::string &alias) |
remove an alias | |
std::shared_ptr< internal::PlatformFactory > | getPlatformFactory () const |
for internal use and debugging purpose | |
std::shared_ptr< internal::DeviceStore > | getDeviceStore () const |
for internal use and debugging purpose | |
Protected Attributes | |
std::shared_ptr< internal::PlatformFactory > | m_platformFactory |
std::shared_ptr< internal::DeviceStore > | m_deviceStore |
std::shared_ptr< internal::NotificationWorker > | m_notificationWorker |
main entry-point
Definition at line 62 of file MotionController.hpp.
bool smc::MotionController::addAlias | ( | const std::string & | alias, |
const DeviceId & | deviceId, | ||
bool | override = true |
||
) |
add an alias
[in] | alias | the alias name |
[in] | deviceId | deviceId to alias |
override=false
) Definition at line 125 of file MotionController.cpp.
DeviceId smc::MotionController::getAlias | ( | const std::string & | alias | ) | const |
Get the given alias.
Definition at line 120 of file MotionController.cpp.
DeviceBase::Shared smc::MotionController::getDevice | ( | const DeviceId & | address | ) |
get a generic device according to its address
address | Address of the device to get |
Definition at line 95 of file MotionController.cpp.
std::shared_ptr< T > smc::MotionController::getDevice | ( | const DeviceId & | address | ) |
Get the device object pointer.
address | Address of the device to get |
Definition at line 35 of file MotionController.hxx.
size_t smc::MotionController::getDeviceCount | ( | ) | const |
Get the number of registered devices.
Definition at line 100 of file MotionController.cpp.
std::set< std::string > smc::MotionController::getDeviceList | ( | DeviceType | type | ) | const |
retrieve complete list of devices of a given type
type |
Definition at line 110 of file MotionController.cpp.
size_t smc::MotionController::load | ( | const std::string & | config | ) |
Construct platforms and devices based on given configuration string.
config | Configuration string (YAML) |
Definition at line 65 of file MotionController.cpp.