C_OpenLinkedStatistics2

C_OpenLinkedStatistics2 is used in tandem with C_QueryLinkedStatistics, C_CalculateLinkedStatisticsTimeSeriesStatistics and C_CloseLinkedStatistics to get OrcaFlex Linked statistics results.

Linked Statistics in OrcaFlex consist of:

To extract Linked Statistics results you should first call C_OpenLinkedStatistics2 to specify the set of variables and the period of simulation required. The results themselves can then be extracted by one or more calls to C_QueryLinkedStatistics or C_CalculateLinkedStatisticsTimeSeriesStatistics. You must then call C_CloseLinkedStatistics to free memory allocated by C_OpenLinkedStatistics2.

void C_OpenLinkedStatistics2(

TOrcFxAPIHandle ObjectHandle,

const TObjectExtra2 *lpObjectExtra,

const TPeriod *lpPeriod,

int NumOfVars,

int *lpVars,

TOrcFxAPIHandle *lpStatisticsHandle,

int *lpStatus

);

Parameters

ObjectHandle (IN)

The handle of the object for which you want linked statistics results.

lpObjectExtra (IN)

Points to a TObjectExtra2 variable which specifies where on the object results are required. Can be NULL if no additional information is needed.

lpPeriod (IN)

Points to a TPeriod variable which specifies the period of the simulation over which results are to be extracted.

NumOfVars (IN)

The number of variables that you want linked statistics for.

lpVars (IN)

An array of constants specifying the OrcaFlex variables for which the linked statistics results are requested. Call C_GetVarID to find the value of the constants. The array must contain at least as many entries as specified by the NumOfVars parameter.

lpStatisticsHandle (OUT)

Points to a variable in which a handle to the linked statistics information will be returned. You must store this value since it is needed when calling C_QueryLinkedStatistics. When you have finished using the handle you must call C_CloseLinkedStatistics.

lpStatus (OUT)

Points to a variable in which the status result for the function call will be returned.

Unicode and ANSI

The Unicode function name is C_OpenLinkedStatistics2W and the ANSI function name is C_OpenLinkedStatistics2A.

See also

TObjectExtra2, TPeriod, C_CalculateLinkedStatisticsTimeSeriesStatistics, C_CloseLinkedStatistics, C_QueryLinkedStatistics.