Data Monitor

From dmon2
Jump to navigationJump to search

Overview

DMON allows the user to monitor addresses on the board by periodically sampling them. The user can configure a start condition, a stop condition and a number of addresses to poll. The user can also choose to display the data as it is polled in several formats. The data can also be stored in a file.

The top level menu shown in the figure above offers a number of options

  1. Configure Variable Set: opens a dialog window to configure the current variable set which is being prepared.
  2. Load Variable Set: load a variable set from an XML file which describes a Variable Set to be monitored. Performs validation and reports any errors to the user.
  3. Save Variable Set: save the current variable set to an XML file.
  4. Export XML schema: exports the XML Schema which is used to define the legal XML for a variable set.
  5. Start Monitoring: Start monitoring the data set. This first performs some additional validity checks on the data set and then starts the polling of data at 100 ms. Start and Stop Conditions are applied.

Monitoring Operation

Once start monitoring is chosen the monitoring state machine shown below becomes operational after the variable set has been validated. Variable set validation ensures that all required items are defined, and that any program symbols used can be resolved. There are a number of options which affect the polling:

  • pollWhenNotRunning: If this flag is set, polling starts immediately, otherwise data will only be polled when an application program is running and is being monitored by DMON.
  • The optional start and stop triggers must be enabled. Start and Stop trigger are independent.
  • Once started polling continues until it is stopped by
    • The “Stop Monitoring” item on the menu which replaces the “Start Monitoring”
    • The user interrupts DMON operation using the stop command or Ctrl-C
    • CAUTION: closing a display window will stop that window displaying data but does not affect polling.


Gui-monitorstatemachine.gif

Data Configuration Menu

Gui-datamonitorcommonsettings.gif

Dialog Elements

  • Name: a name for the data set. This is for documentation purposes in the XML.
  • Start Trigger: see below
  • Stop Trigger: see below
  • Store in file: Boolean flag. If set data will be stored as sampled in the file specified. The format is Date, Time, Subsecond time, Item name, Value(s) as 32 bit hex. For examples see below.
  • Filename: name of file in which to store data
  • pollWhenNotRunning: If this flag is set, polling starts immediately, otherwise data will only be polled when an application program is running and is being monitored by DMON.
  • Configure Display Sets: see below
  • Configure Data Items: see below

Start/Stop Trigger

The following items may be configured for the start or stop trigger. Either trigger is optional and will be ignored if not defined or if it is not enabled.

Item Type Description
Address String Address to poll; may use an expression using ELF symbols. This will be evaluated when polling is started by the user and must be valid at that point.
Mask 32 bit integer Value read from address will be compared with the mask using the condition operator described below. Note: Mask will be stored as a string in XML but must be a valid Long integer in Hex, Decimal or Octal format. It is entered as a hex value in the dialog.
Condition enumeration Condition applied to value read and mask to determine whether the condition is met. For bitwise conditions the condition is met if the result of applying it to the value read and the mask is non zero. All comparisons are on the basis of unsigned integers. One of Bitwise And, Bitwise Or, Bitwise XOR, Less than, Greater than, Less than or equal, Greater than or equal, Exactly equal.
enabled Boolean Whether to apply the trigger

Configure Display Sets

Each Data Item may belong to a Display set. If a display set is in used by a Data Item it is not possible to remove it.

The configure dialog permit setting the parameters for each graph type. The “max samples” option is the upper limit for the number of samples displayed on the graph. Older samples are discarded.

Other parameters govern the scaling and labelling of axes. The screenshots below show how to configure data items and display sets.


Gui-datamonitordisplayset.gif

Gui-datamonitordataitems.gif

Gui-datamonitordisplaysetconfigure.gif

Gui-datamoitordisplays.gif

Data Item Configuration

Data Items are defined by

  • A name; must be unique in the Data Set
  • An Address; may use ELF symbols and expressions. If a program has been loaded symbols will be presented in a drop down list for selection.
  • Data Type can be SIGNED_INT, UNSIGNED_INT, SIGNED_SHORT, UNSIGNED_SHORT.
  • Length is number of data types to sample starting at address above.
  • Whether to display the item. If the display option is chosen a drop down list of available display sets is shown.
  • The “Parameters” button is used to further configure display, by assigning a colour for example. It depends on the display set chosen.

Gui-datamonitordataitemsconfigure.gif

Output File Examples

This shows several data items being polled, with 5 values being polled from one of the addresses:


2015-06-02, 15:31:50,756000000,x,0x00000219,

2015-06-02, 15:31:50,803000000,beat,0x00000327,

2015-06-02, 15:31:50,804000000,y,0x00000373,0x000003e8,0x00000327,0x400921fb,0x54442d18,

2015-06-02, 15:31:50,868000000,y2,0x000003e8,

2015-06-02, 15:31:50,884000000,x,0x00000219,

2015-06-02, 15:31:50,980000000,beat,0x00000327,

2015-06-02, 15:31:50,981000000,y,0x00000373,0x000003e8,0x00000327,0x400921fb,0x54442d18,

2015-06-02, 15:31:51,39000000,y2,0x000003e8,

 

Console commands

There are console commands which allow some of the functionality above to be used.

datamon load [filename] load a DataSet from an xml file
datamon save [filename] save the current DataSet to an xml file
datamon start Validate the current DataSet. If successful, start monitoring
datamon stop stop monitoring
datamon xsd [filename] save schema for DataSet to the specified file