MIP_SDK  latest-2-g34f3e39
MicroStrain Communications Library for embedded systems
Classes | Typedefs | Functions
Mip Dispatcher

This is included in the Mip Interface to allow the registration of callbacks. More...

Classes

struct  mip::C::mip_dispatcher
 Holds the state of the MIP dispatch system. More...
 

Typedefs

typedef struct mip::C::mip_dispatcher mip::C::mip_dispatcher
 Holds the state of the MIP dispatch system. More...
 

Functions

void mip::C::mip_dispatcher_init (mip_dispatcher *self)
 Initializes the mip_dispatcher object. More...
 
void mip::C::mip_dispatcher_add_handler (mip_dispatcher *self, mip_dispatch_handler *handler)
 Registers a handler in the dispatch system. More...
 
void mip::C::mip_dispatcher_remove_handler (mip_dispatcher *self, mip_dispatch_handler *handler)
 Removes a handler from the dispatch system. More...
 
void mip::C::mip_dispatcher_remove_all_handlers (mip_dispatcher *self)
 Removes all handlers from the dispatcher. More...
 
void mip::C::mip_dispatcher_dispatch_packet (mip_dispatcher *self, const mip_packet_view *packet, mip_timestamp timestamp)
 Called to dispatch the callbacks for a given packet. More...
 

Detailed Description

This is included in the Mip Interface to allow the registration of callbacks.

Typedef Documentation

◆ mip_dispatcher

Holds the state of the MIP dispatch system.

Function Documentation

◆ mip_dispatcher_add_handler()

void mip::C::mip_dispatcher_add_handler ( mip_dispatcher self,
mip_dispatch_handler handler 
)

Registers a handler in the dispatch system.

This is necessary for the handler function to be executed.

◆ mip_dispatcher_dispatch_packet()

void mip::C::mip_dispatcher_dispatch_packet ( mip_dispatcher self,
const mip_packet_view packet,
mip_timestamp  timestamp 
)

Called to dispatch the callbacks for a given packet.

Parameters
self
packetThe MIP packet to dispatch.
timestampThe approximate parse time of the packet.

◆ mip_dispatcher_init()

void mip::C::mip_dispatcher_init ( mip_dispatcher self)

Initializes the mip_dispatcher object.

◆ mip_dispatcher_remove_all_handlers()

void mip::C::mip_dispatcher_remove_all_handlers ( mip_dispatcher self)

Removes all handlers from the dispatcher.

◆ mip_dispatcher_remove_handler()

void mip::C::mip_dispatcher_remove_handler ( mip_dispatcher self,
mip_dispatch_handler handler 
)

Removes a handler from the dispatch system.

This will prevent the handler from being executed.