DumpManager Class Reference

#include <traceval.h>

Collaboration diagram for DumpManager:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void SetSingleDeviceApp (void)
 Tell DumpManager, that we have only one device.
void addDumper (Dumper *dump, const TraceSet &vals)
void start ()
void stopApplication (void)
 Stop processing on all dumpers and removes it from dumpers list.
void cycle ()
 ~DumpManager ()
 Destroys the DumpManager instance and shut down all dumpers.
void save (std::ostream &os) const
TraceSet load (std::istream &is)
TraceSet load (const std::string &istr)
const TraceSetall ()

Static Public Member Functions

static DumpManagerInstance (void)
 Singleton class access.

Private Member Functions

 DumpManager ()
 Private instance constructor.
void appendDeviceName (std::string &s)
 append a unique device name to a string
void registerAvrDevice (AvrDevice *dev)
 Add a device to devicelist.
void unregisterAvrDevice (AvrDevice *dev)
 Remove a device from devicelist.
TraceValueseekValueByName (const std::string &name)
 Seek value by name in all devices.

Private Attributes

bool singleDeviceApp
 Flag, if we use only one device, e.g. assign no device name.
TraceSet active
 Set of active tracing values.
TraceSet _all
 Set of all traceable values (placeholder instance for all() method).
std::vector< Dumper * > dumps
 All dumpers, which we want to use.
std::vector< AvrDevice * > devices
 Device list.

Friends

class TraceValueRegister
class AvrDevice

Detailed Description

Manages all active Dumper instances for a given AvrDevice. It also manages all trace values and sets them active as necessary.

Definition at line 329 of file traceval.h.


Constructor & Destructor Documentation

DumpManager::~DumpManager (  )  [inline]

Destroys the DumpManager instance and shut down all dumpers.

Definition at line 361 of file traceval.h.

References stopApplication().

Here is the call graph for this function:

DumpManager::DumpManager (  )  [private]

Private instance constructor.

Definition at line 530 of file traceval.cpp.

References singleDeviceApp.

Referenced by Instance().

Here is the caller graph for this function:


Member Function Documentation

void DumpManager::addDumper ( Dumper dump,
const TraceSet vals 
)

Add a dumper to the list. The vector vals contains all the values this dumper should trace.

Definition at line 581 of file traceval.cpp.

References active, avr_error, dumps, and Dumper::setActiveSignals().

Referenced by SetDumpTraceArgs().

Here is the call graph for this function:

Here is the caller graph for this function:

const TraceSet & DumpManager::all (  ) 

Gives all available tracers as a set.

Definition at line 598 of file traceval.cpp.

References _all, and devices.

Referenced by SetDumpTraceArgs().

Here is the caller graph for this function:

void DumpManager::appendDeviceName ( std::string &  s  )  [private]

append a unique device name to a string

Definition at line 534 of file traceval.cpp.

References avr_error, int2str(), and singleDeviceApp.

Referenced by TraceValueRegister::TraceValueRegister().

Here is the call graph for this function:

Here is the caller graph for this function:

void DumpManager::cycle (  ) 

Process one AVR clock cycle. Must be done after the AVR did all processing so that changed values etc. can be collected.

Definition at line 626 of file traceval.cpp.

References active, and dumps.

Referenced by AvrDevice::Step().

Here is the caller graph for this function:

DumpManager * DumpManager::Instance ( void   )  [static]

Singleton class access.

Definition at line 523 of file traceval.cpp.

References DumpManager().

Referenced by avr_dump_start_tf(), avr_dump_stop_tf(), AvrDevice::AvrDevice(), main(), SetDumpTraceArgs(), ShowRegisteredTraceValues(), and TraceValueRegister::TraceValueRegister().

Here is the call graph for this function:

Here is the caller graph for this function:

TraceSet DumpManager::load ( const std::string &  istr  ) 

Load a list of tracing values from the given input string. Checks whether the values are part of the set of traceable values.

Returns:
TraceSet with found TraceValue's

