MetaWear C++ API  0.20.0
C++ implementation of the MetaWear protocol
Functions
event.h File Reference

Functions for the MblMwEvent type. More...

#include "event_fwd.h"
#include "metawearboard_fwd.h"
#include "metawear/platform/dllmarker.h"

Go to the source code of this file.

Functions

METAWEAR_API MblMwMetaWearBoardmbl_mw_event_get_owner (const MblMwEvent *event)
 Retrieves the MblMwMetaWearBoard the event belongs to. More...
 
METAWEAR_API void mbl_mw_event_record_commands (MblMwEvent *event)
 Enables command recording. More...
 
METAWEAR_API void mbl_mw_event_end_record (MblMwEvent *event, void *context, MblMwFnEventPtrInt commands_recorded)
 Ends command recording. More...
 
METAWEAR_API void mbl_mw_event_remove_all (MblMwMetaWearBoard *board)
 Remove all recorded events from the board. More...
 

Detailed Description

Functions for the MblMwEvent type.

Function Documentation

◆ mbl_mw_event_end_record()

METAWEAR_API void mbl_mw_event_end_record ( MblMwEvent event,
void *  context,
MblMwFnEventPtrInt  commands_recorded 
)

Ends command recording.


This function is non-blocking and will asynchronously alert the caller when the operation is completed.

Parameters
eventEvent to end recording for
contextPointer to additional data for the callback function
commands_recordedCallback function to be executed when commands have been recorded

◆ mbl_mw_event_get_owner()

METAWEAR_API MblMwMetaWearBoard* mbl_mw_event_get_owner ( const MblMwEvent event)

Retrieves the MblMwMetaWearBoard the event belongs to.

Parameters
eventEvent to lookup
Returns
Pointer to the owner

◆ mbl_mw_event_record_commands()

METAWEAR_API void mbl_mw_event_record_commands ( MblMwEvent event)

Enables command recording.


Commands can be used to execute functions on the sensor as a result of an event. For example, when the time counts to 30 (the event), take a temperature reading (the command). All MetaWear commands called after this point will be executed when the owning event is fired

Parameters
eventEvent to record commands for

◆ mbl_mw_event_remove_all()

METAWEAR_API void mbl_mw_event_remove_all ( MblMwMetaWearBoard board)

Remove all recorded events from the board.

Parameters
boardCalling object