iCub-main
|
Public Types | |
enum | { CAN_TIMEOUT = 20 , CAN_POLLING_INTERVAL = 10 } |
Public Member Functions | |
CanBusResources () | |
~CanBusResources () | |
bool | initialize (const CanBusMotionControlParameters &parms) |
bool | initialize (yarp::os::Searchable &config) |
bool | uninitialize () |
bool | read () |
bool | startPacket () |
bool | addMessage (int msg_id, int joint) |
bool | addMessage (int id, int joint, int msg_id) |
bool | writePacket () |
bool | printMessage (const CanMessage &m) |
bool | dumpBuffers (void) |
int | getJoints (void) const |
bool | getErrorStatus (void) const |
void | printMessage (const char *fmt,...) |
Public Attributes | |
ICanBus * | iCanBus |
ICanBufferFactory * | iBufferFactory |
ICanBusErrors * | iCanErrors |
char | buffer [DEBUG_PRINTF_BUFFER_LENGTH] |
bool | _initialized |
unsigned int | _timeout |
int | _polling_interval |
this is my thread timeout. More... | |
int | _speed |
thread polling interval. More... | |
int | _networkN |
speed of the bus. More... | |
int | _txQueueSize |
network number. More... | |
int | _rxQueueSize |
int | _txTimeout |
int | _rxTimeout |
unsigned int | _readMessages |
unsigned int | _writeMessages |
size of the last read buffer. More... | |
unsigned int | _echoMessages |
size of the write packet. More... | |
CanBuffer | _readBuffer |
size of the last read buffer. More... | |
CanBuffer | _writeBuffer |
read buffer. More... | |
CanBuffer | _replyBuffer |
write buffer. More... | |
CanBuffer | _echoBuffer |
reply buffer. More... | |
BCastBufferElement * | _bcastRecvBuffer |
echo buffer. More... | |
unsigned char | _my_address |
local storage for bcast messages. More... | |
unsigned char | _destinations [CAN_MAX_CARDS] |
int | _velShifts [CAN_MAX_CARDS] |
list of connected cards (and their addresses). More... | |
unsigned char * | _destInv |
list of velocity shift More... | |
std::string * | _jointNames |
int | _njoints |
bool | _error_status |
number of joints (ncards * 2). More... | |
int | _filter |
error status of the last packet. More... | |
char | _printBuffer [16384] |
don't print filtered messages. More... | |
RequestsQueue * | requestsQueue |
might be better with dynamic allocation. More... | |
Definition at line 353 of file CanBusMotionControl.cpp.
anonymous enum |
Enumerator | |
---|---|
CAN_TIMEOUT | |
CAN_POLLING_INTERVAL |
Definition at line 400 of file CanBusMotionControl.cpp.
CanBusResources::CanBusResources | ( | ) |
default 1Mbit/s
Definition at line 2030 of file CanBusMotionControl.cpp.
CanBusResources::~CanBusResources | ( | ) |
Definition at line 2059 of file CanBusMotionControl.cpp.
bool CanBusResources::addMessage | ( | int | id, |
int | joint, | ||
int | msg_id | ||
) |
Definition at line 2286 of file CanBusMotionControl.cpp.
bool CanBusResources::addMessage | ( | int | msg_id, |
int | joint | ||
) |
Definition at line 2270 of file CanBusMotionControl.cpp.
bool CanBusResources::dumpBuffers | ( | void | ) |
dump the error.
Definition at line 2365 of file CanBusMotionControl.cpp.
|
inline |
Definition at line 383 of file CanBusMotionControl.cpp.
|
inline |
Definition at line 382 of file CanBusMotionControl.cpp.
bool CanBusResources::initialize | ( | const CanBusMotionControlParameters & | parms | ) |
default 1Mbit/s
Definition at line 2093 of file CanBusMotionControl.cpp.
bool CanBusResources::initialize | ( | yarp::os::Searchable & | config | ) |
Definition at line 2064 of file CanBusMotionControl.cpp.
bool CanBusResources::printMessage | ( | const CanMessage & | m | ) |
Definition at line 2331 of file CanBusMotionControl.cpp.
|
inline |
Definition at line 385 of file CanBusMotionControl.cpp.
bool CanBusResources::read | ( | ) |
Definition at line 2254 of file CanBusMotionControl.cpp.
bool CanBusResources::startPacket | ( | ) |
Definition at line 2264 of file CanBusMotionControl.cpp.
bool CanBusResources::uninitialize | ( | ) |
Definition at line 2212 of file CanBusMotionControl.cpp.
bool CanBusResources::writePacket | ( | ) |
Definition at line 2308 of file CanBusMotionControl.cpp.
BCastBufferElement* CanBusResources::_bcastRecvBuffer |
echo buffer.
Definition at line 424 of file CanBusMotionControl.cpp.
unsigned char CanBusResources::_destinations[CAN_MAX_CARDS] |
Definition at line 427 of file CanBusMotionControl.cpp.
unsigned char* CanBusResources::_destInv |
list of velocity shift
Definition at line 429 of file CanBusMotionControl.cpp.
CanBuffer CanBusResources::_echoBuffer |
reply buffer.
Definition at line 422 of file CanBusMotionControl.cpp.
unsigned int CanBusResources::_echoMessages |
size of the write packet.
Definition at line 417 of file CanBusMotionControl.cpp.
bool CanBusResources::_error_status |
number of joints (ncards * 2).
Definition at line 434 of file CanBusMotionControl.cpp.
int CanBusResources::_filter |
error status of the last packet.
used to spy on can messages.
Definition at line 437 of file CanBusMotionControl.cpp.
bool CanBusResources::_initialized |
Definition at line 403 of file CanBusMotionControl.cpp.
std::string* CanBusResources::_jointNames |
Definition at line 430 of file CanBusMotionControl.cpp.
unsigned char CanBusResources::_my_address |
local storage for bcast messages.
Definition at line 426 of file CanBusMotionControl.cpp.
int CanBusResources::_networkN |
speed of the bus.
Definition at line 408 of file CanBusMotionControl.cpp.
int CanBusResources::_njoints |
Definition at line 432 of file CanBusMotionControl.cpp.
int CanBusResources::_polling_interval |
this is my thread timeout.
Definition at line 406 of file CanBusMotionControl.cpp.
char CanBusResources::_printBuffer[16384] |
don't print filtered messages.
Definition at line 439 of file CanBusMotionControl.cpp.
CanBuffer CanBusResources::_readBuffer |
size of the last read buffer.
Definition at line 419 of file CanBusMotionControl.cpp.
unsigned int CanBusResources::_readMessages |
Definition at line 415 of file CanBusMotionControl.cpp.
CanBuffer CanBusResources::_replyBuffer |
write buffer.
Definition at line 421 of file CanBusMotionControl.cpp.
int CanBusResources::_rxQueueSize |
Definition at line 411 of file CanBusMotionControl.cpp.
int CanBusResources::_rxTimeout |
Definition at line 413 of file CanBusMotionControl.cpp.
int CanBusResources::_speed |
thread polling interval.
Definition at line 407 of file CanBusMotionControl.cpp.
unsigned int CanBusResources::_timeout |
Definition at line 404 of file CanBusMotionControl.cpp.
int CanBusResources::_txQueueSize |
network number.
Definition at line 410 of file CanBusMotionControl.cpp.
int CanBusResources::_txTimeout |
Definition at line 412 of file CanBusMotionControl.cpp.
int CanBusResources::_velShifts[CAN_MAX_CARDS] |
list of connected cards (and their addresses).
Definition at line 428 of file CanBusMotionControl.cpp.
CanBuffer CanBusResources::_writeBuffer |
read buffer.
Definition at line 420 of file CanBusMotionControl.cpp.
unsigned int CanBusResources::_writeMessages |
size of the last read buffer.
Definition at line 416 of file CanBusMotionControl.cpp.
char CanBusResources::buffer[DEBUG_PRINTF_BUFFER_LENGTH] |
Definition at line 398 of file CanBusMotionControl.cpp.
ICanBufferFactory* CanBusResources::iBufferFactory |
Definition at line 362 of file CanBusMotionControl.cpp.
ICanBus* CanBusResources::iCanBus |
Definition at line 361 of file CanBusMotionControl.cpp.
ICanBusErrors* CanBusResources::iCanErrors |
Definition at line 363 of file CanBusMotionControl.cpp.
RequestsQueue* CanBusResources::requestsQueue |
might be better with dynamic allocation.
Definition at line 440 of file CanBusMotionControl.cpp.