Class rb::Manager
The main library class for working with the RBCX board. Call the install() method at the start of your program.
#include <RBCXManager.h>
Public Functions
Type | Name |
---|---|
Manager (Manager const &) = delete |
|
Battery & | battery () Get the Battery interface. |
Buttons & | buttons () |
const CoprocStat_VersionStat & | coprocFwVersion () const |
void | coprocFwVersionAssert (uint32_t minVersion, const char * name) |
void | install (ManagerInstallFlags flags=MAN_NONE, BaseType_t managerLoopStackSize=3072) Initialize the manager - must be called once at the start of the program. |
Leds & | leds () Get the Leds helper. |
void | monitorTask (TaskHandle_t task) |
Motor & | motor (MotorId id) |
void | operator= (Manager const &) = delete |
Piezo & | piezo () Get the Piezo controller. |
void | schedule (uint32_t period_ms, std::function< bool()> callback) Schedule callback to fire after period (in millisecond). |
void | sendToCoproc (const CoprocReq & msg) |
MotorChangeBuilder | setMotors () Get a motor instance. |
StupidServo & | stupidServo (uint8_t index) |
Timers & | timers () |
Ultrasound & | ultrasound (uint8_t index) Initialize the UART servo bus for intelligent servos LX-16. TODO: smart servos not implemented! |
Public Static Functions
Type | Name |
---|---|
Manager & | get () Get manager instance. |
Public Functions Documentation
function Manager [2/2]
rb::Manager::Manager (
Manager const &
) = delete
function battery
inline Battery & rb::Manager::battery ()
function buttons
inline Buttons & rb::Manager::buttons ()
function coprocFwVersion
inline const CoprocStat_VersionStat & rb::Manager::coprocFwVersion () const
function coprocFwVersionAssert
void rb::Manager::coprocFwVersionAssert (
uint32_t minVersion,
const char * name
)
function install
Initialize the manager - must be called once at the start of the program.
void rb::Manager::install (
ManagerInstallFlags flags=MAN_NONE,
BaseType_t managerLoopStackSize=3072
)
Parameters:
flags
modify the manager's behavior or toggle some features. SeeManagerInstallFlags} enum.
function leds
inline Leds & rb::Manager::leds ()
function monitorTask
void rb::Manager::monitorTask (
TaskHandle_t task
)
function motor
inline Motor & rb::Manager::motor (
MotorId id
)
function operator=
void rb::Manager::operator= (
Manager const &
) = delete
function piezo
inline Piezo & rb::Manager::piezo ()
function schedule
Schedule callback to fire after period (in millisecond).
inline void rb::Manager::schedule (
uint32_t period_ms,
std::function< bool()> callback
)
Return true from the callback to schedule periodically, false to not (singleshot timer).
Parameters:
period_ms
is period in which will be the schedule callback firedcallback
is a function which will be schedule with the set period.
function sendToCoproc
void rb::Manager::sendToCoproc (
const CoprocReq & msg
)
function setMotors
Get a motor instance.
MotorChangeBuilder rb::Manager::setMotors ()
Create motor power change builder: MotorChangeBuilder.
function stupidServo
inline StupidServo & rb::Manager::stupidServo (
uint8_t index
)
function timers
inline Timers & rb::Manager::timers ()
function ultrasound
Initialize the UART servo bus for intelligent servos LX-16. TODO: smart servos not implemented!
inline Ultrasound & rb::Manager::ultrasound (
uint8_t index
)
Returns:
Instance of the class SmartServoBus which manage the intelligent servos.
Get the SmartServoBus for working with intelligent servos LX-16..
Returns:
Instance of the class SmartServoBus which manage the intelligent servos.
Public Static Functions Documentation
function get
Get manager instance.
static inline Manager & rb::Manager::get ()
Always returns the same instance and is thread-safe. Don't forget to call install() to initialize the manager at the start of your program, when you first get the instance.
The documentation for this class was generated from the following file demo-projets/esp/RBCXManager.h