libpandac
0.0.0
A library designed for a comm.ai Panda.
|
A class that handles the Usb, GPS, and CAN data. More...
#include <panda.h>
Public Member Functions | |
void | initialize () |
Start up USB, GPS, and decoding threads. | |
void | stop () |
Stop USB, GPS, and decoding threads This should be called after initialize() when done with data collection. | |
void | addCanObserver (CanListener &can) |
Add listeners to CAN packet updates. More... | |
void | addGpsObserver (GpsListener &gps) |
Add listeners to GPS data updates. More... | |
void | addUsbObserver (UsbListener &usb) |
Add listeners to USB data updates. More... | |
Can & | getCan () |
Returns the in-use CAN parser. More... | |
Gps & | getGps () |
Returns the in-use GPS parser. More... | |
Usb & | getUsb () |
Returns the in-use USB handler. More... | |
A class that handles the Usb, GPS, and CAN data.
This class deals with initializing objects for USB device handling, GPS parsing, and CAN parsing. The implementation is multithreaded. The observer software pattern is used for each contained object (GPS, USB, CAN) as the intended method to retrieve Data-In-Real-Time (DIRT).
void Panda::Handler::addCanObserver | ( | CanListener & | can | ) |
Add listeners to CAN packet updates.
can | A concrete object that subscribes to CAN packet updates. |
void Panda::Handler::addGpsObserver | ( | GpsListener & | gps | ) |
Add listeners to GPS data updates.
gps | A concrete object that subscribes to GPS data updates. |
void Panda::Handler::addUsbObserver | ( | UsbListener & | usb | ) |
Add listeners to USB data updates.
usb | A concrete object that subscribes to USB data updates. |
Can& Panda::Handler::getCan | ( | ) |
Returns the in-use CAN parser.
Gps& Panda::Handler::getGps | ( | ) |
Returns the in-use GPS parser.