RBCX
Library for the RB3204-RBCX board with the ESP32 by RoboticsBrno.
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Friends | List of all members
rb::Manager Class Reference

The main library class for working with the RBCX board. Call the install() method at the start of your program. More...

#include <RBCXManager.h>

Public Member Functions

 Manager (Manager const &)=delete
 
void operator= (Manager const &)=delete
 

Static Public Member Functions

static Managerget ()
 Get manager instance. More...
 

Friends

class MotorChangeBuilder
 
class Encoder
 
class PcntInterruptHandler
 
class Motor
 
void install (ManagerInstallFlags flags=MAN_NONE, BaseType_t managerLoopStackSize=3072)
 Initialize the manager - must be called once at the start of the program. More...
 
Ultrasoundultrasound (uint8_t index)
 Initialize the UART servo bus for intelligent servos LX-16. TODO: smart servos not implemented! More...
 
StupidServostupidServo (uint8_t index)
 
Oledoled ()
 Get the Piezo controller. More...
 
Mpumpu ()
 Get the Piezo controller. More...
 
SmartServoBusBackendsmartServoBusBackend ()
 
Piezopiezo ()
 Get the Piezo controller. More...
 
Batterybattery ()
 Get the Battery interface. More...
 
Ledsleds ()
 Get the Leds helper. More...
 
Buttonsbuttons ()
 
Motormotor (MotorId id)
 
MotorChangeBuilder setMotors ()
 Get a motor instance. More...
 
void schedule (uint32_t period_ms, std::function< bool()> callback)
 Schedule callback to fire after period (in millisecond). More...
 
Timerstimers ()
 
void monitorTask (TaskHandle_t task)
 
void sendToCoproc (const CoprocReq &msg)
 
const CoprocStat_VersionStat & coprocFwVersion () const
 
void coprocFwVersionAssert (uint32_t minVersion, const char *name)
 

Detailed Description

The main library class for working with the RBCX board. Call the install() method at the start of your program.

Constructor & Destructor Documentation

◆ Manager()

rb::Manager::Manager ( Manager const &  )
delete

Member Function Documentation

◆ battery()

Battery & rb::Manager::battery ( )
inline

Get the Battery interface.

◆ buttons()

Buttons & rb::Manager::buttons ( )
inline

◆ coprocFwVersion()

const CoprocStat_VersionStat & rb::Manager::coprocFwVersion ( ) const
inline

◆ coprocFwVersionAssert()

void rb::Manager::coprocFwVersionAssert ( uint32_t  minVersion,
const char *  name 
)

◆ get()

static Manager & rb::Manager::get ( )
inlinestatic

Get manager instance.

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.

◆ install()

void rb::Manager::install ( ManagerInstallFlags  flags = MAN_NONE,
BaseType_t  managerLoopStackSize = 3072 
)

Initialize the manager - must be called once at the start of the program.

Parameters
flagsmodify the manager's behavior or toggle some features. SeeManagerInstallFlags} enum.

◆ leds()

Leds & rb::Manager::leds ( )
inline

Get the Leds helper.

◆ monitorTask()

void rb::Manager::monitorTask ( TaskHandle_t  task)

◆ motor()

Motor & rb::Manager::motor ( MotorId  id)
inline

◆ mpu()

Mpu & rb::Manager::mpu ( )
inline

Get the Piezo controller.

◆ oled()

Oled & rb::Manager::oled ( )
inline

Get the Piezo controller.

◆ operator=()

void rb::Manager::operator= ( Manager const &  )
delete

◆ piezo()

Piezo & rb::Manager::piezo ( )
inline

Get the Piezo controller.

◆ schedule()

void rb::Manager::schedule ( uint32_t  period_ms,
std::function< bool()>  callback 
)
inline

Schedule callback to fire after period (in millisecond).

Return true from the callback to schedule periodically, false to not (singleshot timer).

Parameters
period_msis period in which will be the schedule callback fired
callbackis a function which will be schedule with the set period.

◆ sendToCoproc()

void rb::Manager::sendToCoproc ( const CoprocReq &  msg)

◆ setMotors()

MotorChangeBuilder rb::Manager::setMotors ( )

Get a motor instance.

Create motor power change builder: MotorChangeBuilder.

◆ smartServoBusBackend()

SmartServoBusBackend & rb::Manager::smartServoBusBackend ( )

◆ stupidServo()

StupidServo & rb::Manager::stupidServo ( uint8_t  index)

◆ timers()

Timers & rb::Manager::timers ( )
inline

◆ ultrasound()

Ultrasound & rb::Manager::ultrasound ( uint8_t  index)
inline

Initialize the UART servo bus for intelligent servos LX-16. TODO: smart servos not implemented!

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.

Friends And Related Function Documentation

◆ Encoder

friend class Encoder
friend

◆ Motor

friend class Motor
friend

◆ MotorChangeBuilder

friend class MotorChangeBuilder
friend

◆ PcntInterruptHandler

friend class PcntInterruptHandler
friend

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