|
MIP_SDK
v4.0.0-234-g2b06a940
MicroStrain Communications Library for embedded systems
|
Go to the documentation of this file.
55 const uint8_t* _payload;
56 uint8_t _payload_length;
57 uint8_t _field_descriptor;
58 uint8_t _descriptor_set;
59 uint8_t _remaining_length;
78 void mip_field_init(
mip_field_view* field, uint8_t descriptor_set, uint8_t field_descriptor,
const uint8_t* payload, uint8_t payload_length);
A collection of C++ classes and functions covering the full mip api.
Definition: commands_3dm.c:11
@ MIP_FIELD_INDEX_DESC
Definition: mip_field.h:65
bool mip_field_next_in_packet(mip_field_view *field, const mip_packet_view *packet)
Iterates over all fields in a packet.
Definition: mip_field.c:240
mip_field_index
Definition: mip_field.h:62
uint8_t mip_field_descriptor_set(const mip_field_view *field)
Returns the descriptor set of the packet containing this field._.
Definition: mip_field.c:49
uint8_t mip_field_total_length(const mip_field_view *field)
Returns the total length of the field including the header.
Definition: mip_field.c:75
struct mip::C::mip_field_view mip_field_view
A structure representing a MIP field.
mip_field_view mip_field_from_header_ptr(const uint8_t *header, uint8_t total_length, uint8_t descriptor_set)
Constructs a mip_field from a pointer to the heaader.
Definition: mip_field.c:129
@ MIP_FIELD_INDEX_LENGTH
Definition: mip_field.h:64
mip_field_index_length
Definition: mip_field.h:69
mip_field_view mip_field_next_after(const mip_field_view *field)
Gets the next field after the specified field.
Definition: mip_field.c:192
A structure representing a MIP field.
Definition: mip_field.h:53
@ MIP_FIELD_INDEX_PAYLOAD
Definition: mip_field.h:66
void mip_field_init_empty(mip_field_view *field)
Initialize a mip_field struct to an invalid/empty state.
Definition: mip_field.c:106
@ MIP_FIELD_PAYLOAD_LENGTH_MAX
Definition: mip_field.h:75
bool mip_field_next(mip_field_view *field)
Updates the mip_field to refer to the next field in a packet.
Definition: mip_field.c:211
@ MIP_FIELD_LENGTH_MAX
Definition: mip_field.h:73
uint8_t mip_field_payload_length(const mip_field_view *field)
Returns the length of the payload.
Definition: mip_field.c:65
@ MIP_FIELD_HEADER_LENGTH
Definition: mip_field.h:71
mip_field_view mip_field_first_from_packet(const mip_packet_view *packet)
Extracts the first field from a MIP packet.
Definition: mip_field.c:177
bool mip_field_is_valid(const mip_field_view *field)
Returns true if the field has a valid field descriptor.
Definition: mip_field.c:91
@ MIP_FIELD_LENGTH_MIN
Definition: mip_field.h:72
uint8_t mip_field_field_descriptor(const mip_field_view *field)
Returns the field descriptor.
Definition: mip_field.c:57
void mip_field_init(mip_field_view *field, uint8_t descriptor_set, uint8_t field_descriptor, const uint8_t *payload, uint8_t payload_length)
Constructs a field view given the parameters.
Definition: mip_field.c:33
struct mip::C::mip_packet_view mip_packet_view
Structure representing a MIP Packet.
const uint8_t * mip_field_payload(const mip_field_view *field)
Returns the payload pointer for the field data.
Definition: mip_field.c:83
@ MIP_FIELD_PAYLOAD_LENGTH_MIN
Definition: mip_field.h:74