LoggerGetSamplingClock


Function

Gets clock information.

Format

Ret = LoggerGetSamplingClock ( AppId , ClockType , SamplingClockUnit , SamplingClock )

Parameters

AppId [ VB.NET: Short ] [ C++: short ] [ C#: short ] 

Specify Application ID retrieved by LoggerOpenApplication.

ClockType [ VB.NET: UShort ] [ C++: unsigned short * ] [ C#: out ushort ]

Specify the address that stores the clock type.

SamplingClockUnit [ VB.NET: UShort ] [ C++: unsigned short ] [ C#: ushort ]

Specify the units.

SamplingClock [ VB.NET: Double ] [ C++: double * ] [ C#: out double ]

Specify the address where the period (or period) is stored.

Return Value

Ret [ VB.NET: Integer ] [ C++: long ] [ C#: int ]

Definition

Return code

[Dec]

Description

LOGGER_ERR_SUCCESS

0

Normal completed

LOGGER_ERR_INVALID_ID

10010

Invalid AppId was specified.

The others (See also: Error Code List)

Initial Value

Nothing in particular.

Remarks

Gets clock information.

For the internal clock, you can specify the unit and period (or frequency).
For the external clock, you cannot specify the unit and period (or frequency).

Example

Get the specified sampling clock in msec units.

VB.NET

Dim Ret As Integer
Dim ClockType As UShort
Dim SamplingClock As Double
Ret = LoggerGetSamplingClock(AppId, ClockType, LOGGER_PARAM_FREQUNIT_MSEC, SamplingClock)

 

C++

long Ret;
unsigned short ClockType;
double SamplingClock;
Ret = LoggerGetSamplingClock(AppId, &ClockType, LOGGER_PARAM_FREQUNIT_MSEC, &SamplingClock);

 

C#

int Ret;
ushort ClockType;
double SamplingClock;
Ret = logger.GetSamplingClock(AppId, out ClockType, LOGGER_PARAM_FREQUNIT_MSEC, out SamplingClock);

 

See Also

LoggerSetSamplingClock