22#include <yarp/dev/DeviceDriver.h>
23#include <yarp/dev/CanBusInterface.h>
30#define NTCAN_HANDLE HANDLE
59 memcpy(
msg, tmp.msg,
sizeof(CMSG));
63 virtual unsigned int getId()
const
69 virtual void setLen(
unsigned char len)
72 virtual void setId(
unsigned int id)
75 virtual const unsigned char *
getData()
const
82 {
return (
unsigned char *)
msg; }
85 {
return (
const unsigned char *)
msg; }
107 NTCAN_HANDLE *handle;
115 virtual bool canIdAdd(
unsigned int id);
118 virtual bool canRead(CanBuffer &msgs,
123 virtual bool canWrite(
const CanBuffer &msgs,
129 virtual bool open(yarp::os::Searchable &par);
130 virtual bool close();
virtual void setBuffer(unsigned char *b)
virtual CanMessage & operator=(const CanMessage &l)
virtual const unsigned char * getPointer() const
virtual void setLen(unsigned char len)
virtual unsigned char getLen() const
virtual const unsigned char * getData() const
virtual unsigned int getId() const
virtual unsigned char * getData()
virtual unsigned char * getPointer()
virtual void setId(unsigned int id)
ecan : implements yarp::dev::ICanBus for a esd can bus board.
virtual bool canGetBaudRate(unsigned int *rate)
virtual bool canIdDelete(unsigned int id)
virtual bool canWrite(const CanBuffer &msgs, unsigned int size, unsigned int *sent, bool wait=false)
virtual bool open(yarp::os::Searchable &par)
virtual bool canSetBaudRate(unsigned int rate)
virtual bool canIdAdd(unsigned int id)
virtual bool canRead(CanBuffer &msgs, unsigned int size, unsigned int *read, bool wait=false)
Copyright (C) 2008 RobotCub Consortium.