DUECA/DUSIME
Loading...
Searching...
No Matches
Public Member Functions | List of all members
dueca::ActivityView Class Reference

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

#include <ActivityView.hxx>

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

Public Member Functions

 ActivityView (Entity *e, const char *part, const PrioritySpec &ps)
 Constructor.
 
 ~ActivityView ()
 Destructor.
 
bool complete () final
 Completion, creates the window.
 
bool setPositionAndSize (const std::vector< int > &ps) final
 Pre-define a position and size for the window.
 
void updateLines (unsigned idlog) final
 Re-draw the display of activities.
 
void cbClose (GtkButton *button, gpointer gp)
 Gtk window callbacks.
 
gboolean deleteView (GtkWidget *window, GdkEvent *event, gpointer user_data)
 callback, close the view on deletion by window manager.
 
void cbUpdate (GtkButton *button, gpointer gp)
 Collect new activity log data.
 
void cbViewSpan (GtkWidget *spin, gpointer gp)
 Update view span.
 
void cbRecordSpan (GtkWidget *spin, gpointer gp)
 Update record span.
 
int cbViewScroll (GtkWidget *w, GdkEventButton *e, gpointer gp)
 Update view window after scrolling.
 
int cbDraw (GtkWidget *w, cairo_t *cr, gpointer user_data)
 Redraw stuff.
 
int cbConfigure (GtkWidget *w, GdkEventConfigure *event)
 realize widget stuff.
 
int cbDrawAreaButtonPress (GtkWidget *w, GdkEventButton *ev)
 React to a button press on a drawing area, by starting a highlight.
 
int cbDrawAreaButtonRelease (GtkWidget *w, GdkEventButton *ev)
 React to a button release on a drawing area, by completing a highlight.
 
- Public Member Functions inherited from dueca::ActivityViewBase
 ActivityViewBase (Entity *e, const char *part, const PrioritySpec &ps)
 Constructor.
 
 ~ActivityViewBase ()
 Destructor.
 
void startModule (const TimeSpec &time)
 Start the viewer, not used, since it will always work.
 
void stopModule (const TimeSpec &time)
 Stop the viewer, not used.
 
void readLogOwn (const TimeSpec &time)
 Re-draw the display of activities.
 
void readLogOthers (const TimeSpec &time)
 Re-draw the display of activities.
 
void updateLines (const ActivityLog *log)
 Re-draw the display of activities.
 
void getActivityList (const TimeSpec &time)
 Read a list of activity descriptions.
 
void sendSweepRequest (const TimeSpec &time)
 Send a request to sweep up logs.
 
void triggerUpdate ()
 Call for a measurement of the activities.
 
bool setLookAhead (const double &ahead)
 Change the look-ahead time.
 
void setSpan (double span)
 Change the span of the logs.
 
bool isPrepared ()
 Returns true if the module is prepared for starting.
 
const string32getActivityName (int node, int acno)
 Return the name of an activity (if known)
 
void processLog (const ActivityLog *log)
 Process a single log.
 
- Public Member Functions inherited from dueca::Module
virtual ~Module ()
 Destructor.
 
virtual bool isInitialPrepared ()
 To check whether the module is prepared to be prepared.
 
ObjectType getObjectType () const
 The object type within DUECA.
 
virtual void initialStartModule (const TimeSpec &time)
 Initial start opportunity.
 
virtual void finalStopModule (const TimeSpec &time)
 Final stop command.
 
const Entity * getMyEntity ()
 Return a pointer to the entity to which this module belongs.
 
const ModuleStategetState ()
 Return the module state.
 
- 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.
 

Additional Inherited Members

- Static Public Member Functions inherited from dueca::ActivityViewBase
static const ParameterTablegetParameterTable ()
 Table with adjustable parameters.
 
static ActivityViewBasesingle ()
 Obtain a pointer to the singleton.
 
- Static Public Attributes inherited from dueca::ActivityViewBase
static const char *const classname
 Name of the module class.
 
- Protected Member Functions inherited from dueca::ActivityViewBase
void tokenValid (const TimeSpec &ts)
 Function on token completion.
 
void requestDescriptionList (const TimeSpec &time)
 Request a list with descriptions from managers.
 
- 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.
 
 NamedObject (const NameSet &ns)
 Normal constructor, protected, because it has no use to create a NamedObject by itself.
 
virtual ~NamedObject ()
 Destructor.
 
- Protected Attributes inherited from dueca::ActivityViewBase
Callback< ActivityViewBasetoken_valid
 Function on token completion.
 
bool token_action
 Flag to remember token completion.
 
bool can_start
 Flag to indicate start possible.
 
ChannelWriteToken send_request
 Access token for a channel over which log requests are sent.
 
ChannelReadToken log_channel0
 Access token for a channel with the incoming logs.
 
ChannelReadToken log_channelO
 Access token for a channel with the incoming logs.
 
vector< ActivityWeavercurrent_logs
 A vector with the current logs.
 
Callback< ActivityViewBasecb1
 Callback object 1, for processing log reports from local node.
 
Callback< ActivityViewBasecb2
 Callback object 2, for processing log reports from elsewhere.
 
Callback< ActivityViewBasecb3
 Callback object 3, for sending out a sweep-up request.
 
ActivityCallback process_log_reports0
 The activity that handles the incoming logs.
 
ActivityCallback process_log_reportsO
 The activity that handles the incoming logs.
 
ActivityCallback send_sweep_request
 Sweep up logs.
 
AperiodicAlarm sweep_alarm
 Time for sweeping.
 
bool sweep_done
 Flag to remember sweeping.
 
int ticks_per_sec
 Number of clock ticks per second, needed to calculate look-ahead times.
 
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.
 
TimeTickType first_base_tick
 Tick at which request has been sent.
 
TimeTickType current_base_tick
 Tick at which current request has been / will be sent.
 
double dspan
 Span of recording period, in seconds.
 
double vspan
 Span of the view, in seconds.
 
ofstream activity_log
 File for dumping activity logs.
 
HighLight hl
 Details of the highlighted area.
 
HighLight hlnew
 Details of a new highlighted area.
 
- Protected Attributes inherited from dueca::Module
ModuleState state
 Flag to remember whether we are stopped due to some error with hardware device manipulation.
 
- Static Protected Attributes inherited from dueca::ActivityViewBase
static ActivityViewBasesingleton
 singleton pointer, there can only be one view in an executable.
 

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.

Member Function Documentation

◆ complete()

bool dueca::ActivityView::complete ( )
finalvirtual

Completion, creates the window.

Implements dueca::ActivityViewBase.

◆ setPositionAndSize()

bool dueca::ActivityView::setPositionAndSize ( const std::vector< int > & ps)
finalvirtual

Pre-define a position and size for the window.

Reimplemented from dueca::ActivityViewBase.

◆ updateLines()

void dueca::ActivityView::updateLines ( unsigned idlog)
finalvirtual

Re-draw the display of activities.

Implements dueca::ActivityViewBase.

◆ cbClose()

void dueca::ActivityView::cbClose ( GtkButton * button,
gpointer gp )

Gtk window callbacks.

Close the window.


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