C_CreateTimeHistorySummary2

C_CreateTimeHistorySummary2 is used in conjunction with C_GetTimeHistorySummaryValues and C_DestroyTimeHistorySummary to obtain spectral density, empirical distribution and rainflow half cycle results.

Before calling these functions you must first extract some time history results using the C_GetNumOfSamples, C_GetSampleTimes and C_GetTimeHistory2 functions.

The result of the C_GetNumOfSamples function call is then used as the NumOfSamples parameter. The lpTimes parameter used in the call to C_GetSampleTimes is then used as the lpTimes parameter. The lpValues parameter used in the call to C_GetTimeHistory2 is then used as the lpValues parameter.

The C_CreateTimeHistorySummary2 function can then be called.

The next step is to call C_GetTimeHistorySummaryValues to extract the time history summary values. Finally C_DestroyTimeHistorySummary is called to tidy up memory allocated by the call to C_CreateTimeHistorySummary2.

void C_CreateTimeHistorySummary2(

int TimeHistorySummaryType,

int NumOfSamples,

const TTimeHistorySummarySpecification *lpSpecification,

double *lpTimes,

double *lpValues,

TOrcFxAPIHandle *lpTimeHistorySummaryHandle,

int *lpNumOfSummaryValues,

int *lpStatus

);

Parameters

TimeHistorySummaryType (IN)

This determines the type of time history summary that is calculated. The parameter must be one of the following: thstSpectralDensity, thstEmpiricalDistribution, thstRainflowHalfCycles or thstRainflowAssociatedMean.

NumOfSamples (IN)

The number of samples contained in the arrays referred to by the lpSampleTimes and lpValues parameters. This parameter should be set to the value returned by a call to C_GetNumOfSamples.

lpSpecification (IN)

Points to a TTimeHistorySummarySpecification variable that specifies the calculation options.

You can pass NULL to request that default options are used.

lpTimes (IN)

Points to an array of double of length NumOfSamples. This parameter should be set to the lpTimes parameter which was used in a successful call to C_GetSampleTimes.

Note: This parameter is only used if TimeHistorySummaryType is set to thstSpectralDensity. Otherwise it is ignored and can be set to NULL.

lpValues (IN)

Points to an array of double of length NumOfSamples. This parameter should be set to the lpValues parameter which was used in a successful call to C_GetTimeHistory2.

lpTimeHistorySummaryHandle (OUT)

Points to a variable in which the time history summary handle will be returned. This handle is needed for subsequent calls to C_GetTimeHistorySummaryValues and C_DestroyTimeHistorySummary.

lpNumOfSummaryValues (OUT)

Points to a variable in which the number of summary values will be returned. This is used when allocating the lpX and lpY parameters of C_GetTimeHistorySummaryValues.

lpStatus (OUT)

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

See also

TTimeHistorySummarySpecification, C_CalculateRratio, C_DestroyTimeHistorySummary, C_GetNumOfSamples, C_GetSampleTimes, C_GetTimeHistory2, C_GetTimeHistorySummaryValues.