dsp::IOManager Class Reference

Produces TimeSeries data by integrating an Input with an Unpacker. More...

#include <IOManager.h>

Inheritance diagram for dsp::IOManager:
dsp::UnpackerSource< Unpacker, Input > dsp::InputSource< Input > dsp::Source dsp::Operation OwnStream Reference::Able Reference::HeapTracked

Public Member Functions

 IOManager ()
 Constructor.
 
IOManagerclone () const override
 Return a default constructed clone of self.
 
virtual void open (const std::string &id)
 Prepare the appropriate Input and Unpacker. More...
 
- Public Member Functions inherited from dsp::UnpackerSource< Unpacker, Input >
 UnpackerSource (const char *name)
 Constructor.
 
bool get_order_supported (TimeSeries::Order) const
 Return true if the source supports the specified output order.
 
void set_output_order (TimeSeries::Order)
 Set the order of the dimensions in the output TimeSeries.
 
bool get_device_supported (Memory *) const
 Return true if the unpacker can operate on the specified device.
 
void set_device (Memory *)
 Set the device on which the unpacker will operate.
 
void prepare ()
 Prepare the input and unpacker.
 
void reserve ()
 Reserve the maximum amount of output space required.
 
void add_extensions (Extensions *)
 Add any input and unpacker extensions.
 
void combine (const Operation *)
 Combine the input and unpacker.
 
void reset ()
 Reset the input and unpacker.
 
void report () const
 Report operation statistics.
 
uint64_t bytes_storage () const override
 The number of bytes of additional storage used by the operation.
 
uint64_t bytes_scratch () const override
 The number of bytes of scratch space used by the operation.
 
const Inputget_input () const
 Return pointer to the appropriate InputType.
 
Inputget_input ()
 Return pointer to the input.
 
void set_input (Input *input)
 Set the InputType operator (should not normally need to be used)
 
const Unpackerget_unpacker () const
 Return pointer to the appropriate UnpackerType.
 
Unpackerget_unpacker ()
 
void set_unpacker (Unpacker *unpacker)
 Set the UnpackerType (should not normally need to be used)
 
void set_output (TimeSeries *output)
 Set the TimeSeries object used to store output data.
 
TimeSeriesget_output ()
 Get the TimeSeries object used to store output data.
 
bool has_output () const
 Return true if this object has a TimeSeries object to store output data.
 
virtual void set_bit_container (BitContainerType *)
 Set the container into which intermediate raw data will be loaded.
 
void set_post_load_operation (Operation *op)
 Set custom post load operation.
 
uint64_t get_resolution () const
 Get the minimum number of time samples that can be output by the source.
 
virtual void load (TimeSeries *data)
 Load and convert the next block of data.
 
virtual void set_scratch (Scratch *scratch)
 Set the scratch space.
 
virtual void set_cerr (std::ostream &os) const
 Set verbosity ostream.
 
- Public Member Functions inherited from dsp::InputSource< Input >
 InputSource (const char *name)
 Constructor.
 
const Observationget_info () const override
 Get the Observation attributes that describe the source.
 
Observationget_info () override
 Get the Observation attributes that describe the source.
 
uint64_t get_total_samples () const override
 Get the total number of time samples available (return 0 if unknown)
 
uint64_t get_current_sample () const override
 Get the current time sample offset from the start.
 
double get_current_time () const override
 Get the current time offset from the start in seconds.
 
void seek_time (double second) override
 Seek to the specified time in seconds.
 
void set_total_time (double second)
 Truncate the time series at the specified second.
 
bool end_of_data () const override
 Return true when the end of data has been reached.
 
void restart () override
 Start again from the beginning, if possible.
 
void set_block_size (uint64_t block_size) override
 Set the desired number of time samples per segment output by the source.
 
uint64_t get_block_size () const override
 Get the number of time samples per segment output by the source.
 
void set_overlap (uint64_t overlap) override
 Set the number of time samples by which output segments should overlap.
 
uint64_t get_overlap () const override
 Set the number of time samples by which segments of output TimeSeries data overlap.
 
void share (Source *that) override
 Share any resources that can/should be shared between threads.
 
void set_context (ThreadContext *context) override
 In multi-threaded programs, a mutual exclusion and a condition.
 
- Public Member Functions inherited from dsp::Source
 Source (const char *name)
 Constructor.
 
virtual ~Source ()
 Destructor.
 
Operation::Function get_function () const override
 Each Source object is classified as a Producer Operation.
 
virtual const Observationget_info () const =0
 Get the const Observation attributes that describe the source.
 
virtual bool has_output () const =0
 Return true if this object has a TimeSeries object to store output data.
 
virtual uint64_t get_total_samples () const =0
 Get the total number of time samples available (return 0 if unknown)
 
virtual uint64_t get_current_sample () const =0
 Get the current time sample offset from the start of data.
 
virtual double get_current_time () const =0
 Get the current time offset from the start of data in seconds.
 
virtual bool end_of_data () const =0
 Return true when the end of data has been reached.
 
virtual uint64_t get_block_size () const =0
 Get the number of time samples per segment output by the source. More...
 
