33 #include "mogi/thread.h" 35 #include "panda/usb.h" 36 #include "panda/candata.h" 67 std::vector<int> blacklistBus;
68 std::vector<int> blacklistId;
78 void newDataNotificationProxy(
CanFrame* canFrame);
114 void saveToFile(
const char* filename);
120 void saveToCsvFile(
const char* filename);
150 void sendMessage(
CanFrame& frame );
153 bool currentlyReceiving =
false;
155 std::list<CanFrame> canFrames;
157 std::vector<CanListener*> listeners;
158 Usb* usbHandler = NULL;
163 void writeCsvToFile(
CanFrame* frame,
unsigned char* buffer,
int bufLength);
164 void writeRawToFile(
char* buffer,
size_t length);
167 void notificationCanRead(
char* buffer,
size_t bufferLength);
Handles USB communication and parsing with a comma.ai Panda.
Definition: can.h:38
An abstract class for new data notifications for new CAN data.
Definition: can.h:63
void canFrameToBuffer(CanFrame &frame, unsigned char *buffer)
Converts a CanFrame into a buffer for sending to the Panda.
void addToBlacklistBus(const int &busToBlock)
Adds a BUS number to the blacklist.
void addToBlacklistMessageId(const int &idToBlock)
Adds a message ID number to the blacklist.
Abstract class, handles a single thread. Features mutual exclusion and pause/resume.
Definition: thread.h:27
CanFrame bufferToCanFrame(char *buffer, int bufferLength)
Converts a buffer from Panda to CanFrame data.
A class that handles the CAN data.
Definition: can.h:103
virtual void newDataNotification(CanFrame *canFrame)=0
Called on a successful RMC message parse Overload this to get instant updates form freshly parsed CAN...