rx_buffer Struct Reference


Data Fields

unsigned char * buffer
unsigned char * readptr [MOST_SYNC_OPENS]
unsigned int reader_count
unsigned char * writeptr
unsigned int frame_count
unsigned int bytes_per_frame

Detailed Description

Receive buffer for MOST, implemented as ringbuffer. The buffer is one large buffer. It contains the complete MOST frames as passed by the PCI card without the unused quadlets, i.e. exactly as they are needed in the interrupt service routine to place them in the alternating buffer.

The processes (read syscall) read the contents from this ring buffer. As this happen asynchronously, there's a read pointer for each reader which points to the frame which should be read next (to the beginning of the frame).

There's no need to determine the number of full/empty frames in the interrupt service routine, it just overwrites old frames. The processes read garbage then.

Definition at line 61 of file most-rxbuf.h.


Field Documentation

unsigned char* rx_buffer::buffer

the ring buffer

Definition at line 62 of file most-rxbuf.h.

Referenced by measuring_receive_isr_start(), rxbuf_alloc(), rxbuf_free(), rxbuf_get(), and rxbuf_put().

unsigned char* rx_buffer::readptr[MOST_SYNC_OPENS]

The read pointers. Points to the first byte of the quadlet which should be read next.

Definition at line 63 of file most-rxbuf.h.

Referenced by rxbuf_alloc(), rxbuf_get(), and rxbuf_is_empty().

unsigned int rx_buffer::reader_count

number of readers

Definition at line 66 of file most-rxbuf.h.

Referenced by rxbuf_alloc().

unsigned char* rx_buffer::writeptr

the write pointer

Definition at line 67 of file most-rxbuf.h.

Referenced by rxbuf_alloc(), rxbuf_get(), rxbuf_is_empty(), and rxbuf_put().

unsigned int rx_buffer::frame_count

number of maximum frames in the ring

Definition at line 68 of file most-rxbuf.h.

Referenced by rxbuf_alloc(), rxbuf_get(), and rxbuf_put().

unsigned int rx_buffer::bytes_per_frame

number of quadlets per frame

Definition at line 70 of file most-rxbuf.h.

Referenced by rxbuf_alloc(), rxbuf_get(), and rxbuf_put().


The documentation for this struct was generated from the following file:
Generated on Fri Mar 9 14:48:58 2007 for MOST Linux Drivers (Linux and RTAI) by  doxygen 1.5.0