MIP_SDK
latest-2-g34f3e39
MicroStrain Communications Library for embedded systems
|
Go to the documentation of this file.
29 template<
class T,
bool (T::*Callback)(const PacketView&, Timestamp)>
70 template<
class T,
bool (T::*Callback)(const PacketView&, Timestamp)>
75 return (
static_cast<T*
>(obj)->*Callback)(
PacketView(pkt), timestamp);
constexpr pointer data() const noexcept
Definition: span.hpp:63
A collection of C++ classes and functions covering the full mip api.
Definition: commands_3dm.c:11
void mip_parser_set_callback(mip_parser *parser, mip_packet_callback callback, void *callback_object)
mip_parser_set_callback
Definition: mip_parser.c:440
mip_timeout mip_parser_timeout(const mip_parser *parser)
Returns the packet timeout of the parser.
Definition: mip_parser.c:416
void setCallback(T &object)
Initializes the MIP Parser.
Definition: mip_parser.hpp:71
void mip_parser_set_timeout(mip_parser *parser, mip_timeout timeout)
Changes the timeout of the MIP parser.
Definition: mip_parser.c:428
constexpr size_t size() const noexcept
Definition: span.hpp:65
Implementation of std::span from C++20.
Definition: span.hpp:40
void mip_parser_parse(mip_parser *parser, const uint8_t *input_buffer, size_t input_length, mip_timestamp timestamp)
Parse packets from a buffer.
Definition: mip_parser.c:183
Structure representing a MIP Packet.
Definition: mip_packet.h:50
MIP Parser state.
Definition: mip_parser.h:53
void mip_parser_init(mip_parser *parser, mip_packet_callback callback, void *callback_object, mip_timeout timeout)
Initializes the MIP parser.
Definition: mip_parser.c:32
void mip_parser_reset(mip_parser *parser)
Resets the MIP parser.
Definition: mip_parser.c:51
void parse(microstrain::Span< const uint8_t > data, Timestamp timestamp)
Parse packets from a buffer (span version).
Definition: mip_parser.hpp:40
Parser(Timeout timeout)
Definition: mip_parser.hpp:27
microstrain::EmbeddedTimestamp Timestamp
Definition: mip_types.h:50
Parser(void(*callback)(void *, const PacketView *, Timestamp), void *callbackObject, Timeout timeout)
Initializes the MIP parser.
Definition: mip_parser.hpp:25
Parser(C::mip_packet_callback callback, void *callbackObject, Timeout timeout)
Initializes the MIP parser.
Definition: mip_parser.hpp:23
microstrain::EmbeddedTimeout Timeout
Definition: mip_types.h:51
void reset()
Resets the MIP parser.
Definition: mip_parser.hpp:33
Timeout timeout() const
Returns the packet timeout of the parser.
Definition: mip_parser.hpp:43
void(* mip_packet_callback)(void *user, const mip_packet_view *packet, mip_timestamp timestamp)
Callback function which receives parsed MIP packets.
Definition: mip_parser.h:43
C++ class representing a view of a MIP packet.
Definition: mip_packet.hpp:35
C++ class representing a MIP parser.
Definition: mip_parser.hpp:19
void parse(const uint8_t *inputBuffer, size_t inputCount, Timestamp timestamp)
Parse packets from a buffer.
Definition: mip_parser.hpp:36
void setTimeout(Timeout timeout)
Changes the timeout of the MIP parser.
Definition: mip_parser.hpp:45