OnlineHistogramGenerator Class Reference

#include <OnlineHistogramGenerator.h>

Inheritance diagram for OnlineHistogramGenerator:

Inheritance graph
[legend]
Collaboration diagram for OnlineHistogramGenerator:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 OnlineHistogramGenerator ()
 OnlineHistogramGenerator (unsigned numInputPorts, double minVal, double maxVal, unsigned numBins=10, unsigned samplingTime=1)
virtual ~OnlineHistogramGenerator ()
virtual int nAnalogInputPorts () const
virtual int nAnalogOutputPorts () const
virtual PortType outputPortType (port_t p) const
virtual PortType inputPortType (port_t p) const
virtual int reset (double dt)
 Called at the beginning of a simulation at t=0.
virtual int advance (AdvanceInfo const &ai)
 Calculate the next state and output/propagate the result to succesors/outgoing objects.
virtual double getAnalogOutput (analog_port_id_t port=0) const
 Return the analog value currently associated with the given port.
virtual void setAnalogInput (double value, analog_port_id_t port=0)
 Analog input to given port.

Protected Attributes

unsigned n_input_ports
double min_val
double max_val
unsigned num_bins
unsigned sampling_time
unsigned stepsToWait
double bin_width
std::vector< unsigned > input_counter
std::vector< doubleout_values


Detailed Description

Definition at line 8 of file OnlineHistogramGenerator.h.


Constructor & Destructor Documentation

OnlineHistogramGenerator::OnlineHistogramGenerator (  ) 

OnlineHistogramGenerator::OnlineHistogramGenerator ( unsigned  numInputPorts,
double  minVal,
double  maxVal,
unsigned  numBins = 10,
unsigned  samplingTime = 1 
)

Definition at line 8 of file OnlineHistogramGenerator.cpp.

OnlineHistogramGenerator::~OnlineHistogramGenerator (  )  [virtual]

Definition at line 16 of file OnlineHistogramGenerator.cpp.


Member Function Documentation

int OnlineHistogramGenerator::nAnalogInputPorts (  )  const [virtual]

Reimplemented from SimObject.

Definition at line 20 of file OnlineHistogramGenerator.cpp.

References n_input_ports.

int OnlineHistogramGenerator::nAnalogOutputPorts (  )  const [virtual]

Reimplemented from SimObject.

Definition at line 26 of file OnlineHistogramGenerator.cpp.

References num_bins.

SimObject::PortType OnlineHistogramGenerator::outputPortType ( port_t  p  )  const [virtual]

Reimplemented from SimObject.

Definition at line 32 of file OnlineHistogramGenerator.cpp.

References SimObject::analog, num_bins, and SimObject::undefined.

SimObject::PortType OnlineHistogramGenerator::inputPortType ( port_t  p  )  const [virtual]

Reimplemented from SimObject.

Definition at line 39 of file OnlineHistogramGenerator.cpp.

References SimObject::analog, n_input_ports, and SimObject::undefined.

int OnlineHistogramGenerator::reset ( double  dt  )  [virtual]

Called at the beginning of a simulation at t=0.

Reimplemented from SimObject.

Definition at line 46 of file OnlineHistogramGenerator.cpp.

References bin_width, input_counter, max_val, min_val, num_bins, out_values, and stepsToWait.

int OnlineHistogramGenerator::advance ( AdvanceInfo const &   )  [virtual]

Calculate the next state and output/propagate the result to succesors/outgoing objects.

The return value of advance contains several bits of information which can be decoded with the bit masks ADVANCEFLAG_* like ADVANCEFLAG_HASSPIKED and ADVANCEFLAG_DEACTIVATE.

Reimplemented from SimObject.

Definition at line 56 of file OnlineHistogramGenerator.cpp.

References input_counter, n_input_ports, out_values, sampling_time, and stepsToWait.

double OnlineHistogramGenerator::getAnalogOutput ( analog_port_id_t  port = 0  )  const [virtual]

Return the analog value currently associated with the given port.

Reimplemented from SimObject.

Definition at line 68 of file OnlineHistogramGenerator.cpp.

References out_values.

void OnlineHistogramGenerator::setAnalogInput ( double  value,
analog_port_id_t  port = 0 
) [virtual]

Analog input to given port.

Reimplemented from SimObject.

Definition at line 73 of file OnlineHistogramGenerator.cpp.

References bin_width, input_counter, min_val, num_bins, and stepsToWait.


Member Data Documentation

Definition at line 41 of file OnlineHistogramGenerator.h.

Referenced by advance(), inputPortType(), and nAnalogInputPorts().

Definition at line 43 of file OnlineHistogramGenerator.h.

Referenced by reset(), and setAnalogInput().

Definition at line 44 of file OnlineHistogramGenerator.h.

Referenced by reset().

unsigned OnlineHistogramGenerator::num_bins [protected]

Definition at line 48 of file OnlineHistogramGenerator.h.

Referenced by advance().

Definition at line 50 of file OnlineHistogramGenerator.h.

Referenced by advance(), reset(), and setAnalogInput().

Definition at line 52 of file OnlineHistogramGenerator.h.

Referenced by reset(), and setAnalogInput().

std::vector<unsigned> OnlineHistogramGenerator::input_counter [protected]

Definition at line 54 of file OnlineHistogramGenerator.h.

Referenced by advance(), reset(), and setAnalogInput().

std::vector<double> OnlineHistogramGenerator::out_values [protected]

Definition at line 56 of file OnlineHistogramGenerator.h.

Referenced by advance(), getAnalogOutput(), and reset().


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

Generated on Wed Jul 9 16:34:52 2008 for PCSIM by  doxygen 1.5.5