dxd - dynax driver framework 3.0.1d223
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::stream::shared::stream< device_t, circular_t, super_stream_t, event_t > Class Template Reference

a stream whose ring and events live in named shared memory, so another process attaches to them by name - the host sizes and resets the ring, a hosted device takes what it finds (device_t::hosted) More...

#include <dx_stream_shared_stream.h>

Inheritance diagram for dx::stream::shared::stream< device_t, circular_t, super_stream_t, event_t >:
Collaboration diagram for dx::stream::shared::stream< device_t, circular_t, super_stream_t, event_t >:

Public Member Functions

 stream (device_t &device, const decltype(super::id)&id, const super::desc &desc)
 ~stream () override
 the session is each class's own conclude()'s to end, dx::stream::stream's for this one; a derived pipe has freed its ring by now

Public Attributes

const std::string uid

Protected Types

typedef dx::shared::memory< circular_t > memory

Protected Member Functions

void alloc (size_t size, bool free=true) override
 catch (...)
void free () noexcept override
reference & initialize (const std::string &name)
memory & initialize (const std::string &name, uint32_t version, size_t size=0)
reference & initialize (const std::string &name)
 operator bool () const noexcept
 true if this shared memory is currently in use by some process - a cheap, non-destructive existence probe (shm_open without O_CREAT, then immediately close) that neither maps nor creates anything itself.
 operator const os_event () const noexcept
 operator const os_event () const noexcept
 operator const os_event () const noexcept
 operator const os_event () const noexcept
 operator dx::circular & ()
 operator dx::circular & ()
 operator dx::circular * ()
 operator dx::circular * ()
 operator os_event () noexcept
 operator os_event () noexcept
 operator os_event () noexcept
 operator os_event () noexcept
 operator struct ::stat ()
dx::circular & operator* ()
dx::circular * operator-> ()
 operator::HANDLE () const noexcept
 operator::HANDLE () const noexcept
 operator::HANDLE () const noexcept
 operator::HANDLE () const noexcept
bool release () noexcept
 releases this hold
bool release () noexcept
 releases this hold
bool release () noexcept
 releases this hold
bool release () noexcept
 releases this hold
size_t size () const

Static Protected Member Functions

static bool exists (const std::string &name) noexcept
 the same probe on a name alone, for a side that must attach to another's segment rather than create one
static std::string path (const std::string &name)
 the name a segment carries in the system: the uid, hashed where it exceeds what a shared memory name takes

Protected Attributes

bool joined
 true if initialize() found another holder already present, false if this was the first
bool joined {}
 true if initialize() found another holder already present, false if this was the first
::HANDLE process
::HANDLE process
::HANDLE process
::HANDLE process

Detailed Description

template<typename device_t, typename circular_t = dx::circular, typename super_stream_t = dx::stream::control<dx::stream::object<device_t>>, typename event_t = dx::shared::event>
class dx::stream::shared::stream< device_t, circular_t, super_stream_t, event_t >

a stream whose ring and events live in named shared memory, so another process attaches to them by name - the host sizes and resets the ring, a hosted device takes what it finds (device_t::hosted)

Member Typedef Documentation

◆ memory

template<typename device_t, typename circular_t = dx::circular, typename super_stream_t = dx::stream::control<dx::stream::object<device_t>>, typename event_t = dx::shared::event>
typedef dx::shared::memory<circular_t> dx::stream::shared::stream< device_t, circular_t, super_stream_t, event_t >::memory
protected

Constructor & Destructor Documentation

◆ stream()

template<typename device_t, typename circular_t = dx::circular, typename super_stream_t = dx::stream::control<dx::stream::object<device_t>>, typename event_t = dx::shared::event>
dx::stream::shared::stream< device_t, circular_t, super_stream_t, event_t >::stream ( device_t & device,
const decltype(super::id)& id,
const super::desc & desc )
inline

◆ ~stream()

template<typename device_t, typename circular_t = dx::circular, typename super_stream_t = dx::stream::control<dx::stream::object<device_t>>, typename event_t = dx::shared::event>
dx::stream::shared::stream< device_t, circular_t, super_stream_t, event_t >::~stream ( )
inlineoverride

the session is each class's own conclude()'s to end, dx::stream::stream's for this one; a derived pipe has freed its ring by now

Member Function Documentation

◆ alloc()

template<typename device_t, typename circular_t = dx::circular, typename super_stream_t = dx::stream::control<dx::stream::object<device_t>>, typename event_t = dx::shared::event>
void dx::stream::shared::stream< device_t, circular_t, super_stream_t, event_t >::alloc ( size_t size,
bool free = true )
inlineoverrideprotected

< a hosted stream attaches to its host's ring: creating one here would be an empty segment the host never sized

◆ catch()

dx::shared::memory< dx::circular >::catch ( ...)
inlineinherited

◆ exists()

bool dx::shared::memory< dx::circular >::exists ( const std::string & name)
inlinestaticnoexceptinherited

the same probe on a name alone, for a side that must attach to another's segment rather than create one

◆ free()

template<typename device_t, typename circular_t = dx::circular, typename super_stream_t = dx::stream::control<dx::stream::object<device_t>>, typename event_t = dx::shared::event>
void dx::stream::shared::stream< device_t, circular_t, super_stream_t, event_t >::free ( )
inlineoverrideprotectedvirtualnoexcept

◆ initialize() [1/3]

