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

one client's attachment to a stream: the pin desc it was made from, the channels it takes of that stream's ring, and its own share of the stream's start count. Several pins - several clients - share one dx::stream::stream, which the device keeps by weak reference: the first pin of a stream creates it, the last one to go releases it, and neither stops a transport the others still run. More...

#include <dx_stream_pin.h>

Inheritance diagram for dx::stream::pin< device_t, _circular_t >:
Collaboration diagram for dx::stream::pin< device_t, _circular_t >:

Public Types

typedef _circular_t circular_t
typedef _device_t device_t

Public Member Functions

template<typename channel_t>
pin & attach (channel_t **io[2], const std::vector< bool > &channel_map)
 the client's own planar channel buffers, one pair per channel the map selects - the engine moves them against the ring in the pin's own format
void conclude () noexcept
dx::stream::channel::control * control () const
 kernel streaming: what the driver hands its clients to follow the buffer switch
virtual float encoder (dx::stream::encoder::index::type type, int index) const
virtual bool encoder (dx::stream::encoder::index::type type, int index, float value)
void exception (const dx::exception &exception, bool filtered=false) const noexcept override
 notification exception handler
void info (std::ostream &os) noexcept override
 log object class information
virtual operator circular_t * () const noexcept
virtual circular_t * operator-> () const noexcept
 pin (device_t &device, const typename device_t::desc::stream::desc &stream_desc, const typename device_t::desc::stream::pin::desc &pin_desc)
 pin (device_t &device, unsigned int stream_idx=0, unsigned int pin_idx=0)
bool try_conclude () noexcept
 atomically conclude()s if currently launched; returns whether this call did it
bool try_launch ()
 atomically launch()es if not already launched; returns whether this call did it. A launch() that throws is concluded before the exception leaves: the object never claims a launch it did not finish
 ~pin () override

Public Attributes

std::atomic< bool > launched {}
promoted< uint32_t > start
promoted< bool > started
stream_t & stream

Protected Member Functions

virtual void launch ()
 launch notification: object mounted and ready to use. Called only through try_launch() - never call this directly from outside the class hierarchy.

Protected Attributes

_device_t & device
std::function< void()> flush_hook
std::function< void()> halt_hook
std::function< void()> run_hook

Friends

template<typename, typename, typename, typename>
class engine::group
 an engine beside the device's own group composes this pin's session hooks with its own

Detailed Description

template<typename device_t, typename _circular_t = dx::circular>
class dx::stream::pin< device_t, _circular_t >

one client's attachment to a stream: the pin desc it was made from, the channels it takes of that stream's ring, and its own share of the stream's start count. Several pins - several clients - share one dx::stream::stream, which the device keeps by weak reference: the first pin of a stream creates it, the last one to go releases it, and neither stops a transport the others still run.

Member Typedef Documentation

◆ circular_t

template<typename device_t, typename _circular_t = dx::circular>
typedef _circular_t dx::stream::pin< device_t, _circular_t >::circular_t

◆ device_t

template<typename _device_t>
typedef _device_t dx::stream::object< _device_t >::device_t
inherited

Constructor & Destructor Documentation

◆ pin() [1/2]

template<typename device_t, typename _circular_t = dx::circular>
dx::stream::pin< device_t, _circular_t >::pin ( device_t & device,
const typename device_t::desc::stream::desc & stream_desc,
const typename device_t::desc::stream::pin< device_t, _circular_t >::desc & pin_desc )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pin() [2/2]

template<typename device_t, typename _circular_t = dx::circular>
dx::stream::pin< device_t, _circular_t >::pin ( device_t & device,
unsigned int stream_idx = 0,
unsigned int pin_idx = 0 )
inline
Here is the call graph for this function:

◆ ~pin()

template<typename device_t, typename _circular_t = dx::circular>
dx::stream::pin< device_t, _circular_t >::~pin ( )
inlineoverride

Member Function Documentation

◆ attach()

template<typename device_t, typename _circular_t = dx::circular>
template<typename channel_t>
pin & dx::stream::pin< device_t, _circular_t >::attach ( channel_t ** io[2],
const std::vector< bool > & channel_map )
inline

the client's own planar channel buffers, one pair per channel the map selects - the engine moves them against the ring in the pin's own format

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

◆ conclude()

void dx::stream::control< object< device_t > >::conclude ( )
inlinevirtualnoexceptinherited

Reimplemented from dx::object.

◆ control()

template<typename device_t, typename _circular_t = dx::circular>
dx::stream::channel::control * dx::stream::pin< device_t, _circular_t >::control ( ) const
inline

kernel streaming: what the driver hands its clients to follow the buffer switch

◆ encoder() [1/2]

