fusb_ephandle Class Reference

abstract usb end point handle More...

#include <fusb.h>

Inheritance diagram for fusb_ephandle:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 fusb_ephandle (int endpoint, bool input_p, int block_size=0, int nblocks=0)
virtual ~fusb_ephandle ()
virtual bool start ()=0
 begin streaming i/o
virtual bool stop ()=0
 stop streaming i/o
virtual int write (const void *buffer, int nbytes)=0
virtual int read (void *buffer, int nbytes)=0
virtual void wait_for_completion ()=0
int block_size ()
 returns current block size.

Protected Attributes

int d_endpoint
bool d_input_p
int d_block_size
int d_nblocks
bool d_started


Detailed Description

abstract usb end point handle

Constructor & Destructor Documentation

fusb_ephandle::fusb_ephandle ( int  endpoint,
bool  input_p,
int  block_size = 0,
int  nblocks = 0 
)

virtual fusb_ephandle::~fusb_ephandle (  )  [virtual]


Member Function Documentation

int fusb_ephandle::block_size (  )  [inline]

returns current block size.

References d_block_size.

virtual int fusb_ephandle::read ( void *  buffer,
int  nbytes 
) [pure virtual]

Returns:
number of bytes read or -1 if error. number of bytes read will be <= nbytes. Will block if no input available.

Implemented in fusb_ephandle_darwin, fusb_ephandle_generic, fusb_ephandle_linux, fusb_ephandle_ra_wb, and fusb_ephandle_win32.

virtual bool fusb_ephandle::start (  )  [pure virtual]

virtual bool fusb_ephandle::stop (  )  [pure virtual]

virtual void fusb_ephandle::wait_for_completion (  )  [pure virtual]

virtual int fusb_ephandle::write ( const void *  buffer,
int  nbytes 
) [pure virtual]

Returns:
nbytes if write was successfully enqueued, else -1. Will block if no free buffers available.

Implemented in fusb_ephandle_darwin, fusb_ephandle_generic, fusb_ephandle_linux, fusb_ephandle_ra_wb, and fusb_ephandle_win32.


Member Data Documentation

int fusb_ephandle::d_block_size [protected]

Referenced by block_size().

int fusb_ephandle::d_endpoint [protected]

bool fusb_ephandle::d_input_p [protected]

int fusb_ephandle::d_nblocks [protected]

bool fusb_ephandle::d_started [protected]


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

Generated on Thu Mar 5 09:02:24 2009 for GNU Radio 3.1.3 by  doxygen 1.5.8