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

This is a module that can generate an overview of the activity (timelines) in a set of connected DUECA nodes. More...

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

Classes

struct  HighLight
 Highlighted and listed area. More...
 

Public Member Functions

 ActivityViewBase (Entity *e, const char *part, const PrioritySpec &ps)
 Constructor. More...
 
 ~ActivityViewBase ()
 Destructor. More...
 
virtual bool complete ()=0
 Completion, creates the window. More...
 
void startModule (const TimeSpec &time)
 Start the viewer, not used, since it will always work. More...
 
void stopModule (const TimeSpec &time)
 Stop the viewer, not used. More...
 
void readLogOwn (const TimeSpec &time)
 Re-draw the display of activities. More...
 
void readLogOthers (const TimeSpec &time)
 Re-draw the display of activities. More...
 
void updateLines (const ActivityLog *log)
 Re-draw the display of activities. More...
 
void getActivityList (const TimeSpec &time)
 Read a list of activity descriptions. More...
 
void sendSweepRequest (const TimeSpec &time)
 Send a request to sweep up logs. More...
 
void triggerUpdate ()
 Call for a measurement of the activities. More...
 
virtual bool setPositionAndSize (const std::vector< int > &ps)
 Pre-define a position and size for the window.
 
bool setLookAhead (const double &ahead)
 Change the look-ahead time. More...
 
void setSpan (double span)
 Change the span of the logs. More...
 
bool isPrepared ()
 Returns true if the module is prepared for starting. More...
 
const string32 & getActivityName (int node, int acno)
 Return the name of an activity (if known)
 
void processLog (const ActivityLog *log)
 Process a single log.
 
virtual void updateLines (unsigned node)=0
 draw the log in a view
 
- Public Member Functions inherited from dueca::Module
virtual ~Module ()
 Destructor.
 
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 ActivityViewBasesingle ()
 Obtain a pointer to the singleton. More...
 

Static Public Attributes

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

Protected Member Functions

void tokenValid (const TimeSpec &ts)
 Function on token completion. More...
 
void requestDescriptionList (const TimeSpec &time)
 Request a list with descriptions from managers. More...
 
- 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.
 

Protected Attributes

Callback< ActivityViewBasetoken_valid
 Function on token completion.
 
bool token_action
 Flag to remember token completion. More...
 
bool can_start
 Flag to indicate start possible.
 
ChannelWriteToken send_request
 Access token for a channel over which log requests are sent. More...
 
ChannelReadToken log_channel0
 Access token for a channel with the incoming logs. More...
 
ChannelReadToken log_channelO
 Access token for a channel with the incoming logs. More...
 
vector< ActivityWeaver > current_logs
 A vector with the current logs. More...
 
Callback< ActivityViewBasecb1
 Callback object 1, for processing log reports from local node. More...
 
Callback< ActivityViewBasecb2
 Callback object 2, for processing log reports from elsewhere. More...
 
Callback< ActivityViewBasecb3
 Callback object 3, for sending out a sweep-up request. More...
 
ActivityCallback process_log_reports0
 The activity that handles the incoming logs. More...
 
ActivityCallback process_log_reportsO
 The activity that handles the incoming logs. More...
 
ActivityCallback send_sweep_request
 Sweep up logs. More...
 
AperiodicAlarm sweep_alarm
 Time for sweeping. More...
 
bool sweep_done
 Flag to remember sweeping. More...
 
int ticks_per_sec
 Number of clock ticks per second, needed to calculate look-ahead times. More...
 
int lookahead
 The time to look ahead for requests (should be time needed for all requests to arrive)
 
TimeTickType prev_request_end
 The time at which the previous request for activity information ends. More...
 
TimeTickType first_base_tick
 Tick at which request has been sent. More...
 
TimeTickType current_base_tick
 Tick at which current request has been / will be sent. More...
 
double dspan
 Span of recording period, in seconds. More...
 
double vspan
 Span of the view, in seconds. More...
 
ofstream activity_log
 File for dumping activity logs. More...
 
HighLight hl
 Details of the highlighted area. More...
 
HighLight hlnew
 Details of a new highlighted area. 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...
 

Static Protected Attributes

static ActivityViewBasesingleton
 singleton pointer, there can only be one view in an executable. More...
 

Detailed Description

This is a module that can generate an overview of the activity (timelines) in a set of connected DUECA nodes.

This module can be created in the model script. See the description of TimingView for more information about how to set up the "dueca" part of the model script for your application.

Constructor & Destructor Documentation

◆ ActivityViewBase()

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

Constructor.

◆ ~ActivityViewBase()

dueca::ActivityViewBase::~ActivityViewBase ( )

Destructor.

Member Function Documentation

◆ getParameterTable()

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

Table with adjustable parameters.

◆ tokenValid()

void dueca::ActivityViewBase::tokenValid ( const TimeSpec ts)
protected

Function on token completion.

◆ requestDescriptionList()

void dueca::ActivityViewBase::requestDescriptionList ( const TimeSpec time)
protected

