|
Reactis API V2022.2
API - Reactis (C Bindings): Reactis Info File (Inputs and Outputs)
rsRsiGetNumInputs
Return the number of inputs in the .rsi file.
Syntax
int rsRsiGetNumInputs (RsiFile *h);
Parameters
- h
- Pointer to RsiFile structure as returned by rsRsiOpen.
Return Value
Returns the number of inputs in the .rsi file or -1 if an error
occurred. In case of an error, you may call rsGetLastError to
retrieve the error message string.
rsRsiGetNumOutputs
Return the number of output ports in the .rsi file.
Syntax
int rsRsiGetNumOutputs (RsRsiFile *hRsi);
Parameters
- hRsi
- Pointer to RsRsiFile structure as returned by rsRsiOpen.
Return Value
Returns the number of outputs in the .rsi file or -1 if an error occurred.
In that case, you may call rsGetLastError to retrieve the error
message string.
rsRsiGetInputName
Retrieve the name of an input port in the .rsi file.
Return the name of an input port in the .rsi file.
Syntax
int rsRsiGetInputName (RsiFile *h, int index, char *buffer, int bufferSize);
Parameters
- h
- Pointer to RsiFile structure as returned by rsRsiOpen.
- index
- Index of the input. This value must be greater or equal to 0 and less than
the return value of rsRsiGetNumInputs.
- buffer
- The buffer that receives the input name. The buffer’s size must correspond
to the value of the bufferSize parameter. If the buffer parameter is NULL,
then the value returned by rsRsiGetInputName will be the buffer size
required to store the whole name.
- bufferSize
- The size of the buffer passed in as the third argument. If the actual name
is longer than this value, it will be truncated to the length of the
buffer. In that case, the return value of rsRsiGetInputName will be
the buffer size that would be required to receive the whole name.
Return Value
- -1
- If an error occurred. In this case, you may call rsGetLastError to
retrieve the error message string.
- 0
- On success.
- A value greater than 0
- If either the buffer parameter is NULL or the bufferSize was not sufficient
to receive the complete name. In that case, the value returned specifies the
buffer size required to store the complete name.
rsRsiGetOutputName
Retrieve the name of an output port in the .rsi file.
Syntax
int rsRsiGetOutputName (RsRsiFile *hRsi, int index, char *buffer, int bufferSize);
Parameters
- hRsi
- Pointer to RsRsiFile structure as returned by rsRsiOpen.
- index
- Index of the output. This value must be greater or equal to 0 and less than
the return value of rsRsiGetNumOutputs.
- buffer
- The buffer that receives the output name. The buffer's size must
correspond to the value of the bufferSize parameter. If the buffer
parameter is NULL, then the value returned by rsRsiGetOutputName will
be the buffer size required to store the whole name.
- bufferSize
- The size of the buffer passed in as the third argument. If the actual name
is longer than this value, it will be truncated to the length of the
buffer. In that case, the return value of rsRsiGetOutputName will be the
buffer size that would be required to receive the whole name.
Return Value
- -1
- If an error occurred. In this case, you may call
rsGetLastError to retrieve the error message string.
- 0
- On success.
- A value greater than 0
- If either the buffer parameter is NULL or
the bufferSize was not sufficient to receive the complete name.
In that case, the value returned specifies the buffer size required to store
the complete name.
rsRsiGetInputType
Get the type of an input in the .rsi file.
Return the data type of an input port in the .rsi file. For a
description of the syntax of types in .rsi files see
the Type Constraint Syntax section in the Reactis User's Guide.
Syntax
int rsRsiGetInputType (RsiFile *h, const char *inputName, char *buffer, int
bufferSize);
Parameters
- h
- Pointer to RsiFile structure as returned by rsRsiOpen.
- inputName
- Name of the input for which the type string should be returned.
- buffer
- The buffer that receives the input type string. The buffer’s size must
correspond to the value of the bufferSize parameter. If the buffer
parameter is NULL, then the value returned by rsRsiGetInputType will
be the buffer size required to store the whole type string.
- bufferSize
- The size of the buffer passed in as the third argument. If the actual type
string is longer than this value, it will be truncated to the length of the
buffer. In that case, the return value of rsRsiGetInputType will be
the buffer size that would be required to receive the whole type string.
Return Value
- -1
- If an error occurred. In this case, you may call rsGetLastError to
retrieve the error message string.
- 0
- On success.
- A value greater than 0
- If either the buffer parameter is NULL or the bufferSize was not sufficient
to receive the complete type string. In that case, the value returned
specifies the buffer size required to store the complete type string.
rsRsiSetInputType
Set the type of an input in the .rsi file.
Set the data type of an input in the .rsi file. For a description of
the syntax of types in .rsi files see
the Type Constraint Syntax section in the Reactis User's Guide.
Syntax
int rsRsiSetInputType (RsiFile *h, const char *portName, char *portType);
Parameters
- h
- Pointer to RsiFile structure as returned by rsRsiOpen.
- portName
- Name of the input port for which the type string should be changed.
- portType
- New type string for the input port.
Return Value
- 0
- If an error occurred. In this case, call rsGetLastError to get the
error string.
- 1
- If no error occurred.
rsRsiGetInputTypeElement
Get the type of a sub-element within a non-scalar input
in the .rsi file.
For a description of the syntax of types in .rsi files see
section 5.3.2 ("Type Constraint Syntax") in the Reactis User's guide.
Syntax
int rsRsiGetInputTypeElement(
RsRsiFile *hRsi,
const char *portName,
const char *element,
char *buffer,
int bufferSize
);
Parameters
- hRsi
- Pointer to RsRsiFile structure as returned by rsRsiOpen.
- portName
- Name of the input port for which the type string should be returned.
- element
- Specifies an element of the type to be accessed. For example, "b.b1.a(3,5)"
selects element (3,5) from element a within bus b1 which is a sub-bus
within bus b.
- buffer
- The buffer that receives the input type string. The buffer's size must
correspond to the value of the bufferSize parameter. If the
buffer parameter is NULL, then the value returned by
rsRsiGetInputType will be the buffer size required to store the whole
type string.
- bufferSize
- The size of the buffer passed in as the third argument. If the actual type
string is longer than this value, it will be truncated to the length of the
buffer. In that case, the return value of rsRsiGetInputType will be
the buffer size that would be required to receive the whole type string.
Return Value
- -1
- If an error occurred. In this case, you may call
rsGetLastError to retrieve the error message string.
- 0
- On success.
- A value greater than 0
- If either the buffer parameter is NULL or
the bufferSize was not sufficient to receive the complete type
string. In that case, the value returned specifies the buffer size
required to store the complete type string.
rsRsiSetInputTypeElement
Set the type of a sub-element within a non-scalar input in the .rsi file.
For a description of the syntax of types in .rsi files see
section 5.3.2 ("Type Constraint Syntax") in the Reactis User's guide.
Syntax
int rsRsiSetInputTypeElement(
RsRsiFile *hRsi,
const char *portName,
const char *element,
char *portType
);
Parameters
- hRsi
- Pointer to RsRsiFile structure as returned by rsRsiOpen.
- portName
- Name of the input port for which the type string should be changed.
- element
- Specifies an element of the type to be accessed. For example, "b.b1.a(3,5)"
selects element (3,5) from element a within bus b1 which is a sub-bus
within bus b.
- portType
- New type string for the input port.
Return Value
- 0
- If an error occurred. In this case, call rsGetLastError to get
the error string.
- 1
- If no error occurred.
rsRsiGetOutputType
Return the data type of an output port in the .rsi file.
Return the data type of an output port in the .rsi file. For a description of
the syntax of types in .rsi files see
the Type Constraint Syntax section in the Reactis User's Guide.
Syntax
int rsRsiGetOutputType(RsRsiFile *hRsi, const char *portName, char *buffer, int bufferSize);
Parameters
- hRsi
- Pointer to RsRsiFile structure as returned by rsRsiOpen.
- portName
- Name of the output port for which the type string should be returned.
- buffer
- The buffer that receives the output type string.
The buffer's size must correspond to the value of the
bufferSize parameter. If the buffer parameter is NULL then the
value returned by rsRsiGetOutputType will be the buffer
size required to store the whole type string.
- bufferSize
- The size of the buffer passed in as the third argument. If
the actual type string is longer than this value, it will be truncated
to the length of the buffer. In that case the return value of
rsRsiGetOutputType will be the buffer size that would be
required to receive the whole type string.
Return Value
- -1
- If an error occurred. In this case you may call rsGetLastError
to retrieve the error message string.
- 0
- On success.
- Value greater than 0
- If either the buffer parameter is NULL or the bufferSize was not
sufficient to receive the complete type string. In that case the
value returned specifies the buffer size required to store the
complete type string.
rsRsiGetOutputTolerance
Get the tolerance for an output in the .rsi file.
Return the data type of an output port in the .rsi file. For a description
of the syntax of types in .rsi files see section
the Type Constraint Syntax section in the Reactis User's Guide.
Syntax
int rsRsiGetOutputTolerance(RsRsiFile *h, const char *portName, double *tolerance);
Parameters
- h
- Pointer to RsRsiFile structure as returned by rsRsiOpen.
- portName
- Name of the output port for which the type string should be returned.
- tolerance
- Pointer to a double value that will receive the port's tolerance.
Return Value
- 0
- If an error occurred. In this case, call rsGetLastError to get the
error string.
- 1
- If no error occurred.
rsRsiSetOutputTolerance
Set the tolerance for an output in the .rsi file.
Set the tolerance of an output port in the .rsi file. For a description of
the syntax of types in .rsi files see
section 5.3.2 ("Type Constraint Syntax") in the Reactis User's Guide.
Syntax
int rsRsiSetOutputTolerance(RsRsiFile *h, const char *portName, double tolerance);
Parameters
- h
- Pointer to RsRsiFile structure as returned by rsRsiOpen.
- portName
- Name of the output port for which the type string should be changed.
- tolerance
- Tolerance to set for the port.
Return Value
- 0
- If an error occurred. In this case, call rsGetLastError to get the
error string.
- 1
- If no error occurred.
rsRsiGetOutputIntervals
Get the coverage tracking intervals for an output in the .rsi file.
Returns a string containing a comma-separated list of tracking intervals specified
for an output in the .rsi file. For the interval syntax used please see function rsRsiSetOutputIntervals.
Syntax
int rsRsiGetOutputIntervals(RsRsiFile *h, const char *portName, const char *element, char *buffer, int bufferSize);
Parameters
- h
- Pointer to RsRsiFile structure as returned by rsRsiOpen.
- portName
- Name of the output port for which the coverage tracking intervals should be set.
- element
- Specifies the element for which to set the intervals. For example, "b.b1.a(3,5)"
selects element (3,5) from element a within bus b1 which is a sub-bus
within bus b. For scalar types, element should be empty.
- buffer
- The buffer that receives the interval string. The buffer’s size must correspond
to the value of the bufferSize parameter. If the buffer parameter is NULL,
then the value returned by rsRsiGetOutputIntervals will be the buffer size
required to store the interval string.
- bufferSize
- The size of the buffer passed in as the third argument. If the returned string
is longer than this value, it will be truncated to the length of the
buffer. In that case, the return value of rsRsiGetOutputIntervals will be
the buffer size that would be required to receive the full string.
Return Value
- -1
- If an error occurred. In this case, you may call rsGetLastError to
retrieve the error message string.
- 0
- On success.
- A value greater than 0
- If either the buffer parameter is NULL or the bufferSize was not sufficient
to receive the complete string. In that case, the value returned specifies the
buffer size required to store the full string.
rsRsiSetOutputIntervals
Set the coverage tracking intervals for an output in the .rsi file.
Syntax
int rsRsiSetOutputIntervals(RsRsiFile *h, const char *portName, const char *element, char *intervals);
Parameters
- h
- Pointer to RsRsiFile structure as returned by rsRsiOpen.
- portName
- Name of the output port for which the coverage tracking intervals should be set.
- element
- Specifies the element for which to set the intervals. For example, "b.b1.a(3,5)"
selects element (3,5) from element a within bus b1 which is a sub-bus
within bus b. For scalar types, element should be empty.
- intervals
- Specifies the intervals to be used. This is a comma-separated list of intervals, for example
"[10:20],[30:40]".
A basic interval is specified by the string [min:max] where min and max are double
values specifying the (inclusive) minimum and (inclusive) maximum boundaries of the interval.
To exclude the minimum value use ']' instead of '[' as the left delimiter.
To exclude the maximum value use '[' instead of ']' as the right delimiter.
An interval may be prefixed by a '~' character to invert it.
The special string 'y0' describes the initial value of the output, i.e. the output's
value at the end of the first simulation step (time 0.0). Thus, specifying an interval of ~y0
will track whether the output's value has ever changed during a test.
Return Value
- 0
- If an error occurred. In this case, call rsGetLastError to get the
error string.
- 1
- If no error occurred.
rsRsiDefaultInputs
Reset input types in .rsi file to their defaults.
Reset types in .rsi file to defaults of associated model.
Syntax
int rsRsiDefaultInputs (RsiFile *h);
Parameters
- h
- Pointer to an RsiFile structure as returned by rsRsiOpen.
Return Value
- 0
- If an error occurred. In this case, call rsGetLastError to get the
error string.
- 1
- If no error occurred.
rsRsiDefaultOutputs
Reset output tolerances in .rsi file to defaults.
Reset output tolerances defaults.
Syntax
int rsRsiDefaultOutputs (RsiFile *h);
Parameters
- h
- Pointer to an RsiFile structure as returned by rsRsiOpen.
Return Value
- 0
- If an error occurred. In this case, call rsGetLastError to get the
error string.
- 1
- If no error occurred.
rsRsiDefaultAll
Combines effects of rsRsiDefaultInputs and rsRsiDefaultOutputs.
Combines effects of rsRsiDefaultInputs and
rsRsiDefaultOutputs.
Syntax
int rsRsiDefaultAll (RsiFile *h);
Parameters
- h
- Pointer to an RsiFile structure as returned by rsRsiOpen.
Return Value
- 0
- If an error occurred. In this case, call rsGetLastError to get the
error string.
- 1
- If no error occurred.
rsRsiSyncInputs
Synchronize input types between .rsi file and associated model.
Syntax
int rsRsiSyncInputs (RsiFile *h, void *options);
Parameters
- h
- Pointer to an RsiFile structure as returned by rsRsiOpen.
- options
- Reserved for future use, must be NULL.
Return Value
- 0
- If an error occurred. In this case, call rsGetLastError to get the
error string.
- 1
- If no error occurred.
rsRsiTlSyncInputRanges
Synchronize input value ranges between .rsi file and associated TargetLink model.
Syntax
int rsRsiTlSyncInputRanges(RsRsiFile *hRsi, void *options);
Parameters
- hRsi
- Pointer to RsRsiFile structure as returned by rsRsiOpen.
- options
- Reserved for future use, must be NULL.
Return Value
0 if synchronizing failed, a value greater than or less than 0 otherwise.
rsRsiSyncOutputs
Synchronize outputs between .rsi file and associated model.
Syntax
int rsRsiSyncOutputs (RsiFile *h, void *options);
Parameters
- h
- Pointer to an RsiFile structure as returned by rsRsiOpen.
- options
- Reserved for future use, must be NULL.
Return Value
- 0
- If an error occurred. In this case, call rsGetLastError to get the
error string.
- 1
- If no error occurred.
rsRsiSyncAll
Combines effects of rsRsiSyncInputs and rsRsiSyncOutputs.
Combines effects of rsRsiSyncInputs and rsRsiSyncOutputs.
Syntax
int rsRsiSyncAll (RsiFile *h, void *options);
Parameters
- h
- Pointer to an RsiFile structure as returned by rsRsiOpen.
- options
- Reserved for future use, must be NULL.
Return Value
- 0
- If an error occurred. In this case, call rsGetLastError to get the
error string.
- 1
- If no error occurred.
|