13 #ifndef IS_SIMPLE_INTERFACE_H 14 #define IS_SIMPLE_INTERFACE_H 46 #define _DID_INS_ECEF_QE2B DID_INS_4 47 #define _DID_INS_LLA_EULER_NED DID_INS_1 48 #define _DID_INS_LLA_QN2B DID_INS_3 51 #define _DID_IMU_DUAL DID_DUAL_IMU 52 #define _DID_IMU_PREINTEGRATED_IMU DID_PREINTEGRATED_IMU 55 #define _DID_GPS1_POS DID_GPS1_POS 58 #define _DID_MAG_CAL DID_MAG_CAL 59 #define _DID_MAGNETOMETER_1 DID_MAGNETOMETER_1 60 #define _DID_MAGNETOMETER_2 DID_MAGNETOMETER_2 61 #define _DID_BAROMETER DID_BAROMETER 62 #define _DID_WHEEL_ENCODER DID_WHEEL_ENCODER 63 #define _DID_POS_MEASUREMENT DID_POSITION_MEASUREMENT 66 #define _DID_DEV_INFO DID_DEV_INFO 67 #define _DID_BIT DID_BIT 68 #define _DID_STROBE_IN_TIME DID_STROBE_IN_TIME 71 #define _DID_FLASH_CONFIG DID_FLASH_CONFIG 72 #define _DID_RMC DID_RMC 88 #define IS_COM_BAUDRATE_DEFAULT IS_BAUDRATE_921600 91 #define MAX_DATASET_SIZE 1024 94 #define PKT_OVERHEAD_SIZE 8 // = START_BYTE + INFO_BYTE + COUNTER_BYTE + FLAGS_BYTE + CHECKSUM_BYTE_1 + CHECKSUM_BYTE_2 + CHECKSUM_BYTE_3 + END_BYTE 98 #define PKT_BUF_SIZE 2048 102 #define MAX_PKT_OVERHEAD_SIZE (PKT_OVERHEAD_SIZE + PKT_OVERHEAD_SIZE - 2) // worst case for packet encoding header / footer 105 #define MAX_PKT_BODY_SIZE (((PKT_BUF_SIZE - MAX_PKT_OVERHEAD_SIZE) / 2) & 0xFFFFFFFE) // worst case for packet encoding body, rounded down to even number 108 #define MAX_P_DATA_BODY_SIZE (MAX_PKT_BODY_SIZE-sizeof(p_data_hdr_t)) // Data size limit 111 #define MAX_P_ACK_BODY_SIZE (MAX_PKT_BODY_SIZE-sizeof(p_ack_hdr_t)) // Ack data size 114 #define CHECKSUM_SEED 0x00AAAAAA 119 #define PROTOCOL_VERSION_CHAR0 (1) 123 #define PROTOCOL_VERSION_CHAR1 (2) 129 #define UBLOX_HEADER_SIZE 6 130 #define RTCM3_HEADER_SIZE 3 179 #define PID_INVALID (ePacketIDs)0 180 #define PID_ACK (ePacketIDs)1 181 #define PID_NACK (ePacketIDs)2 182 #define PID_GET_DATA (ePacketIDs)3 183 #define PID_DATA (ePacketIDs)4 184 #define PID_SET_DATA (ePacketIDs)5 185 #define PID_STOP_BROADCASTS_ALL_PORTS (ePacketIDs)6 186 #define PID_STOP_DID_BROADCAST (ePacketIDs)7 187 #define PID_STOP_BROADCASTS_CURRENT_PORT (ePacketIDs)8 188 #define PID_COUNT (ePacketIDs)9 189 #define PID_MAX_COUNT (ePacketIDs)32 241 #define ASCII_MESSAGEID_TO_UINT(c4) ((uint32_t)(c4)[0] << 24 | ((uint32_t)(c4)[1] << 16) | ((uint32_t)(c4)[2] << 8) | ((uint32_t)(c4)[3])) 300 unsigned char messageId[4];
679 unsigned int getBitsAsUInt32(
const unsigned char* buffer,
unsigned int pos,
unsigned int len);
694 #endif // IS_SIMPLE_INTERFACE_H
char copyDataPToStructP2(void *sptr, const p_data_hdr_t *dataHdr, const uint8_t *dataBuf, const unsigned int maxsize)
int is_comm_stop_broadcasts_current_port(is_comm_instance_t *instance)
void is_enable_packet_encoding(int enabled)
unsigned int calculate24BitCRCQ(unsigned char *buffer, unsigned int len)
int is_comm_free(is_comm_instance_t *instance)
int is_comm_stop_broadcasts_all_ports(is_comm_instance_t *instance)
int is_decode_binary_packet(packet_t *pkt, unsigned char *pbuf, int pbufSize)
unsigned int getBitsAsUInt32(const unsigned char *buffer, unsigned int pos, unsigned int len)
char is_comm_copy_to_struct(void *sptr, const is_comm_instance_t *com, const unsigned int maxsize)
int is_comm_data(is_comm_instance_t *instance, uint32_t dataId, uint32_t offset, uint32_t size, void *data)
protocol_type_t is_comm_parse_byte(is_comm_instance_t *instance, uint8_t byte)
POP_PACK void is_comm_init(is_comm_instance_t *instance, uint8_t *buffer, int bufferSize)
int is_comm_get_data_rmc(is_comm_instance_t *instance, uint64_t rmcBits)
const unsigned int g_validBaudRates[IS_BAUDRATE_COUNT]
struct p_data_t p_data_set_t
int is_comm_get_data(is_comm_instance_t *instance, uint32_t dataId, uint32_t offset, uint32_t size, uint32_t periodMultiple)
int is_encode_binary_packet(void *srcBuffer, unsigned int srcBufferLength, packet_hdr_t *hdr, uint8_t additionalPktFlags, void *encodedPacket, int encodedPacketLength)
char copyDataPToStructP(void *sptr, const p_data_t *data, const unsigned int maxsize)
uint16_t * fieldsAndOffsets
USBInterfaceDescriptor data
int is_decode_binary_packet_byte(uint8_t **_ptrSrc, uint8_t **_ptrDest, uint32_t *checksum, uint32_t shift)
void is_decode_binary_packet_footer(packet_ftr_t *ftr, uint8_t *ptrSrc, uint8_t **ptrSrcEnd, uint32_t *checksum)
protocol_type_t is_comm_parse(is_comm_instance_t *instance)
uint32_t bc_period_multiple
int is_comm_set_data(is_comm_instance_t *instance, uint32_t dataId, uint32_t offset, uint32_t size, void *data)