dxd - dynax driver framework 3.0.1d223
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

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

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: 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.

Member Function Documentation

◆ anchor()

bool dx::stream::cursor::anchor ( const circular & circular)
inline

the position against the transport's index, every cycle: false where the client stands

◆ bytes()

uint64_t dx::stream::cursor::bytes ( uint32_t ticks,
uint32_t interval,
uint64_t linesize )
inlinestatic

a safety offset in bytes: ticks of the transport's interval (samples), in lines of the ring's format

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator bool()

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

◆ ticks()

template<typename stream_t>
uint32_t dx::stream::cursor::ticks ( const stream_t & stream,
direction::direction direction,
uint32_t out,
uint32_t in,
uint32_t block )
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

Here is the caller graph for this function:

◆ unanchor()

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

Member Data Documentation

◆ anchored

bool dx::stream::cursor::anchored {}

the position is anchored to the transport's index

◆ block

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

one cycle's move: a client trails a transport writer by a whole one

◆ margin

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

the client's safety offset to the transport

◆ position

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

the client's index into the ring

◆ transport

direction::direction dx::stream::cursor::transport {direction::none}

the stream's transport: in writes the ring at tx, out reads it at rx


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.