template<typename device_t, typename _circular_t = dx::circular>
virtual float dx::stream::pin< device_t, _circular_t >::encoder ( dx::stream::encoder::index::type type,
int index ) const
inlinevirtual

◆ encoder() [2/2]

template<typename device_t, typename _circular_t = dx::circular>
virtual bool dx::stream::pin< device_t, _circular_t >::encoder ( dx::stream::encoder::index::type type,
int index,
float value )
inlinevirtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ exception()

template<typename device_t, typename _circular_t = dx::circular>
void dx::stream::pin< device_t, _circular_t >::exception ( const dx::exception & exception,
bool filtered = false ) const
inlineoverridevirtualnoexcept

notification exception handler

Reimplemented from dx::stream::object< _device_t >.

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

◆ info()

template<typename device_t, typename _circular_t = dx::circular>
void dx::stream::pin< device_t, _circular_t >::info ( std::ostream & os)
inlineoverridevirtualnoexcept

log object class information

Reimplemented from dx::object.

Here is the call graph for this function:

◆ launch()

virtual void dx::object::launch ( )
inlineprotectedvirtualinherited

launch notification: object mounted and ready to use. Called only through try_launch() - never call this directly from outside the class hierarchy.

Reimplemented in dx::asio::client::driver< device_t, devices >, dx::asio::service::device< super_device_t >, dx::coreaudio::driver< device_t >, dx::coremidi::driver< device_t >, dx::map::driver< _device_t, holder_t >, dx::map::driver< device<> >, dx::map::driver< device_t >, dx::map::driver< device_t, dx::apartment< device_t > >, dx::midi::services::driver< device_t >, dx::proxy::driver< device_t >, dx::proxy::driver< device_t >, dx::service::app, dx::service::client::_device< desc_t, preference_t, stream_t, group_t >, dx::service::client::_device< desc, preference, stream< device< desc, preference, stream, group > >, group< device< desc, preference, stream, group > > >, dx::service::client::_device< desc_t, preference_t, stream_t< device< desc_t, preference_t, stream_t, group_t > >, group_t< device< desc_t, preference_t, stream_t, group_t > > >, dx::service::client::driver< device_t >, dx::service::device< preference_t >, dx::service::device< dx::preference >, dx::service::device< super_device_t >, dx::stream::stream< device_t, dx::circular, usb::pipe< device_t > >, dx::usb::stream::_device< desc_t, preference_t, stream_t, group_t >, dx::usb::stream::_device< desc_t, dx::preference, pipe< device< desc_t, dx::preference, pipe, group > >, group< device< desc_t, dx::preference, pipe, group > > >, dx::usb::stream::_device< desc_t, preference_t, stream_t< device< desc_t, preference_t, stream_t, group_t > >, group_t< device< desc_t, preference_t, stream_t, group_t > > >, dx::virtuel::driver< device_t >, dx::virtuel::driver< device<> >, and dx::wasapi::client::driver< device_t >.

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

◆ operator circular_t *()

template<typename device_t, typename _circular_t = dx::circular>
virtual dx::stream::pin< device_t, _circular_t >::operator circular_t * ( ) const
inlinevirtualnoexcept

◆ operator->()

template<typename device_t, typename _circular_t = dx::circular>
virtual circular_t * dx::stream::pin< device_t, _circular_t >::operator-> ( ) const
inlinevirtualnoexcept

◆ try_conclude()

bool dx::object::try_conclude ( )
inlinenoexceptinherited

atomically conclude()s if currently launched; returns whether this call did it

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

◆ try_launch()

bool dx::object::try_launch ( )
inlineinherited

atomically launch()es if not already launched; returns whether this call did it. A launch() that throws is concluded before the exception leaves: the object never claims a launch it did not finish

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

◆ engine::group

template<typename device_t, typename _circular_t = dx::circular>
template<typename, typename, typename, typename>
friend class engine::group
friend

an engine beside the device's own group composes this pin's session hooks with its own

Member Data Documentation

◆ device

template<typename _device_t>
_device_t& dx::stream::object< _device_t >::device
protectedinherited

◆ flush_hook

std::function<void()> dx::stream::control< object< device_t > >::flush_hook
protectedinherited

◆ halt_hook

std::function<void()> dx::stream::control< object< device_t > >::halt_hook
protectedinherited

◆ launched

std::atomic<bool> dx::object::launched {}
inherited

◆ run_hook

std::function<void()> dx::stream::control< object< device_t > >::run_hook
protectedinherited

◆ start

◆ started

promoted<bool> dx::stream::control< object< device_t > >::started
inherited

◆ stream

template<typename device_t, typename _circular_t = dx::circular>
stream_t& dx::stream::pin< device_t, _circular_t >::stream

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.