MIP_SDK  v3.0.0
MicroStrain Communications Library for embedded systems
Modules | Classes | Typedefs | Functions
Mip Fields

Functions for processing received MIP fields. More...

Modules

 Mip Field Accessors
 Functions for inspecting a MIP field.
 
 Mip Field Iteration
 Functions for iterating over fields in a MIP packet.
 

Classes

struct  mip::C::mip_field_view
 A structure representing a MIP field. More...
 

Typedefs

typedef struct mip::C::mip_field_view mip::C::mip_field_view
 A structure representing a MIP field. More...
 

Functions

void mip::C::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. More...
 

Detailed Description

Functions for processing received MIP fields.

---------------+------------+------------+-----/ /-----+------------+
... Header | Field | Field | ... | Checksum |
---------------+------------+------------+-----/ /-----+------------+
_/ \_
_/ \_
/ \.
+------+------+---/ /----+
| Len | desc | payload | The MIP Field
+------+------+---/ /----+

Typedef Documentation

◆ mip_field_view

A structure representing a MIP field.

Use to access fields from a received MIP packet.

This structure references the original packet data and does not contain a copy of the field payload. Therefore, the data buffer must exist as long as there are instances which reference it (even if the field payload itself is not used directly).

Note
This should be considered an "opaque" structure; its members should be considered an internal implementation detail. Avoid accessing them directly as they are subject to change in future versions of this software.

Function Documentation

◆ mip_field_init()

void mip::C::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.

Parameters
field
descriptor_setThe MIP descriptor set of the packet.
field_descriptorThe MIP field descriptor.
payloadA pointer to a buffer containing the field payload, not including the field header. The data must exist while the field is in use. Can be NULL if payload_length is 0.
payload_lengthThe length of the payload. Cannot exceed MIP_FIELD_PAYLOAD_LENGTH_MAX.