|
dxd - dynax driver framework 3.0.0d222
cross platform open source driver development framework
|
a client's own place in a ring and the margin it keeps to the transport More...
#include <dx_stream.h>
Public Member Functions | |
| operator bool () const | |
| void | published (circular &ring) |
| the reader tells the writer how far the ring is read | |
| bool | seat (const circular &ring, direction::direction direction) |
| out: leads the reader by the margin; in: trails the writer by a whole block and the margin, which the ring has to carry | |
| void | unseat () |
Public Attributes | |
| uint64_t | block {} |
| uint64_t | margin {} |
| the client's safety offset to the transport | |
| volatile uint64_t | position {} |
| the client's index into the ring; 0: unseated | |
a client's own place in a ring and the margin it keeps to the transport
The ring's shared indices are the transport's: rx of an out ring its reader's, tx of an in ring its writer's. A client keeps its own position beside them - an out client writes at it, leading the reader by its margin, so tx stays the high-water of all writers; an in client reads at it, trailing the writer by a whole block and its margin, and publishes it to rx, the writer's flow control. Seated against the ring's live indices, unseated where an access missed and at the session's end, so the next cycle seats it again. An in cursor takes a seat only once the ring carries a whole block and the margin: until then its client has nothing to read and takes silence. Margin and block are bytes in the ring's format, cached out of the tick.
|
inlineexplicit |
|
inline |
the reader tells the writer how far the ring is read
|
inline |
out: leads the reader by the margin; in: trails the writer by a whole block and the margin, which the ring has to carry
|
inline |
| uint64_t dx::stream::cursor::block {} |
one cycle's move: an in client trails by a whole one, so no cycle straddles its seat
| uint64_t dx::stream::cursor::margin {} |
the client's safety offset to the transport
| volatile uint64_t dx::stream::cursor::position {} |
the client's index into the ring; 0: unseated
| (c) copyright 2009 dynamic acoustics e.U. | generated on |