Apps     Components     Interfaces     All Files     Source Tree     source: apps.HighFrequencySampling.Sampling.nc

Interface: Sampling

A sampling interface. Note that where sampling data is collected and how that data is recovered is up to each sampling component

Components providing this interface:
apps.HighFrequencySampling.Sample

Components requiring this interface:
apps.HighFrequencySampling.HFSM

Commands

Events

Commands - Details

prepare

result_t prepare(uint32_t interval, uint32_t count)

Prepare to peform sampling.

Parameters:

interval - The interval in microseconds between samples

count - The number of samples to collect

Returns: If the result is SUCCESS, ready will be signaled If the result is FAIL, no sampling will happen.

start

result_t start(void)

Start sampling requested by previous prepare
Returns: SUCCESS if sampling started (done will be signaled when it complates), FAIL if it didn't.

Events - Details

done

result_t done(result_t ok, uint32_t sampledBytes)

Report sampling completion

Parameters:

ok - SUCCESS if sampling was succesful, FAIL if it failed. Failure may be due to the sampling interval being too short or to a data logging problem.

sampledBytes - Number of bytes of sampling data collected

Returns: Ignored