nds2-client - ClientDeveloper  0.16.8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
NDS::detail::iterate_handler_with_simple_gaps::indexed_buffers Struct Reference
Collaboration diagram for NDS::detail::iterate_handler_with_simple_gaps::indexed_buffers:
Collaboration graph
[legend]

Public Member Functions

 indexed_buffers ()
 
void initialize (const std::vector< NDS::channel > &channel_list, buffer::gps_second_type gps_time, buffer::gps_second_type stride)
 
bool valid () const
 
void reset (buffers_type &other)
 
buffers_type & bufs ()
 
buffer::gps_second_type cur () const
 
buffer::gps_second_type start () const
 
buffer::gps_second_type remaining () const
 
void advance (buffer::gps_second_type delta)
 
buffer::gps_second_type append_data_from (indexed_buffers &other)
 
void apply_gap_handler (detail::gap_handler &handler, buffer::gps_second_type gps_stop)
 
void apply_delayed_handlers ()
 

Public Attributes

buffers_type bufs_
 
buffer::gps_second_type cur_
 
buffer::gps_second_type stride_
 
std::vector< std::unique_ptr
< NDS::detail::delayed_gap_handler > > 
delay_
 

Detailed Description

This is the heart of iterate_handler_with_simple_gaps. It is a buffer that knows how far processing has gone on in its buffers.

Note
This system assumes that all channels have the same data availability.

Constructor & Destructor Documentation

NDS::detail::iterate_handler_with_simple_gaps::indexed_buffers::indexed_buffers ( )
inline

Member Function Documentation

void NDS::detail::iterate_handler_with_simple_gaps::indexed_buffers::advance ( buffer::gps_second_type  delta)
inline
Parameters
deltaAdvance the current pointer by this many seconds
NDS::detail::iterate_handler_with_simple_gaps::indexed_buffers::append_data_from ( indexed_buffers other)
inline

If possible pull data from other until:

  1. the buffer is full
  2. other is empty
    Parameters
    otherAn indexed buffer to pull data from
    Returns
    The number of seconds of data injested
    Note
    if the current pointers of the given buffers are not at the same gps time this function will do nothing.
void NDS::detail::iterate_handler_with_simple_gaps::indexed_buffers::apply_delayed_handlers ( )
inline
void NDS::detail::iterate_handler_with_simple_gaps::indexed_buffers::apply_gap_handler ( detail::gap_handler handler,
buffer::gps_second_type  gps_stop 
)
inline

Apply the gap handler to the buffer

Parameters
handlerThe gap handler to apply
gps_stopThe end time (NOT offset into the block) that the gap handler should stop at
buffers_type& NDS::detail::iterate_handler_with_simple_gaps::indexed_buffers::bufs ( )
inline
Returns
a reference to the buffers
buffer::gps_second_type NDS::detail::iterate_handler_with_simple_gaps::indexed_buffers::cur ( ) const
inline
Returns
The current pointer/gps time into the buffer
void NDS::detail::iterate_handler_with_simple_gaps::indexed_buffers::initialize ( const std::vector< NDS::channel > &  channel_list,
buffer::gps_second_type  gps_time,
buffer::gps_second_type  stride 
)
inline
buffer::gps_second_type NDS::detail::iterate_handler_with_simple_gaps::indexed_buffers::remaining ( ) const
inline
Returns
The number of seconds between the buffers current pointer and the end
NDS::detail::iterate_handler_with_simple_gaps::indexed_buffers::reset ( buffers_type &  other)
inline
Parameters
otherSet the internal buffer to be the given buffer
Note
Resets the internal pointer to the start of the buffer and the stride to the size of the buffer
buffer::gps_second_type NDS::detail::iterate_handler_with_simple_gaps::indexed_buffers::start ( ) const
inline
Returns
start gps time of the buffer
NDS::detail::iterate_handler_with_simple_gaps::indexed_buffers::valid ( ) const
inline
Returns
True if the buffer is initialized and the current pointer is not at the end

Member Data Documentation

buffers_type NDS::detail::iterate_handler_with_simple_gaps::indexed_buffers::bufs_
buffer::gps_second_type NDS::detail::iterate_handler_with_simple_gaps::indexed_buffers::cur_
std::vector< std::unique_ptr< NDS::detail::delayed_gap_handler > > NDS::detail::iterate_handler_with_simple_gaps::indexed_buffers::delay_
buffer::gps_second_type NDS::detail::iterate_handler_with_simple_gaps::indexed_buffers::stride_

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