Go to the documentation of this file.
28 void mip_field_init(
mip_field* field, uint8_t descriptor_set, uint8_t field_descriptor,
const uint8_t* payload, uint8_t payload_length)
133 if( field_length > total_length )
134 field_length = total_length;
uint8_t _remaining_length
Remaining space after this field.
bool mip_field_next_in_packet(mip_field *field, const mip_packet *packet)
Iterates over all fields in a packet.
uint8_t _payload_length
The length of the payload, excluding the header.
mip_field mip_field_next_after(const mip_field *field)
Gets the next field after the specified field._.
uint8_t _descriptor_set
MIP descriptor set (from the packet)
uint8_t _field_descriptor
MIP field descriptor. Field not valid if set to 0x00.
uint8_t mip_field_payload_length(const mip_field *field)
Returns the length of the payload.
A structure representing a MIP field.
uint8_t mip_field_field_descriptor(const mip_field *field)
Returns the field descriptor.
@ MIP_FIELD_PAYLOAD_LENGTH_MAX
uint8_t mip_packet_payload_length(const mip_packet *packet)
Returns the length of the payload (MIP fields).
bool mip_field_next(mip_field *field)
Updates the mip_field to refer to the next field in a packet.
uint8_t mip_field_descriptor_set(const mip_field *field)
Returns the descriptor set of the packet containing this field._.
const uint8_t * mip_packet_payload(const mip_packet *packet)
Returns a pointer to the packet's payload (the first field).
@ MIP_INVALID_DESCRIPTOR_SET
void mip_field_init(mip_field *field, uint8_t descriptor_set, uint8_t field_descriptor, const uint8_t *payload, uint8_t payload_length)
Constructs a mip_field given the parameters.
@ MIP_FIELD_HEADER_LENGTH
const uint8_t * _payload
The field payload, excluding the header.
@ MIP_INDEX_FIELD_PAYLOAD
bool mip_field_is_valid(const mip_field *field)
Returns true if the field has a valid field descriptor.
uint8_t mip_packet_descriptor_set(const mip_packet *packet)
Returns the MIP descriptor set for this packet.
Structure representing a MIP Packet.
const uint8_t * mip_field_payload(const mip_field *field)
Returns the payload pointer for the field data.
@ MIP_INVALID_FIELD_DESCRIPTOR
mip_field 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.
mip_field mip_field_first_from_packet(const mip_packet *packet)
Extracts the first field from a MIP packet.
void mip_field_init_empty(mip_field *field)
Initialize a mip_field struct to an invalid/empty state.