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 |
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.
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 |
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().