libpandac  0.0.0
A library designed for a comm.ai Panda.
Public Member Functions | List of all members
Panda::Handler Class Reference

A class that handles the Usb, GPS, and CAN data. More...

#include <panda.h>

Collaboration diagram for Panda::Handler:
Collaboration graph

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...
 
CangetCan ()
 Returns the in-use CAN parser. More...
 
GpsgetGps ()
 Returns the in-use GPS parser. More...
 
UsbgetUsb ()
 Returns the in-use USB handler. More...
 

Detailed Description

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).

Member Function Documentation

void Panda::Handler::addCanObserver ( CanListener can)

Add listeners to CAN packet updates.

Parameters
canA concrete object that subscribes to CAN packet updates.
void Panda::Handler::addGpsObserver ( GpsListener gps)

Add listeners to GPS data updates.

Parameters
gpsA concrete object that subscribes to GPS data updates.
void Panda::Handler::addUsbObserver ( UsbListener usb)

Add listeners to USB data updates.

Parameters
usbA concrete object that subscribes to USB data updates.
Can& Panda::Handler::getCan ( )

Returns the in-use CAN parser.

Returns
The CAN parser.
Gps& Panda::Handler::getGps ( )

Returns the in-use GPS parser.

Returns
The GPS parser.
Usb& Panda::Handler::getUsb ( )

Returns the in-use USB handler.

Returns
The USB Handler.

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