iCub-main
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
EsdResources Class Reference

Public Types

enum  {
  ESD_TIMEOUT = 20 ,
  ESD_POLLING_INTERVAL = 10
}
 

Public Member Functions

 EsdResources ()
 
 ~EsdResources ()
 
bool initialize (const EsdMessageSnifferParameters &parms)
 
bool uninitialize (void)
 
bool read (void)
 
bool error (const CMSG &m)
 
bool startPacket (void)
 
bool addMessage (int msg_id, int joint)
 
bool writePacket (void)
 
bool printMessage (const CMSG &m)
 
bool dumpBuffers (void)
 
int getJoints (void) const
 
bool getErrorStatus (void) const
 

Public Attributes

HANDLE _handle
 
int _timeout
 the actual ddriver handle.
 
int _polling_interval
 this is my thread timeout.
 
int _speed
 thread polling interval.
 
int _networkN
 speed of the bus.
 
long int _txQueueSize
 network number.
 
long int _rxQueueSize
 
long int _txTimeout
 
long int _rxTimeout
 
int _readMessages
 
int _msg_lost
 size of the last read buffer.
 
CMSG _readBuffer [BUF_SIZE]
 
int _writeMessages
 read buffer.
 
CMSG _writeBuffer [BUF_SIZE]
 size of the write packet.
 
CMSG _replyBuffer [BUF_SIZE]
 write buffer.
 
BCastBufferElement_bcastRecvBuffer
 reply buffer.
 
unsigned char _my_address
 local storage for bcast messages.
 
unsigned char _destinations [ESD_MAX_CARDS]
 
int _njoints
 list of connected cards (and their addresses).
 
bool _error_status
 number of joints (ncards * 2).
 
PV _p
 error status of the last packet (true = error).
 
char _printBuffer [16384]
 pointer to a printf type function used to spy on can messages.
 

Detailed Description

Definition at line 120 of file EsdMessageSniffer.cpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
ESD_TIMEOUT 
ESD_POLLING_INTERVAL 

Definition at line 139 of file EsdMessageSniffer.cpp.

Constructor & Destructor Documentation

◆ EsdResources()

EsdResources::EsdResources ( )

default 1Mbit/s

Definition at line 174 of file EsdMessageSniffer.cpp.

◆ ~EsdResources()

EsdResources::~EsdResources ( )

Definition at line 199 of file EsdMessageSniffer.cpp.

Member Function Documentation

◆ addMessage()

bool EsdResources::addMessage ( int  msg_id,
int  joint 
)

Definition at line 305 of file EsdMessageSniffer.cpp.

◆ dumpBuffers()

bool EsdResources::dumpBuffers ( void  )

dump the error.

Definition at line 374 of file EsdMessageSniffer.cpp.

◆ error()

bool EsdResources::error ( const CMSG &  m)

Definition at line 397 of file EsdMessageSniffer.cpp.

◆ getErrorStatus()

bool EsdResources::getErrorStatus ( void  ) const
inline

Definition at line 136 of file EsdMessageSniffer.cpp.

◆ getJoints()

int EsdResources::getJoints ( void  ) const
inline

Definition at line 135 of file EsdMessageSniffer.cpp.

◆ initialize()

bool EsdResources::initialize ( const EsdMessageSnifferParameters parms)

general variable init.

default 1Mbit/s

clean up buffers.

open the device.

sets all message ID's for class 0 and 1.

Definition at line 204 of file EsdMessageSniffer.cpp.

◆ printMessage()

bool EsdResources::printMessage ( const CMSG &  m)

Definition at line 342 of file EsdMessageSniffer.cpp.

◆ read()

bool EsdResources::read ( void  )

Definition at line 283 of file EsdMessageSniffer.cpp.

◆ startPacket()

bool EsdResources::startPacket ( void  )

Definition at line 299 of file EsdMessageSniffer.cpp.

◆ uninitialize()

bool EsdResources::uninitialize ( void  )

Definition at line 263 of file EsdMessageSniffer.cpp.

◆ writePacket()

bool EsdResources::writePacket ( void  )

Definition at line 324 of file EsdMessageSniffer.cpp.

Member Data Documentation

◆ _bcastRecvBuffer

BCastBufferElement* EsdResources::_bcastRecvBuffer

reply buffer.

Definition at line 160 of file EsdMessageSniffer.cpp.

◆ _destinations

unsigned char EsdResources::_destinations[ESD_MAX_CARDS]

Definition at line 163 of file EsdMessageSniffer.cpp.

◆ _error_status

bool EsdResources::_error_status

number of joints (ncards * 2).

Definition at line 166 of file EsdMessageSniffer.cpp.

◆ _handle

HANDLE EsdResources::_handle

Definition at line 141 of file EsdMessageSniffer.cpp.

◆ _msg_lost

int EsdResources::_msg_lost

size of the last read buffer.

Definition at line 154 of file EsdMessageSniffer.cpp.

◆ _my_address

unsigned char EsdResources::_my_address

local storage for bcast messages.

Definition at line 162 of file EsdMessageSniffer.cpp.

◆ _networkN

int EsdResources::_networkN

speed of the bus.

Definition at line 146 of file EsdMessageSniffer.cpp.

◆ _njoints

int EsdResources::_njoints

list of connected cards (and their addresses).

Definition at line 164 of file EsdMessageSniffer.cpp.

◆ _p

PV EsdResources::_p

error status of the last packet (true = error).

Definition at line 168 of file EsdMessageSniffer.cpp.

◆ _polling_interval

int EsdResources::_polling_interval

this is my thread timeout.

Definition at line 144 of file EsdMessageSniffer.cpp.

◆ _printBuffer

char EsdResources::_printBuffer[16384]

pointer to a printf type function used to spy on can messages.

Definition at line 171 of file EsdMessageSniffer.cpp.

◆ _readBuffer

CMSG EsdResources::_readBuffer[BUF_SIZE]

of lost messages.

Definition at line 155 of file EsdMessageSniffer.cpp.

◆ _readMessages

int EsdResources::_readMessages

Definition at line 153 of file EsdMessageSniffer.cpp.

◆ _replyBuffer

CMSG EsdResources::_replyBuffer[BUF_SIZE]

write buffer.

Definition at line 158 of file EsdMessageSniffer.cpp.

◆ _rxQueueSize

long int EsdResources::_rxQueueSize

Definition at line 149 of file EsdMessageSniffer.cpp.

◆ _rxTimeout

long int EsdResources::_rxTimeout

Definition at line 151 of file EsdMessageSniffer.cpp.

◆ _speed

int EsdResources::_speed

thread polling interval.

Definition at line 145 of file EsdMessageSniffer.cpp.

◆ _timeout

int EsdResources::_timeout

the actual ddriver handle.

Definition at line 142 of file EsdMessageSniffer.cpp.

◆ _txQueueSize

long int EsdResources::_txQueueSize

network number.

Definition at line 148 of file EsdMessageSniffer.cpp.

◆ _txTimeout

long int EsdResources::_txTimeout

Definition at line 150 of file EsdMessageSniffer.cpp.

◆ _writeBuffer

CMSG EsdResources::_writeBuffer[BUF_SIZE]

size of the write packet.

Definition at line 157 of file EsdMessageSniffer.cpp.

◆ _writeMessages

int EsdResources::_writeMessages

read buffer.

Definition at line 156 of file EsdMessageSniffer.cpp.


The documentation for this class was generated from the following file: