Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
dune::NanoSlice Class Reference

#include <NanoSlice.hh>

Inheritance diagram for dune::NanoSlice:
dune::NanoSliceWriter

Classes

struct  Header
 

Public Member Functions

 NanoSlice (uint8_t *address)
 
Header::nanoslice_size_t size () const
 
Header::channel_number_t channelNumber () const
 
Header::sample_count_t sampleCount () const
 
bool sampleValue (uint32_t index, uint16_t &value) const
 

Protected Member Functions

Header const * header_ () const
 
uint16_t const * data_ () const
 

Protected Attributes

uint8_t * buffer_
 

Detailed Description

Definition at line 10 of file NanoSlice.hh.

Constructor & Destructor Documentation

dune::NanoSlice::NanoSlice ( uint8_t *  address)

Definition at line 3 of file NanoSlice.cc.

3 : buffer_(address) { }
uint8_t * buffer_
Definition: NanoSlice.hh:56

Member Function Documentation

dune::NanoSlice::Header::channel_number_t dune::NanoSlice::channelNumber ( ) const

Definition at line 10 of file NanoSlice.cc.

11 {
12  return header_()->channel_number;
13 }
Header const * header_() const
Definition: NanoSlice.cc:27
uint16_t const * dune::NanoSlice::data_ ( ) const
protected

Definition at line 32 of file NanoSlice.cc.

33 {
34  return reinterpret_cast<uint16_t const*>(buffer_ + sizeof(Header));
35 }
uint8_t * buffer_
Definition: NanoSlice.hh:56
dune::NanoSlice::Header const * dune::NanoSlice::header_ ( ) const
protected

Definition at line 27 of file NanoSlice.cc.

28 {
29  return reinterpret_cast<Header const*>(buffer_);
30 }
uint8_t * buffer_
Definition: NanoSlice.hh:56
dune::NanoSlice::Header::sample_count_t dune::NanoSlice::sampleCount ( ) const

Definition at line 15 of file NanoSlice.cc.

16 {
17  return header_()->sample_count;
18 }
Header const * header_() const
Definition: NanoSlice.cc:27
bool dune::NanoSlice::sampleValue ( uint32_t  index,
uint16_t &  value 
) const

Definition at line 20 of file NanoSlice.cc.

21 {
22  if (index >= sampleCount()) {return false;}
23  value = data_()[index];
24  return true;
25 }
uint16_t const * data_() const
Definition: NanoSlice.cc:32
Header::sample_count_t sampleCount() const
Definition: NanoSlice.cc:15
dune::NanoSlice::Header::nanoslice_size_t dune::NanoSlice::size ( ) const

Definition at line 5 of file NanoSlice.cc.

6 {
7  return header_()->nanoslice_size;
8 }
Header const * header_() const
Definition: NanoSlice.cc:27

Member Data Documentation

uint8_t* dune::NanoSlice::buffer_
protected

Definition at line 56 of file NanoSlice.hh.


The documentation for this class was generated from the following files: