Set the sampling storage count for Specified sampling count stored event.
Ret = LoggerSetEventSamplingTimes ( AppId , SamplingData )
AppId [ VB.NET: Short ] [ C++: short ] [ C#: short ]
Specify Application ID retrieved by LoggerOpenApplication.
SamplingData [ VB.NET: UInteger ] [ C++: unsigned long ] [ C#: uint ]
Specify the number of sampling storage times.
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)
Nothing in particular.
Set the sampling storage count for Specified sampling count stored event.
This takes effect only
when specified sampling count stored event(LOGGER_PARAM_EVENT_DATANUM)
is specified in the LoggerSetNotifyEvent
function.
If any other event is specified, the specified SamplingData value is not
used.
The callback function
is called when the event occurs. And the callback function is specified
in LoggerSetNotifyEvent
function.
We recommend use LoggerGetSamplingData
function (or LoggerGetSamplingDataBin
function) to retrieve data within the callback function.
The current sampling
storage count is subtracted by the number of acquired data items.
You can get the current sampling storage count by using the LoggerGetStoredSamplingCount
function.
For example, in the case
of SampingData = 1000
When the sampling count reaches 1000, the event cause is satisfied and
the callback function is called.
After it acquires all 1000 data with LoggerGetSamplingData
function in the callback function, the current sampling storage count
becomes 0.
When the sampling storage count reaches 1000 from 0, the event occurs again.
The value can be different
from the second argument (SamplingTimes) of the LoggerSetSamplingSetting
function.
Typically, the SamplingData value is smaller than the SampingTimes value.
Specify sampling storage count =1000.
VB.NET |
Dim Ret As Integer Ret = LoggerSetEventSamplingTimes(AppId, 1000)
|
C++ |
long Ret; Ret = LoggerSetEventSamplingTimes(AppId, 1000);
|
C# |
int Ret; Ret = logger.SetEventSamplingTimes(AppId, 1000);
|
LoggerGetEventSamplingTimes LoggerSetNotifyEvent LoggerGetSamplingData LoggerGetStoredSamplingCount LoggerSetSamplingSetting