reference & dx::shared::reference::initialize ( const std::string & name)
inlineinherited

◆ initialize() [2/3]

memory & dx::shared::memory< dx::circular >::initialize ( const std::string & name,
uint32_t version,
size_t size = 0 )
inlineinherited

◆ initialize() [3/3]

reference & dx::shared::reference::initialize ( const std::string & name)
inlineinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator bool()

dx::shared::memory< dx::circular >::operator bool ( ) const
inlinenoexceptinherited

true if this shared memory is currently in use by some process - a cheap, non-destructive existence probe (shm_open without O_CREAT, then immediately close) that neither maps nor creates anything itself.

◆ operator const os_event() [1/4]

dx::resource< invalid_t >::operator const os_event ( ) const
inlinenoexceptinherited

◆ operator const os_event() [2/4]

dx::resource< invalid_t >::operator const os_event ( ) const
inlinenoexceptinherited

◆ operator const os_event() [3/4]

dx::resource< invalid_t >::operator const os_event ( ) const
inlinenoexceptinherited

◆ operator const os_event() [4/4]

dx::resource< invalid_t >::operator const os_event ( ) const
inlinenoexceptinherited

◆ operator dx::circular &() [1/2]

dx::shared::memory< dx::circular >::operator dx::circular & ( )
inlineinherited

◆ operator dx::circular &() [2/2]

dx::shared::memory< dx::circular >::operator dx::circular & ( )
inlineinherited

◆ operator dx::circular *() [1/2]

dx::shared::memory< dx::circular >::operator dx::circular * ( )
inlineexplicitinherited

◆ operator dx::circular *() [2/2]

dx::shared::memory< dx::circular >::operator dx::circular * ( )
inlineexplicitinherited

◆ operator os_event() [1/4]

dx::resource< invalid_t >::operator os_event ( )
inlinenoexceptinherited

◆ operator os_event() [2/4]

dx::resource< invalid_t >::operator os_event ( )
inlinenoexceptinherited

◆ operator os_event() [3/4]

dx::resource< invalid_t >::operator os_event ( )
inlinenoexceptinherited

◆ operator os_event() [4/4]

dx::resource< invalid_t >::operator os_event ( )
inlinenoexceptinherited

◆ operator struct ::stat()

dx::shared::memory< dx::circular >::operator struct ::stat ( )
inlineinherited

◆ operator*()

dx::circular & dx::shared::memory< dx::circular >::operator* ( )
inlineinherited

◆ operator->()

dx::circular * dx::shared::memory< dx::circular >::operator-> ( )
inlineinherited

◆ operator::HANDLE() [1/4]

dx::resource< invalid_t >::operator::HANDLE ( ) const
inlinenoexceptinherited
Here is the caller graph for this function:

◆ operator::HANDLE() [2/4]

dx::resource< invalid_t >::operator::HANDLE ( ) const
inlinenoexceptinherited
Here is the caller graph for this function:

◆ operator::HANDLE() [3/4]

dx::resource< invalid_t >::operator::HANDLE ( ) const
inlinenoexceptinherited

◆ operator::HANDLE() [4/4]

dx::resource< invalid_t >::operator::HANDLE ( ) const
inlinenoexceptinherited

◆ path()

std::string dx::shared::memory< dx::circular >::path ( const std::string & name)
inlinestaticinherited

the name a segment carries in the system: the uid, hashed where it exceeds what a shared memory name takes

◆ release() [1/4]

bool dx::shared::reference::release ( )
inlinenoexceptinherited

releases this hold

Returns
true if this was the last holder of this name - i.e. no other process currently has it open, and cleanup guarded by this name is now safe

◆ release() [2/4]

bool dx::shared::reference::release ( )
inlinenoexceptinherited

releases this hold

Returns
true if this was the last holder of this name - i.e. no other process currently has it open, and cleanup guarded by this name is now safe

◆ release() [3/4]

bool dx::shared::reference::release ( )
inlinenoexceptinherited

releases this hold

Returns
true if this was the last holder of this name - i.e. no other process currently has it open, and cleanup guarded by this name is now safe
Here is the call graph for this function:
Here is the caller graph for this function:

◆ release() [4/4]

bool dx::shared::reference::release ( )
inlinenoexceptinherited

releases this hold

Returns
true if this was the last holder of this name - i.e. no other process currently has it open, and cleanup guarded by this name is now safe
Here is the call graph for this function:

◆ size()

size_t dx::shared::memory< dx::circular >::size ( ) const
inlineinherited

Member Data Documentation

◆ joined [1/2]

true if initialize() found another holder already present, false if this was the first

◆ joined [2/2]

bool dx::shared::reference::joined {}
inherited

true if initialize() found another holder already present, false if this was the first

◆ process [1/4]

::HANDLE dx::resource< invalid_t >::process
protectedinherited

◆ process [2/4]

::HANDLE dx::resource< invalid_t >::process
protectedinherited

◆ process [3/4]

::HANDLE dx::resource< invalid_t >::process
protectedinherited

◆ process [4/4]

::HANDLE dx::resource< invalid_t >::process
protectedinherited

◆ uid

template<typename device_t, typename circular_t = dx::circular, typename super_stream_t = dx::stream::control<dx::stream::object<device_t>>, typename event_t = dx::shared::event>
const std::string dx::stream::shared::stream< device_t, circular_t, super_stream_t, event_t >::uid

The documentation for this class 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.