winIDEA SDK
isys::CProfilerArea2 Class Reference

Description

This class contains information about profiler area (function or data), which has been profiled.

Areas are identified by 64-bit IDs, which are composed of area handle and area value. Function areas and non-state variable areas have value always set to 0.

Python example: profiler_data.py

#include <CProfilerData2.h>

Public Types

enum  EAreaType {
  EFunctions , EFunctionLines ,
  EVariables , EStateVariables ,
  EAUX , EStateAUX ,
  EInspector , EStateInspector
}
 This enumeration defines profiler area types. More...
 

Public Member Functions

EAreaType getAreaType () const
 Returns area type.
 
DWORD getHandle () const
 Returns area handle.
 
std::string getAreaName () const
 Returns area name. More...
 
std::string getFileName () const
 Returns file name. More...
 
std::string getPath () const
 Returns path from root node. More...
 
areaHandle_t getAreaId () const
 Returns unique Id for area.
 
int64_t getValue () const
 Returns area value for state variables. More...
 
DWORD getLineNumber () const
 Returns line number for function lines. More...
 
DWORD getParentHandle () const
 For state variable areas this method returns handle of variable, which was recorded, for function lines function handle is returned. More...
 
std::string getParentAreaName () const
 For state variable areas this method returns the name of variable, which was recorded with this value, for function lines function name is returned. More...
 
std::string getValueUnit () const
 Returns physical unit of value, for example V for Volts, A, for Amperes, ...
 
std::string getValueType () const
 Returns type of value, 'I32' for 32-bit unsigned integers, 'S32' for 32-bit signed integers, or 'F32' for 32-bit floats.
 
bool hasStates ()
 Returns true, if state areas exist for variable area. More...
 
areaHandle_t getStateAreaId (DWORD value)
 Returns ID for state areas if they exist for the variable, 0 otherwise. More...
 

Static Public Member Functions

static areaHandle_t handle2AreaId (DWORD handle, int64_t value=0)
 Utility method, which returns area type for the given handle.
 

Member Enumeration Documentation

◆ EAreaType

This enumeration defines profiler area types.

Enumerator
EFunctions 

function (code) areas

EFunctionLines 

deprecated since 9.17.36, Jan. 2018

EVariables 

variable areas for regular (non-state) variables.

No statistics is recorded for values.

EStateVariables 

state variables, which have at most 256 values.

Statistics (see CProfilerStatistics2) is recorded for each value. Examples of such variables are task Id and states in state machines.

EAUX 

IO lines as value.

EStateAUX 

IO lines as state.

EInspector 

inspector area, implemented as state machine with other areas as inputs

EStateInspector 

state inspector area, implemented as state machine with other areas as inputs

Member Function Documentation

◆ getAreaName()

std::string isys::CProfilerArea2::getAreaName ( ) const
inline

Returns area name.

For function, variable and AUX areas this method returns function, variable, or AUX name. For function lines the source code of the line is returned. For state variables an empty string is returned, unless the variable was added to profiler with method CProfilerController2::addStateVariable(). Definition name (for example enum constant) is returned in this case.

◆ getFileName()

std::string isys::CProfilerArea2::getFileName ( ) const
inline

Returns file name.

Available only for function line areas.

◆ getLineNumber()

DWORD isys::CProfilerArea2::getLineNumber ( ) const
inline

Returns line number for function lines.

For other areas it returns 0.

◆ getParentAreaName()

std::string isys::CProfilerArea2::getParentAreaName ( ) const
inline

For state variable areas this method returns the name of variable, which was recorded with this value, for function lines function name is returned.

For example, if state variable 'counter' was recorded with value '3', than state area has empty name (method getName() returns empty string), but this method returns 'counter' and getValue() returns '3'. Returns empty string for other ares.

◆ getParentHandle()

DWORD isys::CProfilerArea2::getParentHandle ( ) const
inline

For state variable areas this method returns handle of variable, which was recorded, for function lines function handle is returned.

For example, if state variable 'counter' was recorded with value '3', this method returns handle of variable 'counter'.

Returns 0 for other ares.

◆ getPath()

std::string isys::CProfilerArea2::getPath ( ) const
inline

Returns path from root node.

Path consists of node names separated with '/'.

◆ getStateAreaId()

areaHandle_t isys::CProfilerArea2::getStateAreaId ( DWORD  value)
inline

Returns ID for state areas if they exist for the variable, 0 otherwise.

For example, if variable mysStateVar has states S_ENTER, and S_EXIT, method getStateAreaID() on area of myStateVar will return the same ID as getParentHandle() method on areas S_ENTER and S_EXIT. This way we can connect state variables and their states.

Parameters
valueignored, no longer used after 9.12.274.
See also
hasStates()

◆ getValue()

int64_t isys::CProfilerArea2::getValue ( ) const
inline

Returns area value for state variables.

For functions, function lines, and non-state variable areas it returns 0.

◆ hasStates()

bool isys::CProfilerArea2::hasStates ( )
inline

Returns true, if state areas exist for variable area.

See also
getStateAreaId()