|
dxd - dynax driver framework 3.0.1d223
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 | |
| bool | anchor (const circular &circular) |
| the position against the transport's index, every cycle: false where the client stands | |
| operator bool () const | |
| void | unanchor () |
Static Public Member Functions | |
| static uint64_t | bytes (uint32_t ticks, uint32_t interval, uint64_t linesize) |
| a safety offset in bytes: ticks of the transport's interval (samples), in lines of the ring's format | |
| template<typename stream_t> | |
| static uint32_t | ticks (const stream_t &stream, direction::direction direction, uint32_t out, uint32_t in, uint32_t block) |
| the margin ticks a host answers a client of a stream: behind a transport writer a reader trails the client writers' cycle, which a bidirectional stream alone carries | |
Public Attributes | |
| bool | anchored {} |
| uint64_t | block {} |
| one cycle's move: a client trails a transport writer by a whole one | |
| uint64_t | margin {} |
| the client's safety offset to the transport | |
| uint64_t | position {} |
| the client's index into the ring | |
| direction::direction | transport {direction::none} |
| the stream's transport: in writes the ring at tx, out reads it at rx | |
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: a transport writer's tx, a transport reader's rx; the other index hangs. A client keeps its own position beside them, anchored to the transport's index by its margin: behind a writer's tx by a whole block more, so its own cycle never reaches the transport's; ahead of a reader's rx. Client writers mix at their positions, tx staying the high-water of all writers; client readers read at theirs and publish nothing. A client moves only as the transport moves: every cycle it checks its position against the transport's index - it stands, without access, where the transport moved no block since, and anchors afresh where it fell behind the transport's reach or at the session's start. Margin and block are bytes in the ring's format, cached out of the tick, the transport the stream's from its desc.
|
inline |
the position against the transport's index, every cycle: false where the client stands
|
inlinestatic |
a safety offset in bytes: ticks of the transport's interval (samples), in lines of the ring's format
|
inlineexplicit |
|
inlinestatic |
the margin ticks a host answers a client of a stream: behind a transport writer a reader trails the client writers' cycle, which a bidirectional stream alone carries
|
inline |
| bool dx::stream::cursor::anchored {} |
the position is anchored to the transport's index
| uint64_t dx::stream::cursor::block {} |
one cycle's move: a client trails a transport writer by a whole one
| uint64_t dx::stream::cursor::margin {} |
the client's safety offset to the transport
| uint64_t dx::stream::cursor::position {} |
the client's index into the ring
| direction::direction dx::stream::cursor::transport {direction::none} |
the stream's transport: in writes the ring at tx, out reads it at rx
| (c) copyright 2009 dynamic acoustics e.U. | generated on |