virtual uint64_t get_overlap () const =0
 Set the number of time samples by which segments of output TimeSeries data overlap.
 
- Public Member Functions inherited from dsp::Operation
 Operation (const char *name)
 All sub-classes must specify a unique name. More...
 
 Operation (const Operation &)
 Copy constructor.
 
virtual ~Operation ()
 Virtual destructor.
 
virtual bool operate ()
 Call this method to operate on data Returns false on failure. More...
 
virtual void report () const
 Report operation statistics.
 
std::string get_name () const
 Return the unique name of this operation.
 
double get_total_time () const
 Return the total time spent on this Operation in seconds.
 
double get_elapsed_time () const
 Get the time spent in the last invocation of operate()
 
virtual uint64_t get_total_weights () const
 Return the total number of timesample weights encountered. More...
 
virtual uint64_t get_discarded_weights () const
 Return the number of invalid timesample weights encountered.
 
int get_id ()
 Inquire the unique instantiation id.
 
virtual double get_delay_time () const
 Get the time delay of this operation, if any, in seconds.
 
bool scratch_was_set () const
 
virtual uint64_t bytes_storage () const
 The number of bytes of additional storage used by the operation.
 
virtual uint64_t bytes_scratch () const
 The number of bytes of scratch space used by the operation. More...
 
- Public Member Functions inherited from OwnStream
 OwnStream (const OwnStream &)
 
const OwnStreamoperator= (const OwnStream &)
 
virtual void set_cout (std::ostream &) const
 
- Public Member Functions inherited from Reference::Able
 Able (const Able &)
 
Ableoperator= (const Able &)
 
unsigned get_reference_count () const
 
- Public Member Functions inherited from Reference::HeapTracked
 HeapTracked (const HeapTracked &)
 
HeapTrackedoperator= (const HeapTracked &)
 
bool __is_on_heap () const
 

Additional Inherited Members

- Public Types inherited from dsp::UnpackerSource< Unpacker, Input >
typedef Input ::OutputType BitContainerType
 
- Public Types inherited from dsp::Operation
enum  Function { Producer, Procedural, Structural }
 The function of the operator. More...
 
- Static Public Member Functions inherited from Reference::Able
static size_t get_instance_count ()
 
- Static Public Member Functions inherited from Reference::HeapTracked
static void * operator new (size_t size, void *ptr=0)
 
static void operator delete (void *location, void *ptr)
 
static void operator delete (void *location)
 
static size_t get_heap_queue_size ()
 
- Static Public Attributes inherited from dsp::Operation
static bool record_time = false
 Global flag enables stopwatch to record the time spent operating. More...
 
static bool report_time = true
 Global flag enables report of time spent in operation on descruction. More...
 
static bool verbose = false
 Global verbosity flag.
 
static int operation_status = 0
 Operations can set this to non-zero in operation() if they fail.
 
static bool check_state = true
 Operations should perform internal consistency checks.
 
static int instantiation_count = 0
 Counts how many Operation instantiations there have been Used for setting the unique instantiation ID. More...
 
- Protected Member Functions inherited from dsp::UnpackerSource< Unpacker, Input >
virtual void operation ()
 Load the TimeSeries specified with set_output.
 
- Protected Member Functions inherited from dsp::Operation
virtual bool can_operate ()
 Return false if the operation doesn't have enough data to proceed.
 
virtual void set_name (const std::string &_name)
 Set the name!
 
int timers_index (const std::string &op_name)
 Returns the index in the 'timers' array of a particular timer.
 
- Protected Member Functions inherited from Reference::Able
Handle__reference (bool active) const
 
void __dereference (bool auto_delete=true) const
 
- Protected Attributes inherited from dsp::UnpackerSource< Unpacker, Input >
Reference::To< Inputinput
 Appropriate InputType subclass.
 
Reference::To< Unpackerunpacker
 Appropriate UnpackerType subclass.
 
Reference::To< BitContainerType > bit_container
 The container in which the intermediate raw data is loaded.
 
Reference::To< TimeSeriesoutput
 The container in which the TimeSeries data is unpacked.
 
Reference::To< Operationpost_load_operation
 Optional operation performed between load and unpack.
 
- Protected Attributes inherited from dsp::Operation
Scratchscratch
 Shared scratch space, if needed.
 
bool set_scratch_called
 
std::string name
 Operation name.
 
uint64_t discarded_weights
 Number of time sample weights encountered that are flagged invalid.
 
uint64_t total_weights
 Total number of time sample weights encountered.
 
RealTimer optime
 Stop watch records the amount of time spent performing this operation.
 
int id
 Unique instantiation id.
 
bool prepared
 Set true when preparation optimizations are completed.
 

Detailed Description

Produces TimeSeries data by integrating an Input with an Unpacker.

Member Function Documentation

◆ open()

void dsp::IOManager::open ( const std::string &  id)
virtual

Prepare the appropriate Input and Unpacker.

Parameters
idstring containing the id of the data source. The source id may be a:
  • filename
  • a comma separated list of filenames to be treated as one observation
  • a string of the form "IPC:xx", where "xx" is a shared memory key
Precondition
This function is not fully implemented.

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

Generated using doxygen 1.8.17