A class that handles the CAN data.
More...
#include <can.h>
|
|
void | initialize () |
| |
| void | saveToFile (const char *filename) |
| | Saves raw CANBus data to a file. More correctly, this saves data read by the Panda USB interface to file. More...
|
| |
| void | saveToCsvFile (const char *filename) |
| | Saves CANBus data to a file in CSV format. This is after parsing raw data into CanFrames, in a more readable format. More...
|
| |
| void | setUsb (Panda::Usb *usbHandler) |
| | Sets the USB handler for CAN UART communication. More...
|
| |
| void | addObserver (CanListener *listener) |
| | Adds and Observer for updates on successful parsed CAN packets. More...
|
| |
| void | removeObserver (CanListener *listener) |
| | Removes an Observer that was previously added. More...
|
| |
|
void | startParsing () |
| | Starts a reading and parsing thread. A valid and initialized USB handler is needed to be set for success.
|
| |
|
void | stopParsing () |
| | Stops the reading and parsing thread. Called after startParsing() when done with CAN data.
|
| |
| void | sendMessage (CanFrame &frame) |
| | Sends a CAN frame to the bus. More...
|
| |
|
| virtual void | entryAction () |
| | Called once at the beginning of the thread running. More...
|
| |
| virtual void | exitAction () |
| | Called once when thread is commanded to stop. More...
|
| |
|
void | checkSuspend () |
| | Blocks the thread from a pause() call until resume() is called.
|
| |
| bool | start () |
| | Starts the internal thread method. More...
|
| |
| void | stop () |
| | Stops the internal thread method. More...
|
| |
|
void | WaitForInternalThreadToExit () |
| | Will wait until the thread has finished.
|
| |
| int | lock () |
| | Performs a mutual exclusion lock. Will halt if locked by another thread, and will resume when the other thread performs an unlock. More...
|
| |
| int | unlock () |
| | Performs a mutual exclusion unlock. Will allow other threads that have been locked to resume. More...
|
| |
| void | pause () |
| | Performs a pause. More...
|
| |
| void | resume () |
| | Resumes the thread from a pause. More...
|
| |
| bool | running () |
| | Returns the state of the thread. More...
|
| |
Protected Member Functions inherited from Panda::UsbListener |
|
virtual void | notificationUartRead (char *buffer, size_t bufferLength) |
| |
|
virtual void | notificationUartWrite () |
| |
|
virtual void | notificationCanWrite () |
| |
A class that handles the CAN data.
This class interfaces with a Panda::Usb class to handle the polling of the vehicle CAN bus
Adds and Observer for updates on successful parsed CAN packets.
- Parameters
-
| listener | The observer for fresh CAN data. |
| void Panda::Can::removeObserver |
( |
CanListener * |
listener | ) |
|
Removes an Observer that was previously added.
- Parameters
-
| listener | The observer to be removed from notifications. |
| void Panda::Can::saveToCsvFile |
( |
const char * |
filename | ) |
|
Saves CANBus data to a file in CSV format. This is after parsing raw data into CanFrames, in a more readable format.
- Parameters
-
| filename | The filename and path for data to be saved. |
| void Panda::Can::saveToFile |
( |
const char * |
filename | ) |
|
Saves raw CANBus data to a file. More correctly, this saves data read by the Panda USB interface to file.
- Parameters
-
| filename | The filename and path for data to be saved. |
| void Panda::Can::sendMessage |
( |
CanFrame & |
frame | ) |
|
Sends a CAN frame to the bus.
- Parameters
-
| frame | The frame, with data, to be sent |
| void Panda::Can::setUsb |
( |
Panda::Usb * |
usbHandler | ) |
|
Sets the USB handler for CAN UART communication.
- Parameters
-
| usbHandler | The Panda USB handler. |
The documentation for this class was generated from the following file: