# VectorNav C++ Library: VnSensor Events

VnSensor Events

This group of methods allow registering/unregistering for events of the VnSensor. More...

## Functions

void | vn::sensors::VnSensor::registerRawDataReceivedHandler (void *userData, RawDataReceivedHandler handler)
| Registers a callback method for notification when raw data is received. More...
void | vn::sensors::VnSensor::unregisterRawDataReceivedHandler ()
| Unregisters the registered callback method.
void | vn::sensors::VnSensor::registerPossiblePacketFoundHandler (void *userData, PossiblePacketFoundHandler handler)
| Registers a callback method for notification when a new possible packet is found. More...
void | vn::sensors::VnSensor::unregisterPossiblePacketFoundHandler ()
| Unregisters the registered callback method.
void | vn::sensors::VnSensor::registerAsyncPacketReceivedHandler (void *userData, AsyncPacketReceivedHandler handler)
| Registers a callback method for notification when a new asynchronous data packet is received. More...
void | vn::sensors::VnSensor::unregisterAsyncPacketReceivedHandler ()
| Unregisters the registered callback method.
void | vn::sensors::VnSensor::registerErrorPacketReceivedHandler (void *userData, ErrorPacketReceivedHandler handler)
| Registers a callback method for notification when an error packet is received. More...
void | vn::sensors::VnSensor::unregisterErrorPacketReceivedHandler ()
| Unregisters the registered callback method.

## Detailed Description

This group of methods allow registering/unregistering for events of the VnSensor.

## Function Documentation

void vn::sensors::VnSensor::registerAsyncPacketReceivedHandler | ( | void * | userData,
|  | AsyncPacketReceivedHandler | handler
| ) |  |

Registers a callback method for notification when a new asynchronous data packet is received.

Parameters

  [in] | userData | Pointer to user data, which will be provided to the callback method.
  [in] | handler | The callback method.

Examples:
  getting_started/main.cpp.

void vn::sensors::VnSensor::registerErrorPacketReceivedHandler | ( | void * | userData,
|  | ErrorPacketReceivedHandler | handler
| ) |  |

Registers a callback method for notification when an error packet is received.

Parameters

  [in] | userData | Pointer to user data, which will be provided to the callback method.
  [in] | handler | The callback method.

void vn::sensors::VnSensor::registerPossiblePacketFoundHandler | ( | void * | userData,
|  | PossiblePacketFoundHandler | handler
| ) |  |

Registers a callback method for notification when a new possible packet is found.

Parameters

  [in] | userData | Pointer to user data, which will be provided to the callback method.
  [in] | handler | The callback method.

void vn::sensors::VnSensor::registerRawDataReceivedHandler | ( | void * | userData,
|  | RawDataReceivedHandler | handler
| ) |  |

Registers a callback method for notification when raw data is received.

Parameters

  [in] | userData | Pointer to user data, which will be provided to the callback method.
  [in] | handler | The callback method.