Request a list with descriptions from managers.

◆ single()

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

Obtain a pointer to the singleton.

◆ complete()

virtual bool dueca::ActivityViewBase::complete ( )
pure virtual

Completion, creates the window.

Reimplemented from dueca::Module.

Implemented in dueca::ActivityView.

◆ startModule()

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

Start the viewer, not used, since it will always work.

Implements dueca::Module.

◆ stopModule()

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

Stop the viewer, not used.

Implements dueca::Module.

◆ readLogOwn()

void dueca::ActivityViewBase::readLogOwn ( const TimeSpec time)

Re-draw the display of activities.

◆ readLogOthers()

void dueca::ActivityViewBase::readLogOthers ( const TimeSpec time)

Re-draw the display of activities.

◆ updateLines()

void dueca::ActivityViewBase::updateLines ( const ActivityLog *  log)

Re-draw the display of activities.

◆ getActivityList()

void dueca::ActivityViewBase::getActivityList ( const TimeSpec time)

Read a list of activity descriptions.

◆ sendSweepRequest()

void dueca::ActivityViewBase::sendSweepRequest ( const TimeSpec time)

Send a request to sweep up logs.

◆ triggerUpdate()

void dueca::ActivityViewBase::triggerUpdate ( )

Call for a measurement of the activities.

◆ setLookAhead()

bool dueca::ActivityViewBase::setLookAhead ( const double &  ahead)

Change the look-ahead time.

◆ setSpan()

void dueca::ActivityViewBase::setSpan ( double  span)
inline

Change the span of the logs.

◆ isPrepared()

bool dueca::ActivityViewBase::isPrepared ( )
virtual

Returns true if the module is prepared for starting.

Implements dueca::Module.

Member Data Documentation

◆ classname

const char* const dueca::ActivityViewBase::classname
static

Name of the module class.

◆ singleton

ActivityViewBase* dueca::ActivityViewBase::singleton
staticprotected

singleton pointer, there can only be one view in an executable.

◆ token_action

bool dueca::ActivityViewBase::token_action
protected

Flag to remember token completion.

◆ send_request

ChannelWriteToken dueca::ActivityViewBase::send_request
protected

Access token for a channel over which log requests are sent.

◆ log_channel0

ChannelReadToken dueca::ActivityViewBase::log_channel0
protected

Access token for a channel with the incoming logs.

◆ log_channelO

ChannelReadToken dueca::ActivityViewBase::log_channelO
protected

Access token for a channel with the incoming logs.

◆ current_logs

vector<ActivityWeaver> dueca::ActivityViewBase::current_logs
protected

A vector with the current logs.

ActivityWeaver objects assemble and interpret the raw logs, and can be queried to obtain a nice time-line. Each node needs one weaver.

◆ cb1

Callback<ActivityViewBase> dueca::ActivityViewBase::cb1
protected

Callback object 1, for processing log reports from local node.

◆ cb2

Callback<ActivityViewBase> dueca::ActivityViewBase::cb2
protected

Callback object 2, for processing log reports from elsewhere.

◆ cb3

Callback<ActivityViewBase> dueca::ActivityViewBase::cb3
protected

Callback object 3, for sending out a sweep-up request.

◆ process_log_reports0

ActivityCallback dueca::ActivityViewBase::process_log_reports0
protected

The activity that handles the incoming logs.

◆ process_log_reportsO

ActivityCallback dueca::ActivityViewBase::process_log_reportsO
protected

The activity that handles the incoming logs.

◆ send_sweep_request

ActivityCallback dueca::ActivityViewBase::send_sweep_request
protected

Sweep up logs.

◆ sweep_alarm

AperiodicAlarm dueca::ActivityViewBase::sweep_alarm
protected

Time for sweeping.

◆ sweep_done

bool dueca::ActivityViewBase::sweep_done
protected

Flag to remember sweeping.

◆ ticks_per_sec

int dueca::ActivityViewBase::ticks_per_sec
protected

Number of clock ticks per second, needed to calculate look-ahead times.

◆ prev_request_end

TimeTickType dueca::ActivityViewBase::prev_request_end
protected

The time at which the previous request for activity information ends.

◆ first_base_tick

TimeTickType dueca::ActivityViewBase::first_base_tick
protected

Tick at which request has been sent.

◆ current_base_tick

TimeTickType dueca::ActivityViewBase::current_base_tick
protected

Tick at which current request has been / will be sent.

◆ dspan

double dueca::ActivityViewBase::dspan
protected

Span of recording period, in seconds.

◆ vspan

double dueca::ActivityViewBase::vspan
protected

Span of the view, in seconds.

◆ activity_log

ofstream dueca::ActivityViewBase::activity_log
protected

File for dumping activity logs.

◆ hl

HighLight dueca::ActivityViewBase::hl
protected

Details of the highlighted area.

◆ hlnew

HighLight dueca::ActivityViewBase::hlnew
protected

Details of a new highlighted area.


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