Skip to content
Snippets Groups Projects

Changed the name of the get_num_bytes() function to get_num_data().

Merged Sergi Hernandez requested to merge can_devel into master
6 files
+ 88
98
Compare changes
  • Side-by-side
  • Inline
Files
6
+ 17
4
@@ -12,11 +12,13 @@
#include <linux/can.h>
#include <linux/can/bcm.h>
#include <linux/can/raw.h>
#include <map>
#include <linux/sockios.h>
#include "threadserver.h"
#include "eventserver.h"
#include <queue>
#include "cqueue.h"
/**
* \brief CAN driver
@@ -44,6 +46,9 @@ class CCAN : protected CComm
struct can_filter *rx_filters;
int num_filters;
CMutex can_access;
// map of ID/data pair
std::map<unsigned int, CQueue *> can_data_map;
std::map<unsigned int, std::string> can_event_map;
protected:
/**
* \brief Function to actually open the device
@@ -204,6 +209,10 @@ class CCAN : protected CComm
* \brief
*/
std::string get_new_frame_event_id(void);
/**
* \brief
*/
std::string get_new_frame_event_id(unsigned int can_id);
/**
* \brief
*/
@@ -223,23 +232,27 @@ class CCAN : protected CComm
/**
* \brief
*/
void write_frame(unsigned int can_id, unsigned char *data, int len);
void write(unsigned int can_id, unsigned char *data, int len);
/**
* \brief
*/
void read_frame(unsigned int *can_id, unsigned char *data, int *len);
void read(unsigned int can_id, unsigned char *data, int len);
/**
* \brief
*/
unsigned int get_num_data(unsigned int can_id);
/**
* \brief
*/
void request_frame(unsigned int can_id, int len);
/**
* \brief
*/
void add_id_filter(unsigned short int can_id,bool invert);
std::string add_id_filter(unsigned short int can_id);
/**
* \brief
*/
void add_id_filter(unsigned short int can_id, unsigned short int mask,bool invert);
std::string add_id_filter(unsigned short int can_id, unsigned short int mask);
/**
* \brief
*/
Loading