VMX-pi C++ HAL Library for Raspberry Pi
VMX-pi Robotics Controller & Vision/Motion Processor
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
VMXPi Class Reference

Top-level Library Class providing access to all VMX-pi functionality. More...

#include <VMXPi.h>

Public Member Functions

 VMXPi (bool realtime, uint8_t ahrs_update_rate_hz)
 Constructs the VMXPi object using the specified parameters. More...
 
bool IsOpen ()
 Returns true if the communication with the VMX-pi firmware has been established.
 
vmx::AHRSgetAHRS ()
 Returns a reference to the singleton AHRS object providing access to VMX-pi IMU functionality. More...
 
VMXTimegetTime ()
 Returns a reference to the singleton VMXTime object providing access to VMX-pi Time functionality. More...
 
VMXIOgetIO ()
 Returns a reference to the singleton VMXIO object providing access to VMX-pi IO functionality. More...
 
VMXCANgetCAN ()
 Returns a reference to the singleton VMXCAN object providing access to VMX-pi CAN functionality. More...
 
VMXPowergetPower ()
 Returns a reference to the singleton VMXPower object providing access to VMX-pi Power functionality. More...
 
VMXVersiongetVersion ()
 Returns a reference to the singleton VMXVersion object providing access to VMX-pi Version functionality. More...
 
VMXThreadgetThread ()
 Returns a reference to the singleton VMXThread object providing access to VMX-pi Threading functionality. More...
 
bool registerShutdownHandler (void(*termination_func)(void))
 Registers a termination handler, invoked when VMXPi instance is terminated, but before resources are released. More...
 
bool registerFinalShutdownHandler (void(*termination_func)(void))
 Registers a termination handler, invoked when VMXPi instance is terminated, but only after all resources are released. More...
 
bool getPerformanceLogging ()
 Selective Enabling/Disabling of Summary Performance statistics. More...
 
void setPerformanceLogging (bool enable)
 Sets the current state of Performance Logging. More...
 

Static Public Member Functions

static VMXPigetInstance ()
 

Public Attributes

vmx::AHRS ahrs
 The AHRS object providing access to VMX-pi IMU functionality. More...
 
VMXTime time
 The VMXTime object providing access to VMX-pi Time functionality. More...
 
VMXIO io
 The VMXIO object providing access to VMX-pi IO functionality. More...
 
VMXCAN can
 The VMXCAN object providing access to VMX-pi CAN functionality. More...
 
VMXPower power
 The VMXPower object providing access to VMX-pi Power functionality. More...
 
VMXVersion version
 The VMXVersion object providing access to VMX-pi Version functionality. More...
 
VMXThread thread
 The VMXThread object providing access to VMX-pi Threading functionality. More...
 

Detailed Description

Top-level Library Class providing access to all VMX-pi functionality.

Constructor & Destructor Documentation

◆ VMXPi()

VMXPi::VMXPi ( bool  realtime,
uint8_t  ahrs_update_rate_hz 
)

Constructs the VMXPi object using the specified parameters.

This constructor initializes the VMX-pi HAL.

Parameters
realtimetrue if the VMX-pi host Linux operating system supports real-time priorities, as implemented via a fully-preemptible Real-time Linux Kernel.
ahrs_update_rate_hzThe update rate to use for the VMX-pi AHRS/IMU interface. Default is 50 hz. Valid range: 4-200Hz.

Member Function Documentation

◆ getAHRS()

vmx::AHRS& VMXPi::getAHRS ( )
inline

Returns a reference to the singleton AHRS object providing access to VMX-pi IMU functionality.

◆ getCAN()

VMXCAN& VMXPi::getCAN ( )
inline

Returns a reference to the singleton VMXCAN object providing access to VMX-pi CAN functionality.

◆ getIO()

VMXIO& VMXPi::getIO ( )
inline

Returns a reference to the singleton VMXIO object providing access to VMX-pi IO functionality.

◆ getPerformanceLogging()

bool VMXPi::getPerformanceLogging ( )

Selective Enabling/Disabling of Summary Performance statistics.

Returns the current state of Performance Logging.

◆ getPower()

VMXPower& VMXPi::getPower ( )
inline

Returns a reference to the singleton VMXPower object providing access to VMX-pi Power functionality.

◆ getThread()

VMXThread& VMXPi::getThread ( )
inline

Returns a reference to the singleton VMXThread object providing access to VMX-pi Threading functionality.

◆ getTime()

VMXTime& VMXPi::getTime ( )
inline

Returns a reference to the singleton VMXTime object providing access to VMX-pi Time functionality.

◆ getVersion()

VMXVersion& VMXPi::getVersion ( )
inline

Returns a reference to the singleton VMXVersion object providing access to VMX-pi Version functionality.

◆ registerFinalShutdownHandler()

bool VMXPi::registerFinalShutdownHandler ( void(*)(void)  termination_func)

Registers a termination handler, invoked when VMXPi instance is terminated, but only after all resources are released.

Only a single final shutdown handler may be registered.

◆ registerShutdownHandler()

bool VMXPi::registerShutdownHandler ( void(*)(void)  termination_func)

Registers a termination handler, invoked when VMXPi instance is terminated, but before resources are released.

Termination functions are invoked in the reverse order of registration.

◆ setPerformanceLogging()

void VMXPi::setPerformanceLogging ( bool  enable)

Sets the current state of Performance Logging.

Member Data Documentation

◆ ahrs

vmx::AHRS VMXPi::ahrs

The AHRS object providing access to VMX-pi IMU functionality.

◆ can

VMXCAN VMXPi::can

The VMXCAN object providing access to VMX-pi CAN functionality.

◆ io

VMXIO VMXPi::io

The VMXIO object providing access to VMX-pi IO functionality.

◆ power

VMXPower VMXPi::power

The VMXPower object providing access to VMX-pi Power functionality.

◆ thread

VMXThread VMXPi::thread

The VMXThread object providing access to VMX-pi Threading functionality.

◆ time

VMXTime VMXPi::time

The VMXTime object providing access to VMX-pi Time functionality.

◆ version

VMXVersion VMXPi::version

The VMXVersion object providing access to VMX-pi Version functionality.


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