Reactive Systems logo
Reactis API V2022.2

API - Reactis (C Bindings):
Reactis Report Configuration

rsReportConfigCreate a report configuration.
rsReportConfigDefaultCreates a report configuration with default settings.
rsReportConfigCloseClose a report configuration.
rsReportConfigGetGlobalDefaultGet the global default report configuration.
rsReportConfigGetItemsGet items included in report configuration.
rsReportConfigGetSummaryMetricsGet summary metrics in report configuration.
rsReportConfigGetDetailMetricsGet detail metrics in report configuration.
rsReportConfigGetDetailStatusGet detail status in report configuration.
rsReportConfigGetDiffLimitGet the limit on the number of difference details which will appear in a report.
rsReportConfigSetGlobalDefaultSet the global default report configuration.
rsReportConfigSetItemsSet items included in report configuration.
rsReportConfigSetSummaryMetricsSet summary metrics in report configuration.
rsReportConfigSetDetailMetricsSet detail metrics in report configuration.
rsReportConfigSetDetailStatusSet detail status in report configuration.
rsReportConfigSetDiffLimitSpecify a limit on the number of difference details which will appear in a report.
rsReportItemFromStringConverts a string to an individual RsReportItem value.
rsReportItemToStringConverts an individual RsReportItem value to a string.
rsRsiGetDefaultReportConfigGet the default report configuration for an .rsi file.
rsRsiSetDefaultReportConfigSet the default report configuration for an .rsi file.
rsTargetStatusFromStringConvert a string to a RsTargetStatus value.
rsTargetStatusToStringConvert a RsTargetStatus value to a string.


rsReportConfig

Create a report configuration.

Syntax

RsReportConfig *rsReportConfig (
    RsReportItem  items,
    RsCoverageMetric  summaryMetrics,
    RsCoverageMetric  detailMetrics,
    RsTargetStatus  detailStatus
);

Parameters

items
The set of items to appear in the report.
summaryMetrics
The set of coverage metrics to be displayed in the coverage summary.
detailMetrics
The set of coverage metrics to be included in the coverage details.
detailStatus
The set of coverage statuses to be included in the coverage details.

Return Value

Pointer to a Report configuration, which will produce a report containing the specified information.

The returned configuration should be discarded via a call to rsReportConfigClose once it is no longer needed. Note that functions which generate reports make their own copy of the configuration, so deleting the configuration will not affect any report data which has already been generated.


rsReportConfigDefault

Creates a report configuration with default settings.

Syntax

RsReportConfig *rsReportConfigDefault (void);

Parameters

None.

Return Value

Pointer to a report configuration which will produce a report containing default information, which includes everything except MCC coverage data. The configuration can be changed using the rsReportConfigSet functions.

Note that rsReportConfigDefault () is equivalent to rsReportConfig (RsRptDefault, RsCvgDefault, RsCvgDefault, RsTgtDefault).

The returned configuration should be closed via a call to rsReportConfigClose once it is no longer needed. Note that functions which generate reports make their own copy of the configuration, so deleting the configuration will not affect any report data which has already been generated.


rsReportConfigClose

Close a report configuration.

Stop using a report configuration.

Syntax

void rsReportConfigClose (RsReportConfig *config);

Parameters

config
A report configuration generated by rsReportConfig or rsReportConfigDefault.

Return Value

None. The memory which holds the value of config is recycled. Any subsequent use of the configuration is erroneous, any will have unpredictable effects. Note that functions which generate reports make a copy of the configuration, so it is safe to delete the configuration immediately after they are used.


rsReportConfigGetGlobalDefault

Get the global default report configuration.

Syntax

RsReportConfig  *rsReportConfigGetGlobalDefault  (RsHandle *h);

Parameters

h
Pointer to RsHandle structure as returned by rsOpen.

Return Value

Pointer to a report configuration whose settings match the values shown in the "Default Model-Specific Settings" dialog.

