DUECA/DUSIME
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
dueca::TimingView Class Referenceabstract

This is a module that generates a summary of the timing results of any instrumented activities. More...

Inheritance diagram for dueca::TimingView:
Inheritance graph
[legend]
Collaboration diagram for dueca::TimingView:
Collaboration graph
[legend]

Public Member Functions

 TimingView (Entity *e, const char *part, const PrioritySpec &ps)
 Constructor, follows standard module construction form. More...
 
 ~TimingView ()
 Destructor. More...
 
void startModule (const TimeSpec &time)
 Start the TimingView module. More...
 
void stopModule (const TimeSpec &time)
 Stop the module. More...
 
bool isPrepared ()
 Will be prepared when the channel is ready. More...
 
virtual void updateSync (int node, const SyncReport &report)=0
 Write a sync report to the interface.
 
virtual void appendReport (const std::string &maker_and_act, const TimeTickType &tstart, const TimingResults &data)=0
 Write a timing report on the interface. More...
 
- Public Member Functions inherited from dueca::Module
virtual ~Module ()
 Destructor.
 
virtual bool complete ()
 Inform the module that all parameters have now been passed. More...
 
virtual bool isInitialPrepared ()
 To check whether the module is prepared to be prepared. More...
 
ObjectType getObjectType () const
 The object type within DUECA.
 
virtual void initialStartModule (const TimeSpec &time)
 Initial start opportunity. More...
 
virtual void finalStopModule (const TimeSpec &time)
 Final stop command. More...
 
const Entity * getMyEntity ()
 Return a pointer to the entity to which this module belongs. More...
 
const ModuleStategetState ()
 Return the module state. More...
 
- Public Member Functions inherited from dueca::NamedObject
const std::string getEntity () const
 Returns the "entity" part of the name.
 
const std::string getClass () const
 Returns the "class" part of the name.
 
const std::string getPart () const
 Returns the sub-entity or "part" part of the name.
 
const NameSetgetNameSet () const
 This returns the complete name set.
 
const GlobalIdgetId () const
 This returns the id. More...
 

Static Public Member Functions

static const ParameterTablegetParameterTable ()
 Table with adjustable parameters. More...
 
static TimingViewsingle ()
 Return the singlton. More...
 

Static Public Attributes

static const char *const classname
 Name of the module class.
 

Protected Attributes

bool token_action
 Flag to remember token completion. More...
 
ChannelReadToken result_channel
 Access token for a channel with the incoming reports.
 
ChannelWriteToken request_report
 Access token for a channel with which to send requests for sync data. More...
 
ChannelReadToken result_report
 Channel which gets back the reports. More...
 
ActivityCallback read_report
 Activity, basically getting timing reports over the channel. More...
 
ActivityCallback read_sync
 Second activity, for getting and processing sync reports. More...
 
bool can_start
 Flag to indicate all conditions OK. More...
 
int num_rows
 Counter to remember the number of rows in the view. More...
 
int no_nodes
 Remember the number of nodes here. More...
 
std::ofstream timing_log
 File for dumping timing logs. More...
 
Callback< TimingViewcb1
 Callback objects. More...
 
Callback< TimingViewcb2
 Callback objects. More...
 
- Protected Attributes inherited from dueca::Module
ModuleState state
 Flag to remember whether we are stopped due to some error with hardware device manipulation. More...
 

Additional Inherited Members

- Protected Member Functions inherited from dueca::Module
 Module (const Entity *e, const char *m_class, const char *part)
 Constructor.
 
virtual void setSafetyStop ()
 Put a brake on this module's activities.
 
- Protected Member Functions inherited from dueca::NamedObject
 NamedObject (const GlobalId &id)
 Reserve for AssociateObject. More...
 
 NamedObject (const NameSet &ns)
 Normal constructor, protected, because it has no use to create a NamedObject by itself.
 
virtual ~NamedObject ()
 Destructor.
 

Detailed Description

This is a module that generates a summary of the timing results of any instrumented activities.

This module may be created from the DUECA model script in dueca.mod, so normally you would put this in your dueca.mod script, like:

(define dueca-internal
(make-entity "dueca"
(if (eq? this-node-id 0)
(list
(make-module 'dusime "" admin-priority)
(make-module 'dueca-view "" admin-priority)
(make-module 'activity-view "" admin-priority)
(make-module 'timing-view "" admin-priority)
) () )
) )

Note the order in which the dueca/dusime objects are defined. Currently, "dusime" needs to be present before dueca-view is made. ActivityView and TimingView use DuecaView to put themselves in the "View" menu. TimingView in addition requires ActivityView to get information about the names of different activities.

Use the name "dueca" for your dueca entity, or the TimingView will not be able to correctly connect its channel.

Constructor & Destructor Documentation

◆ TimingView()

dueca::TimingView::TimingView ( Entity *  e,
const char *  part,
const PrioritySpec ps 
)

Constructor, follows standard module construction form.

◆ ~TimingView()

dueca::TimingView::~TimingView ( )

Destructor.

Member Function Documentation

◆ getParameterTable()

static const ParameterTable* dueca::TimingView::getParameterTable ( )
static

Table with adjustable parameters.

◆ startModule()

void dueca::TimingView::startModule ( const TimeSpec time)
virtual

Start the TimingView module.

Implements dueca::Module.

◆ stopModule()

void dueca::TimingView::stopModule ( const TimeSpec time)
virtual

Stop the module.

Implements dueca::Module.

◆ isPrepared()

bool dueca::TimingView::isPrepared ( )
virtual

Will be prepared when the channel is ready.

Implements dueca::Module.

◆ single()

static TimingView* dueca::TimingView::single ( )
inlinestatic

Return the singlton.

◆ appendReport()

virtual void dueca::TimingView::appendReport ( const std::string &  maker_and_act,
const TimeTickType &  tstart,
const TimingResults &  data 
)
pure virtual

Write a timing report on the interface.

Member Data Documentation

◆ token_action

bool dueca::TimingView::token_action
protected

Flag to remember token completion.

◆ request_report

ChannelWriteToken dueca::TimingView::request_report
protected

Access token for a channel with which to send requests for sync data.

◆ result_report

ChannelReadToken dueca::TimingView::result_report
protected

Channel which gets back the reports.

◆ cb1

Callback<TimingView> dueca::TimingView::cb1
protected

Callback objects.

◆ cb2

Callback<TimingView> dueca::TimingView::cb2
protected

Callback objects.

◆ read_report

ActivityCallback dueca::TimingView::read_report
protected

Activity, basically getting timing reports over the channel.

◆ read_sync

ActivityCallback dueca::TimingView::read_sync
protected

Second activity, for getting and processing sync reports.

◆ can_start

bool dueca::TimingView::can_start
protected

Flag to indicate all conditions OK.

◆ num_rows

int dueca::TimingView::num_rows
protected

Counter to remember the number of rows in the view.

◆ no_nodes

int dueca::TimingView::no_nodes
protected

Remember the number of nodes here.

◆ timing_log

std::ofstream dueca::TimingView::timing_log
protected

File for dumping timing logs.


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