dxd - dynax driver framework 3.0.0d222
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::stream::cursor Struct Reference

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

Detailed Description

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.

Member Function Documentation

◆ operator bool()

dx::stream::cursor::operator bool ( ) const
inlineexplicit

◆ published()

void dx::stream::cursor::published ( circular & ring)
inline

the reader tells the writer how far the ring is read

Here is the call graph for this function:

◆ seat()

bool dx::stream::cursor::seat ( const circular & ring,
direction::direction direction )
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

◆ unseat()

void dx::stream::cursor::unseat ( )
inline

Member Data Documentation

◆ block

uint64_t dx::stream::cursor::block {}

one cycle's move: an in client trails by a whole one, so no cycle straddles its seat

◆ margin

uint64_t dx::stream::cursor::margin {}

the client's safety offset to the transport

◆ position

volatile uint64_t dx::stream::cursor::position {}

the client's index into the ring; 0: unseated


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

(c) copyright 2009 dynamic acoustics e.U. generated on

a closed source license may be obtained by requesting a written permission from dynamic acoustics e.U.
however - governmental use generally and military use especially is strictly prohibited though.