NULL is returned if an error occurred while retrieving the report configuration, in which case you may call rsGetLastError to retrieve the error message.

The returned configuration should be closed via a call to rsReportConfigClose once it is no longer needed. Note that functions which generate reports make their own copy of the configuration, so deleting the configuration will not affect any report data which has already been generated.


rsReportConfigGetItems

Get items included in report configuration.

Get the set of items which will appear in a report.

Syntax

RsReportItem  rsReportConfigGetItems (const RsReportConfig *config);

Parameters

config
A report configuration.

Return Value

The set of items (in the form of an RsReportItem bit-mask) which will appear in any report generated from config.


rsReportConfigGetSummaryMetrics

Get summary metrics in report configuration.

Get the set of metrics which will appear in the Coverage Summary section of a report.

Syntax


RsCoverageMetric rsReportConfigGetSummaryMetrics (const RsReportConfig
*config);

Parameters

config
A report configuration.

Return Value

The set of items (in the form of an RsCoverageMetric bit-mask) which will appear in the Coverage Summary section of any report generated from config.


rsReportConfigGetDetailMetrics

Get detail metrics in report configuration.

Get the set of metrics which will appear in the Coverage Details section of a report.

Syntax


RsCoverageMetric rsReportConfigGetDetailMetrics (const RsReportConfig
*config);

Parameters

config
A report configuration.

Return Value

The set of coverage metrics (in the form of an RsCoverageMetric bit-mask) which will appear in the Coverage Details section of any report generated via config.


rsReportConfigGetDetailStatus

Get detail status in report configuration.

Get the set of coverage statuses which will appear in the Coverage Details section of a report.

Syntax


RsTargetStatus rsReportConfigGetDetailStatus (const RsReportConfig
*config);


Parameters

config
A report configuration.

Return Value

The set of target coverage statuses (in the form of an RsTargetStatus bit-mask) which will appear in the Coverage Details section of any report generated from config.


rsReportConfigGetDiffLimit

Get the limit on the number of difference details which will appear in a report.

Syntax

unsigned  int  rsReportConfigGetDiffLimit(const RsReportConfig*);

Parameters

config
A pointer to report configuration.

Return Value

A limit on the number of differences for which details will appear in a report. Differences beyond the limit are still counted in summaries, but no details are given.


rsReportConfigSetGlobalDefault

Set the global default report configuration.

Syntax

int rsReportConfigSetGlobalDefault(
     RsHandle *h, 
     const RsReportConfig* config
);

Parameters

h
Pointer to RsHandle structure as returned by rsOpen.
config
Pointer to report configuration.

Return Value

0
If an error occurred. In this case, call rsGetLastError to get the error string.
1
If no error occurred.



rsReportConfigSetItems

Set items included in report configuration.

Specify which items will appear in a report.

Syntax

void rsReportConfigSetItems (
    const RsReportConfig *config,
    RsReportItem items
);

Parameters

config
A report configuration.
items
A set of report items.

Return Value

None. The set of items which will appear in any report generated from config is set to items.


rsReportConfigSetSummaryMetrics

Set summary metrics in report configuration.

Specify which metrics will appear in the Coverage Summary section of a report.

Syntax

void rsReportConfigSetSummaryMetrics (
    const RsReportConfig *config,
    RsCoverageMetric  metrics
);

Parameters

config
A report configuration.
metrics
A set of coverage metrics.

Return Value

None. The set of items which will appear in the Coverage Summary section of any report generated from config is set to metrics.


rsReportConfigSetDetailMetrics

Set detail metrics in report configuration.

Specify which metrics will appear in the Coverage Details section of a report.

Syntax

void rsReportConfigSetDetailMetrics (
    const RsReportConfig *config,
    RsCoverageMetric  metrics
);

Parameters

config
A report configuration.
metrics
A set of coverage metrics.

Return Value

None. The set of coverage metrics which will appear in the Coverage Details section of any report generated from config is set to metrics.


