MIP_SDK  v4.0.0
MicroStrain Communications Library for embedded systems
Modules | Classes | Typedefs | Enumerations
Mip Packet

Functions for building and processing MIP packets. More...

Modules

 Packet Building
 Functions for building new MIP packets.
 
 Packet Inspection
 Functions for accessing information about an existing MIP packet.
 

Classes

struct  mip::C::mip_packet_view
 Structure representing a MIP Packet. More...
 

Typedefs

typedef struct mip::C::mip_packet_view mip::C::mip_packet_view
 Structure representing a MIP Packet. More...
 
typedef enum mip::C::mip_packet_index mip::C::mip_packet_index
 
typedef enum mip::C::mip_packet_index_length mip::C::mip_packet_index_length
 
typedef enum mip::C::mip_packet_sync_byte mip::C::mip_packet_sync_byte
 

Enumerations

enum  mip::C::mip_packet_index {
  mip::C::MIP_PACKET_INDEX_SYNC_1 = 0, mip::C::MIP_PACKET_INDEX_SYNC_2 = 1, mip::C::MIP_PACKET_INDEX_DESC_SET = 2, mip::C::MIP_PACKET_INDEX_LENGTH = 3,
  mip::C::MIP_PACKET_INDEX_PAYLOAD = 4
}
 
enum  mip::C::mip_packet_index_length {
  mip::C::MIP_PACKET_HEADER_LENGTH = 4, mip::C::MIP_PACKET_CHECKSUM_LENGTH = 2, mip::C::MIP_PACKET_PAYLOAD_LENGTH_MIN = 0, mip::C::MIP_PACKET_PAYLOAD_LENGTH_MAX = 255,
  mip::C::MIP_PACKET_LENGTH_MIN = MIP_PACKET_HEADER_LENGTH + MIP_PACKET_CHECKSUM_LENGTH + MIP_PACKET_PAYLOAD_LENGTH_MIN, mip::C::MIP_PACKET_LENGTH_MAX = MIP_PACKET_HEADER_LENGTH + MIP_PACKET_CHECKSUM_LENGTH + MIP_PACKET_PAYLOAD_LENGTH_MAX
}
 
enum  mip::C::mip_packet_sync_byte { mip::C::MIP_SYNC_1 = 0x75, mip::C::MIP_SYNC_2 = 0x65 }
 

Detailed Description

A MIP Packet is represented by the mip_packet_view struct.

+-------+-------+------+------+------------+-----/ /----+------------+----
| SYNC1 | SYNC2 | DESC | PLEN | Field | ... | Checksum | remaining buffer space...
+-------+-------+------+------+------------+-----/ /----+------------+----
| ,_______________/ / /
| / ,_____________________/ /
| / / ,____________________________/
| / / /
+--------+-------------------+-----+----------------+
| Header | Payload (Fields) | Chk | / / unused / / |
+--------+-------------------+-----+----------------+
| |___________________| | |
| Payload | |
|__________________________________| |
| Packet Data |
|___________________________________________________|
Buffer

Typedef Documentation

◆ mip_packet_view

Use to inspect received packets or construct new ones.

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.

◆ mip_packet_index

◆ mip_packet_index_length

◆ mip_packet_sync_byte

Enumeration Type Documentation

◆ mip_packet_index

Enumerator
MIP_PACKET_INDEX_SYNC_1 
MIP_PACKET_INDEX_SYNC_2 
MIP_PACKET_INDEX_DESC_SET 
MIP_PACKET_INDEX_LENGTH 
MIP_PACKET_INDEX_PAYLOAD 

◆ mip_packet_index_length

Enumerator
MIP_PACKET_HEADER_LENGTH 
MIP_PACKET_CHECKSUM_LENGTH 
MIP_PACKET_PAYLOAD_LENGTH_MIN 
MIP_PACKET_PAYLOAD_LENGTH_MAX 
MIP_PACKET_LENGTH_MIN 
MIP_PACKET_LENGTH_MAX 

◆ mip_packet_sync_byte

Enumerator
MIP_SYNC_1 
MIP_SYNC_2