Public Member Functions | Private Member Functions | Private Attributes
milvus::UsbComm Class Reference

#include <usb_comm.h>

List of all members.

Public Member Functions

int close_device ()
int open_device (uint16_t vendor_id, uint16_t product_id, int ep_in_addr, int ep_out_addr)
int read_bytes (unsigned char *, int)
 UsbComm ()
 Constructor.
int write_bytes (unsigned char *, int)
 ~UsbComm ()
 Destructor.

Private Member Functions

void print_array (uint8_t *buf, int length)
 Device handle.

Private Attributes

int baud_
 Baud rate.
struct libusb_device_handle * devh
int ep_in_addr_
int ep_out_addr_
int error
std::string port_name_

Detailed Description

Definition at line 13 of file usb_comm.h.


Constructor & Destructor Documentation

Constructor.

Definition at line 10 of file usb_comm.cpp.

Destructor.

Definition at line 15 of file usb_comm.cpp.


Member Function Documentation

Definition at line 73 of file usb_comm.cpp.

int milvus::UsbComm::open_device ( uint16_t  vendor_id,
uint16_t  product_id,
int  ep_in_addr,
int  ep_out_addr 
)

Definition at line 19 of file usb_comm.cpp.

void milvus::UsbComm::print_array ( uint8_t *  buf,
int  length 
) [private]

Device handle.

Definition at line 117 of file usb_comm.cpp.

int milvus::UsbComm::read_bytes ( unsigned char *  buf,
int  size 
)

Definition at line 84 of file usb_comm.cpp.

int milvus::UsbComm::write_bytes ( unsigned char *  buf,
int  size 
)

Definition at line 104 of file usb_comm.cpp.


Member Data Documentation

int milvus::UsbComm::baud_ [private]

Baud rate.

Definition at line 34 of file usb_comm.h.

struct libusb_device_handle* milvus::UsbComm::devh [private]

Definition at line 30 of file usb_comm.h.

Definition at line 31 of file usb_comm.h.

Definition at line 32 of file usb_comm.h.

int milvus::UsbComm::error [private]

Definition at line 36 of file usb_comm.h.

std::string milvus::UsbComm::port_name_ [private]

Definition at line 35 of file usb_comm.h.


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


mrp2_hardware
Author(s): Akif Hacinecipoglu
autogenerated on Thu Jun 6 2019 21:43:37