Public Member Functions | Private Member Functions | Private Attributes
puma_motor_driver::SerialGateway Class Reference

#include <serial_gateway.h>

Inheritance diagram for puma_motor_driver::SerialGateway:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual bool connect ()
virtual bool isConnected ()
virtual void queue (const Message &msg)
virtual bool recv (Message *msg)
virtual bool sendAllQueued ()
 SerialGateway (serial::Serial &serial)

Private Member Functions

void encodeAndQueue (const uint8_t *data, uint8_t len)
void queue (uint8_t ch)
bool read (uint8_t *ch)
bool readAndDecode (uint8_t *data, uint8_t len)

Private Attributes

uint8_t read_buffer_ [1024]
uint16_t read_buffer_index_
uint16_t read_buffer_len_
serial::Serialserial_
uint8_t write_buffer_ [1024]
uint16_t write_buffer_index_

Detailed Description

Definition at line 35 of file serial_gateway.h.


Constructor & Destructor Documentation

Definition at line 31 of file serial_gateway.cpp.


Member Function Documentation

Implements puma_motor_driver::Gateway.

Definition at line 39 of file serial_gateway.cpp.

void puma_motor_driver::SerialGateway::encodeAndQueue ( const uint8_t *  data,
uint8_t  len 
) [private]

Definition at line 184 of file serial_gateway.cpp.

Implements puma_motor_driver::Gateway.

Definition at line 57 of file serial_gateway.cpp.

void puma_motor_driver::SerialGateway::queue ( const Message msg) [virtual]

Queue specified message to be sent on the bus.

Implements puma_motor_driver::Gateway.

Definition at line 62 of file serial_gateway.cpp.

void puma_motor_driver::SerialGateway::queue ( uint8_t  ch) [private]

Definition at line 128 of file serial_gateway.cpp.

bool puma_motor_driver::SerialGateway::read ( uint8_t *  ch) [private]

Definition at line 137 of file serial_gateway.cpp.

bool puma_motor_driver::SerialGateway::readAndDecode ( uint8_t *  data,
uint8_t  len 
) [private]

Definition at line 204 of file serial_gateway.cpp.

Receive the next available message from the bus, blocking for timeout_millis if nonzero.

Returns:
True if a message was returned false if timeout occurred.

Implements puma_motor_driver::Gateway.

Definition at line 73 of file serial_gateway.cpp.

Send the queued messages on the bus.

Implements puma_motor_driver::Gateway.

Definition at line 159 of file serial_gateway.cpp.


Member Data Documentation

Definition at line 59 of file serial_gateway.h.

Definition at line 60 of file serial_gateway.h.

Definition at line 61 of file serial_gateway.h.

Definition at line 48 of file serial_gateway.h.

Definition at line 56 of file serial_gateway.h.

Definition at line 57 of file serial_gateway.h.


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


puma_motor_driver
Author(s):
autogenerated on Sat Jun 8 2019 18:55:15