rsReportConfigSetDetailStatus

Set detail status in report configuration.

Specify which coverage statuses will appear in the Coverage Details section of a report.

Syntax

void rsReportConfigSetDetailStatus (
    const RsReportConfig *config,
    RsTargetStatus status
);

Parameters

config
A report configuration.
status
A set of target coverage statuses.

Return Value

None. The set of target coverage statuses which will appear in the Coverage Details section of any report generated from config is set to status.


rsReportConfigSetDiffLimit

Specify a limit on the number of difference details which will appear in a report.

Syntax

void  rsReportConfigSetDiffLimit(
     RsReportConfig*, 
     unsigned int limit
);

Parameters

config
A pointer to report configuration.
limit
A limit on the number of differences for which details will appear.

Effects

config is updated so that the difference details are limited to the specified quantity in any report generated from config. Differences beyond this limit will still be counted in summaries, but no details will be given.


rsReportItemFromString

Converts a string to an individual RsReportItem value.

Syntax


RsReportItem  rsReportItemFromString (const char *str);

Parameters

str
String holding the name of an RsReportItem. See RsReportItem for the list of recognized names.

Return Value

Returns the individual RsReportItem value whose name matches str (using case-insensitive comparison). The RsReportItem values are listed in RsReportItem.

Returns RsRptNone if there is no match. In this case, rsGetLastError should NOT be called.


rsReportItemToString

Converts an individual RsReportItem value to a string.

Syntax


const char *rsReportItemToString (RsReportItem  item);

Parameters

item
An individual report item. The RsReportItem values are listed in RsReportItem.

Return Value

Returns a constant string representing item, one of the individual report items. The strings that report items mapped to are listed in RsReportItem.

Returns NULL if item is not one of the individual RsReportItem values. In this case, rsGetLastError should NOT be called.


rsRsiGetDefaultReportConfig

Get the default report configuration for an .rsi file.

Syntax

RsReportConfig  *rsRsiGetDefaultReportConfig  (RsRsiFile *hRsi);

Parameters

hRsi
Pointer to RsRsiFile structure as returned by rsRsiOpen.

Return Value

Pointer to a report configuration whose settings match the values shown in the "Default Model-Specific Settings" dialog.

NULL is returned if an error occurred while retrieving the report configuration, in which case you may call rsGetLastError to retrieve the error message.

The returned configuration should be closed via a call to rsReportConfigClose once it is no longer needed. Note that functions which generate reports make their own copy of the configuration, so deleting the configuration will not affect any report data which has already been generated.


rsRsiSetDefaultReportConfig

Set the default report configuration for an .rsi file.

Syntax

int rsRsiSetDefaultReportConfig(
     RsRsiFile *hRsi, 
     const RsReportConfig* config
);

Parameters

hRsi
Pointer to RsRsiFile structure as returned by rsRsiOpen.
config
Pointer to report configuration.

Return Value

0
If an error occurred. In this case, call rsGetLastError to get the error string.
1
If no error occurred.



rsTargetStatusFromString

Convert a string to a RsTargetStatus value.

Syntax

RsTargetStatus rsTargetStatusToString (const char *str);

Parameters

str
A string containing the name of an individual target status. See RsTargetStatus for the list of valid names.

Return Value

Returns the target status whose value matches str (using case-insensitive comparison). The target status values are listed in RsTargetStatus.

Returns RsTgtNone if there is no match. In this case, rsGetLastError should NOT be called.


rsTargetStatusToString

Convert a RsTargetStatus value to a string.

Syntax

const char *rsTargetStatusToString (RsTargetStatus  stat);

Parameters

stat
One of the individual target status values listed in RsTargetStatus.

Return Value

Returns a constant string representing the value of stat, if stat is one of the individual status values listed in RsTargetStatus. The value of this string will be one of the names listed in RsTargetStatus.

Returns NULL if stat is not one of the individual target status values. In this case, rsGetLastError should NOT be called.