MIP_SDK  latest-2-g34f3e39
MicroStrain Communications Library for embedded systems
Classes | Namespaces | Macros | Typedefs | Functions
mip_parser.h File Reference
#include "mip_packet.h"
#include "mip_offsets.h"
#include "mip_types.h"

Go to the source code of this file.

Classes

struct  mip::C::mip_parser
 MIP Parser state. More...
 

Namespaces

 mip
 A collection of C++ classes and functions covering the full mip api.
 
 mip::C
 

Macros

#define MIP_PARSER_DEFAULT_TIMEOUT_MS   100
 Specifies the default timeout for a MIP parser, assuming timestamps are in milliseconds. More...
 

Typedefs

typedef void(* mip::C::mip_packet_callback) (void *user, const mip_packet_view *packet, mip_timestamp timestamp)
 Callback function which receives parsed MIP packets. More...
 
typedef struct mip::C::mip_parser mip::C::mip_parser
 MIP Parser state. More...
 

Functions

void mip::C::mip_parser_init (mip_parser *parser, mip_packet_callback callback, void *callback_object, mip_timeout timeout)
 Initializes the MIP parser. More...
 
void mip::C::mip_parser_parse (mip_parser *parser, const uint8_t *input_buffer, size_t input_length, mip_timestamp timestamp)
 Parse packets from a buffer. More...
 
void mip::C::mip_parser_flush (mip_parser *parser)
 Processes all previously buffered data. More...
 
void mip::C::mip_parser_reset (mip_parser *parser)
 Resets the MIP parser. More...
 
uint_least16_t mip::C::mip_parser_get_write_ptr (mip_parser *parser, uint8_t **ptr_out)
 Gets a pointer into which a small amount of data may be written for parsing. More...
 
mip_timeout mip::C::mip_parser_timeout (const mip_parser *parser)
 Returns the packet timeout of the parser. More...
 
void mip::C::mip_parser_set_timeout (mip_parser *parser, mip_timeout timeout)
 Changes the timeout of the MIP parser. More...
 
void mip::C::mip_parser_set_callback (mip_parser *parser, mip_packet_callback callback, void *callback_object)
 mip_parser_set_callback More...
 
mip_packet_callback mip::C::mip_parser_callback (const mip_parser *parser)
 mip_parser_callback More...
 
void * mip::C::mip_parser_callback_object (const mip_parser *parser)
 mip_parser_callback More...
 
mip_timestamp mip::C::mip_parser_current_timestamp (const mip_parser *parser)
 Gets the timestamp of the last parsed packet. More...
 
mip_timeout mip::C::mip_timeout_from_baudrate (uint32_t baudrate)
 Computes an appropriate packet timeout for a given serial baud rate. More...