Definition at line 724 of file traceval.cpp.

References load().

Here is the call graph for this function:

TraceSet DumpManager::load ( std::istream &  is  ) 

Load a list of tracing values from the given input stream. Checks whether the values are part of the set of traceable values.

Returns:
TraceSet with found TraceValue's

Definition at line 680 of file traceval.cpp.

References avr_error, int2str(), readline(), seekValueByName(), and split().

Referenced by load(), and SetDumpTraceArgs().

Here is the call graph for this function:

Here is the caller graph for this function:

void DumpManager::registerAvrDevice ( AvrDevice dev  )  [private]

Add a device to devicelist.

Definition at line 543 of file traceval.cpp.

References devices.

Referenced by AvrDevice::AvrDevice().

Here is the caller graph for this function:

void DumpManager::save ( std::ostream &  os  )  const

Write a list of all tracing value names into the given output stream.

Definition at line 649 of file traceval.cpp.

References TraceValue::barename(), devices, and TraceValue::index().

Referenced by ShowRegisteredTraceValues().

Here is the call graph for this function:

Here is the caller graph for this function:

TraceValue * DumpManager::seekValueByName ( const std::string &  name  )  [private]

Seek value by name in all devices.

Definition at line 557 of file traceval.cpp.

References devices, and singleDeviceApp.

Referenced by load().

Here is the caller graph for this function:

void DumpManager::SetSingleDeviceApp ( void   ) 

Tell DumpManager, that we have only one device.

In normal simulavr application we have only one device aka processor. But it's possible to make a simulation with 2 or more devices together. For that, we have to assign a unique name for every device to identify a device and to get a unique namespace in trace output.

This method has to be called *before* the device instance will be created in single device application! Default is multi device application.

Definition at line 575 of file traceval.cpp.

References avr_error, devices, and singleDeviceApp.

Referenced by main().

Here is the caller graph for this function:

void DumpManager::start (  ) 

Start processing on all dumpers. They will be stopped when stopApplication method will be called or the dump manager gets destroyed.

Definition at line 620 of file traceval.cpp.

References dumps.

Referenced by avr_dump_start_tf(), and main().

Here is the caller graph for this function:

void DumpManager::stopApplication ( void   ) 

Stop processing on all dumpers and removes it from dumpers list.

Definition at line 641 of file traceval.cpp.

References dumps.

Referenced by avr_dump_stop_tf(), main(), and ~DumpManager().

Here is the caller graph for this function:

void DumpManager::unregisterAvrDevice ( AvrDevice dev  )  [private]

Remove a device from devicelist.

Definition at line 547 of file traceval.cpp.

References devices.

Referenced by AvrDevice::~AvrDevice().

Here is the caller graph for this function:


Friends And Related Function Documentation

friend class AvrDevice [friend]

Definition at line 384 of file traceval.h.

friend class TraceValueRegister [friend]

Definition at line 383 of file traceval.h.


Member Data Documentation

Set of all traceable values (placeholder instance for all() method).

Definition at line 407 of file traceval.h.

Referenced by all().

Set of active tracing values.

Definition at line 405 of file traceval.h.

Referenced by addDumper(), and cycle().

std::vector<AvrDevice*> DumpManager::devices [private]

Device list.

Definition at line 413 of file traceval.h.

Referenced by all(), registerAvrDevice(), save(), seekValueByName(), SetSingleDeviceApp(), and unregisterAvrDevice().

std::vector<Dumper*> DumpManager::dumps [private]

All dumpers, which we want to use.

Definition at line 410 of file traceval.h.

Referenced by addDumper(), cycle(), start(), and stopApplication().

Flag, if we use only one device, e.g. assign no device name.

Definition at line 402 of file traceval.h.

Referenced by appendDeviceName(), DumpManager(), seekValueByName(), and SetSingleDeviceApp().


The documentation for this class was generated from the following files:
Generated on Sun Feb 12 16:50:52 2012 for Simulavr by  doxygen 1.6.3