# VectorNav C++ Library: vn::protocol::uart::Packet Struct Reference

vn::protocol::uart::Packet Struct Reference

Structure representing a UART packet received from the VectorNav sensor. More...

`#include <packet.h>`

## Public Types

enum | Type { TYPE_UNKNOWN, TYPE_BINARY, TYPE_ASCII }
| The different types of UART packets. More...

## Public Member Functions

| Packet (char const *packet, size_t length)
| Creates a new packet based on the provided packet data buffer. A full packet is expected which contains the deliminators (i.e. "$VNRRG,1*XX\r\n"). More...
| Packet (std::string packet)
| Packet (const Packet &toCopy)
| Copy constructor. More...
Packet & | operator= (const Packet &from)
| Assignment operator. More...
std::string | datastr ()
| Returns the encapsulated data as a string. More...
Type | type ()
| Returns the type of packet. More...
bool | isValid ()
| Performs data integrity check on the data packet. More...
bool | isError ()
| Indicates if the packet is an ASCII error message. More...
bool | isResponse ()
| Indicates if the packet is a response to a message sent to the sensor. More...
bool | isAsciiAsync ()
| Indicates if the packet is an ASCII asynchronous message. More...
AsciiAsync | determineAsciiAsyncType ()
| Determines the type of ASCII asynchronous message this packet is. More...
bool | isCompatible (CommonGroup commonGroup, TimeGroup timeGroup, ImuGroup imuGroup, GpsGroup gpsGroup, AttitudeGroup attitudeGroup, InsGroup insGroup)
| Determines if the packet is a compatible match for an expected binary output message type. More...
SensorError | parseError ()
| Parses an error packet to get the error type. More...
uint8_t | groups ()
| If the packet is a binary message, this will return the groups field. More...
uint16_t | groupField (size_t index)
| This will return the requested group field of a binary packet at the specified index. More...
uint8_t | extractUint8 ()
| Extracts a uint8_t data type from a binary packet and advances the next extraction point appropriately. More...
int8_t | extractInt8 ()
| Extracts a int8_t data type from a binary packet and advances the next extraction point appropriately. More...
uint16_t | extractUint16 ()
| Extracts a uint16_t data type from a binary packet and advances the next extraction point appropriately. More...
uint32_t | extractUint32 ()
| Extracts a uint32_t data type from a binary packet and advances the next extraction point appropriately. More...
uint64_t | extractUint64 ()
| Extracts a uint64_t data type from a binary packet and advances the next extraction point appropriately. More...
float | extractFloat ()
| Extracts a float fdata type from a binary packet and advances the next extraction point appropriately. More...
vn::math::vec3f | extractVec3f ()
| Extracts a vec3f data type from a binary packet and advances the next extraction point appropriately. More...
vn::math::vec3d | extractVec3d ()
| Extracts a vec3d data type from a binary packet and advances the next extraction point appropriately. More...
vn::math::vec4f | extractVec4f ()
| Extracts a vec4f data type from a binary packet and advances the next extraction point appropriately. More...
vn::math::mat3f | extractMat3f ()
| Extract a mat3f data type from a binary packet and advances the next extraction point appropriately. More...
void | parseVNYPR (vn::math::vec3f *yawPitchRoll)
| Parses a VNYPR asynchronous packet. More...
void | parseVNQTN (vn::math::vec4f *quaternion)
| Parses a VNQTN asynchronous packet. More...
void | parseVNQMR (vn::math::vec4f *quaternion, vn::math::vec3f *magnetic, vn::math::vec3f *acceleration, vn::math::vec3f *angularRate)
| Parses a VNQMR asynchronous packet. More...
void | parseVNMAG (vn::math::vec3f *magnetic)
| Parses a VNMAG asynchronous packet. More...
void | parseVNACC (vn::math::vec3f *acceleration)
| Parses a VNACC asynchronous packet. More...
void | parseVNGYR (vn::math::vec3f *angularRate)
| Parses a VNGYR asynchronous packet. More...
void | parseVNMAR (vn::math::vec3f *magnetic, vn::math::vec3f *acceleration, vn::math::vec3f *angularRate)
| Parses a VNMAR asynchronous packet. More...
void | parseVNYMR (vn::math::vec3f *yawPitchRoll, vn::math::vec3f *magnetic, vn::math::vec3f *acceleration, vn::math::vec3f *angularRate)
| Parses a VNYMR asynchronous packet. More...
void | parseVNYBA (vn::math::vec3f *yawPitchRoll, vn::math::vec3f *accelerationBody, vn::math::vec3f *angularRate)
| Parses a VNYBA asynchronous packet. More...
void | parseVNYIA (vn::math::vec3f *yawPitchRoll, vn::math::vec3f *accelerationInertial, vn::math::vec3f *angularRate)
| Parses a VNYIA asynchronous packet. More...
void | parseVNIMU (vn::math::vec3f *magneticUncompensated, vn::math::vec3f *accelerationUncompensated, vn::math::vec3f *angularRateUncompensated, float *temperature, float *pressure)
| Parses a VNIMU asynchronous packet. More...
void | parseVNGPS (double *time, uint16_t *week, uint8_t *gpsFix, uint8_t *numSats, vn::math::vec3d *lla, vn::math::vec3f *nedVel, vn::math::vec3f *nedAcc, float *speedAcc, float *timeAcc)
| Parses a VNGPS asynchronous packet. More...
void | parseVNINS (double *time, uint16_t *week, uint16_t *status, vn::math::vec3f *yawPitchRoll, vn::math::vec3d *lla, vn::math::vec3f *nedVel, float *attUncertainty, float *posUncertainty, float *velUncertainty)
| Parses a VNINS asynchronous packet. More...
void | parseVNINE (double *time, uint16_t *week, uint16_t *status, vn::math::vec3f *ypr, vn::math::vec3d *position, vn::math::vec3f *velocity, float *attUncertainty, float *posUncertainty, float *velUncertainty)
| Parses a VNINE asynchronous packet. More...
void | parseVNISL (vn::math::vec3f *ypr, vn::math::vec3d *lla, vn::math::vec3f *velocity, vn::math::vec3f *acceleration, vn::math::vec3f *angularRate)
| Parses a VNISL asynchronous packet. More...
void | parseVNISE (vn::math::vec3f *ypr, vn::math::vec3d *position, vn::math::vec3f *velocity, vn::math::vec3f *acceleration, vn::math::vec3f *angularRate)
| Parses a VNISE asynchronous packet. More...
void | parseVNGPE (double *tow, uint16_t *week, uint8_t *gpsFix, uint8_t *numSats, vn::math::vec3d *position, vn::math::vec3f *velocity, vn::math::vec3f *posAcc, float *speedAcc, float *timeAcc)
| Parses a VNGPE asynchronous packet. More...
void | parseVNDTV (float *deltaTime, vn::math::vec3f *deltaTheta, vn::math::vec3f *deltaVelocity)
| Parses a VNDTV asynchronous packet. More...
void | parseBinaryOutput (uint16_t *asyncMode, uint16_t *rateDivisor, uint16_t *outputGroup, uint16_t *commonField, uint16_t *timeField, uint16_t *imuField, uint16_t *gpsField, uint16_t *attitudeField, uint16_t *insField)
| Parses a response from reading any of the Binary Output registers. More...
void | parseUserTag (char *tag)
| Parses a response from reading the User Tag register. More...
void | parseModelNumber (char *productName)
| Parses a response from reading the Model Number register. More...
void | parseHardwareRevision (uint32_t *revision)
| Parses a response from reading the Hardware Revision register. More...
void | parseSerialNumber (uint32_t *serialNum)
| Parses a response from reading the Serial Number register. More...
void | parseFirmwareVersion (char *firmwareVersion)
| Parses a response from reading the Firmware Version register. More...
void | parseSerialBaudRate (uint32_t *baudrate)
| Parses a response from reading the Serial Baud Rate register. More...
void | parseAsyncDataOutputType (uint32_t *ador)
| Parses a response from reading the Async Data Output Type register. More...
void | parseAsyncDataOutputFrequency (uint32_t *adof)
| Parses a response from reading the Async Data Output Frequency register. More...
void | parseYawPitchRoll (vn::math::vec3f *yawPitchRoll)
| Parses a response from reading the Yaw Pitch Roll register. More...
void | parseAttitudeQuaternion (vn::math::vec4f *quat)
| Parses a response from reading the Attitude Quaternion register. More...
void | parseQuaternionMagneticAccelerationAndAngularRates (vn::math::vec4f *quat, vn::math::vec3f *mag, vn::math::vec3f *accel, vn::math::vec3f *gyro)
| Parses a response from reading the Quaternion, Magnetic, Acceleration and Angular Rates register. More...
void | parseMagneticMeasurements (vn::math::vec3f *mag)
| Parses a response from reading the Magnetic Measurements register. More...
void | parseAccelerationMeasurements (vn::math::vec3f *accel)
| Parses a response from reading the Acceleration Measurements register. More...
void | parseAngularRateMeasurements (vn::math::vec3f *gyro)
| Parses a response from reading the Angular Rate Measurements register. More...
void | parseMagneticAccelerationAndAngularRates (vn::math::vec3f *mag, vn::math::vec3f *accel, vn::math::vec3f *gyro)
| Parses a response from reading the Magnetic, Acceleration and Angular Rates register. More...
void | parseMagneticAndGravityReferenceVectors (vn::math::vec3f *magRef, vn::math::vec3f *accRef)
| Parses a response from reading the Magnetic and Gravity Reference Vectors register. More...
void | parseFilterMeasurementsVarianceParameters (float *angularWalkVariance, vn::math::vec3f *angularRateVariance, vn::math::vec3f *magneticVariance, vn::math::vec3f *accelerationVariance)
| Parses a response from reading the Filter Measurements Variance Parameters register. More...
void | parseMagnetometerCompensation (vn::math::mat3f *c, vn::math::vec3f *b)
| Parses a response from reading the Magnetometer Compensation register. More...
void | parseFilterActiveTuningParameters (float *magneticDisturbanceGain, float *accelerationDisturbanceGain, float *magneticDisturbanceMemory, float *accelerationDisturbanceMemory)
| Parses a response from reading the Filter Active Tuning Parameters register. More...
void | parseAccelerationCompensation (vn::math::mat3f *c, vn::math::vec3f *b)
| Parses a response from reading the Acceleration Compensation register. More...
void | parseReferenceFrameRotation (vn::math::mat3f *c)
| Parses a response from reading the Reference Frame Rotation register. More...
void | parseYawPitchRollMagneticAccelerationAndAngularRates (vn::math::vec3f *yawPitchRoll, vn::math::vec3f *mag, vn::math::vec3f *accel, vn::math::vec3f *gyro)
| Parses a response from reading the Yaw, Pitch, Roll, Magnetic, Acceleration and Angular Rates register. More...
void | parseCommunicationProtocolControl (uint8_t *serialCount, uint8_t *serialStatus, uint8_t *spiCount, uint8_t *spiStatus, uint8_t *serialChecksum, uint8_t *spiChecksum, uint8_t *errorMode)
| Parses a response from reading the Communication Protocol Control register. More...
void | parseSynchronizationControl (uint8_t *syncInMode, uint8_t *syncInEdge, uint16_t *syncInSkipFactor, uint8_t *syncOutMode, uint8_t *syncOutPolarity, uint16_t *syncOutSkipFactor, uint32_t *syncOutPulseWidth)
| Parses a response from reading the Synchronization Control register. More...
void | parseSynchronizationStatus (uint32_t *syncInCount, uint32_t *syncInTime, uint32_t *syncOutCount)
| Parses a response from reading the Synchronization Status register. More...
void | parseFilterBasicControl (uint8_t *magMode, uint8_t *extMagMode, uint8_t *extAccMode, uint8_t *extGyroMode, vn::math::vec3f *gyroLimit)
| Parses a response from reading the Filter Basic Control register. More...
void | parseVpeBasicControl (uint8_t *enable, uint8_t *headingMode, uint8_t *filteringMode, uint8_t *tuningMode)
| Parses a response from reading the VPE Basic Control register. More...
void | parseVpeMagnetometerBasicTuning (vn::math::vec3f *baseTuning, vn::math::vec3f *adaptiveTuning, vn::math::vec3f *adaptiveFiltering)
| Parses a response from reading the VPE Magnetometer Basic Tuning register. More...
void | parseVpeMagnetometerAdvancedTuning (vn::math::vec3f *minFiltering, vn::math::vec3f *maxFiltering, float *maxAdaptRate, float *disturbanceWindow, float *maxTuning)
| Parses a response from reading the VPE Magnetometer Advanced Tuning register. More...
void | parseVpeAccelerometerBasicTuning (vn::math::vec3f *baseTuning, vn::math::vec3f *adaptiveTuning, vn::math::vec3f *adaptiveFiltering)
| Parses a response from reading the VPE Accelerometer Basic Tuning register. More...
void | parseVpeAccelerometerAdvancedTuning (vn::math::vec3f *minFiltering, vn::math::vec3f *maxFiltering, float *maxAdaptRate, float *disturbanceWindow, float *maxTuning)
| Parses a response from reading the VPE Accelerometer Advanced Tuning register. More...
void | parseVpeGyroBasicTuning (vn::math::vec3f *angularWalkVariance, vn::math::vec3f *baseTuning, vn::math::vec3f *adaptiveTuning)
| Parses a response from reading the VPE Gyro Basic Tuning register. More...
void | parseFilterStartupGyroBias (vn::math::vec3f *bias)
| Parses a response from reading the Filter Startup Gyro Bias register. More...
void | parseMagnetometerCalibrationControl (uint8_t *hsiMode, uint8_t *hsiOutput, uint8_t *convergeRate)
| Parses a response from reading the Magnetometer Calibration Control register. More...
void | parseCalculatedMagnetometerCalibration (vn::math::mat3f *c, vn::math::vec3f *b)
| Parses a response from reading the Calculated Magnetometer Calibration register. More...
void | parseIndoorHeadingModeControl (float *maxRateError)
| Parses a response from reading the Indoor Heading Mode Control register. More...
void | parseVelocityCompensationMeasurement (vn::math::vec3f *velocity)
| Parses a response from reading the Velocity Compensation Measurement register. More...
void | parseVelocityCompensationControl (uint8_t *mode, float *velocityTuning, float *rateTuning)
| Parses a response from reading the Velocity Compensation Control register. More...
void | parseVelocityCompensationStatus (float *x, float *xDot, vn::math::vec3f *accelOffset, vn::math::vec3f *omega)
| Parses a response from reading the Velocity Compensation Status register. More...
void | parseImuMeasurements (vn::math::vec3f *mag, vn::math::vec3f *accel, vn::math::vec3f *gyro, float *temp, float *pressure)
| Parses a response from reading the IMU Measurements register. More...
void | parseGpsConfiguration (uint8_t *mode, uint8_t *ppsSource)
| Parses a response from reading the GPS Configuration register. More...
void | parseGpsAntennaOffset (vn::math::vec3f *position)
| Parses a response from reading the GPS Antenna Offset register. More...
void | parseGpsSolutionLla (double *time, uint16_t *week, uint8_t *gpsFix, uint8_t *numSats, vn::math::vec3d *lla, vn::math::vec3f *nedVel, vn::math::vec3f *nedAcc, float *speedAcc, float *timeAcc)
| Parses a response from reading the GPS Solution - LLA register. More...
void | parseGpsSolutionEcef (double *tow, uint16_t *week, uint8_t *gpsFix, uint8_t *numSats, vn::math::vec3d *position, vn::math::vec3f *velocity, vn::math::vec3f *posAcc, float *speedAcc, float *timeAcc)
| Parses a response from reading the GPS Solution - ECEF register. More...
void | parseInsSolutionLla (double *time, uint16_t *week, uint16_t *status, vn::math::vec3f *yawPitchRoll, vn::math::vec3d *position, vn::math::vec3f *nedVel, float *attUncertainty, float *posUncertainty, float *velUncertainty)
| Parses a response from reading the INS Solution - LLA register. More...
void | parseInsSolutionEcef (double *time, uint16_t *week, uint16_t *status, vn::math::vec3f *yawPitchRoll, vn::math::vec3d *position, vn::math::vec3f *velocity, float *attUncertainty, float *posUncertainty, float *velUncertainty)
| Parses a response from reading the INS Solution - ECEF register. More...
void | parseInsBasicConfiguration (uint8_t *scenario, uint8_t *ahrsAiding)
| Parses a response from reading the INS Basic Configuration register. More...
void | parseInsBasicConfiguration (uint8_t *scenario, uint8_t *ahrsAiding, uint8_t *estBaseline)
| Parses a response from reading the INS Basic Configuration register. More...
void | parseInsAdvancedConfiguration (uint8_t *useMag, uint8_t *usePres, uint8_t *posAtt, uint8_t *velAtt, uint8_t *velBias, uint8_t *useFoam, uint8_t *gpsCovType, uint8_t *velCount, float *velInit, float *moveOrigin, float *gpsTimeout, float *deltaLimitPos, float *deltaLimitVel, float *minPosUncertainty, float *minVelUncertainty)
| Parses a response from reading the INS Advanced Configuration register. More...
void | parseInsStateLla (vn::math::vec3f *yawPitchRoll, vn::math::vec3d *position, vn::math::vec3f *velocity, vn::math::vec3f *accel, vn::math::vec3f *angularRate)
| Parses a response from reading the INS State - LLA register. More...
void | parseInsStateEcef (vn::math::vec3f *yawPitchRoll, vn::math::vec3d *position, vn::math::vec3f *velocity, vn::math::vec3f *accel, vn::math::vec3f *angularRate)
| Parses a response from reading the INS State - ECEF register. More...
void | parseStartupFilterBiasEstimate (vn::math::vec3f *gyroBias, vn::math::vec3f *accelBias, float *pressureBias)
| Parses a response from reading the Startup Filter Bias Estimate register. More...
void | parseDeltaThetaAndDeltaVelocity (float *deltaTime, vn::math::vec3f *deltaTheta, vn::math::vec3f *deltaVelocity)
| Parses a response from reading the Delta Theta and Delta Velocity register. More...
void | parseDeltaThetaAndDeltaVelocityConfiguration (uint8_t *integrationFrame, uint8_t *gyroCompensation, uint8_t *accelCompensation)
| Parses a response from reading the Delta Theta and Delta Velocity Configuration register. More...
void | parseReferenceVectorConfiguration (uint8_t *useMagModel, uint8_t *useGravityModel, uint32_t *recalcThreshold, float *year, vn::math::vec3d *position)
| Parses a response from reading the Reference Vector Configuration register. More...
void | parseGyroCompensation (vn::math::mat3f *c, vn::math::vec3f *b)
| Parses a response from reading the Gyro Compensation register. More...
void | parseImuFilteringConfiguration (uint16_t *magWindowSize, uint16_t *accelWindowSize, uint16_t *gyroWindowSize, uint16_t *tempWindowSize, uint16_t *presWindowSize, uint8_t *magFilterMode, uint8_t *accelFilterMode, uint8_t *gyroFilterMode, uint8_t *tempFilterMode, uint8_t *presFilterMode)
| Parses a response from reading the IMU Filtering Configuration register. More...
void | parseGpsCompassBaseline (vn::math::vec3f *position, vn::math::vec3f *uncertainty)
| Parses a response from reading the GPS Compass Baseline register. More...
void | parseGpsCompassEstimatedBaseline (uint8_t *estBaselineUsed, uint16_t *numMeas, vn::math::vec3f *position, vn::math::vec3f *uncertainty)
| Parses a response from reading the GPS Compass Estimated Baseline register. More...
void | parseImuRateConfiguration (uint16_t *imuRate, uint16_t *navDivisor, float *filterTargetRate, float *filterMinRate)
| Parses a response from reading the IMU Rate Configuration register. More...
void | parseYawPitchRollTrueBodyAccelerationAndAngularRates (vn::math::vec3f *yawPitchRoll, vn::math::vec3f *bodyAccel, vn::math::vec3f *gyro)
| Parses a response from reading the Yaw, Pitch, Roll, True Body Acceleration and Angular Rates register. More...
void | parseYawPitchRollTrueInertialAccelerationAndAngularRates (vn::math::vec3f *yawPitchRoll, vn::math::vec3f *inertialAccel, vn::math::vec3f *gyro)
| Parses a response from reading the Yaw, Pitch, Roll, True Inertial Acceleration and Angular Rates register. More...

## Static Public Member Functions

static size_t | computeBinaryPacketLength (const char *startOfPossibleBinaryPacket)
| Computes the expected number of bytes for a possible binary packet. More...
static size_t | computeNumOfBytesForBinaryGroupPayload (BinaryGroup group, uint16_t groupField)
| Computes the number of bytes expected for a binary group field. More...
static size_t | finalizeCommand (ErrorDetectionMode errorDetectionMode, char *packet, size_t length)
| Appends astrick (*), checksum, and newlines to command. More...
static size_t | genReadBinaryOutput1 (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Binary Output 1 register on a VectorNav sensor. More...
static size_t | genReadBinaryOutput2 (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Binary Output 2 register on a VectorNav sensor. More...
static size_t | genReadBinaryOutput3 (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Binary Output 13 register on a VectorNav sensor. More...
static size_t | genWriteBinaryOutput1 (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, uint16_t asyncMode, uint16_t rateDivisor, uint16_t commonField, uint16_t timeField, uint16_t imuField, uint16_t gpsField, uint16_t attitudeField, uint16_t insField)
| Generates a command to write to the Binary Output 1 register on a VectorNav sensor. More...
static size_t | genWriteBinaryOutput2 (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, uint16_t asyncMode, uint16_t rateDivisor, uint16_t commonField, uint16_t timeField, uint16_t imuField, uint16_t gpsField, uint16_t attitudeField, uint16_t insField)
| Generates a command to write to the Binary Output 2 register on a VectorNav sensor. More...
static size_t | genWriteBinaryOutput3 (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, uint16_t asyncMode, uint16_t rateDivisor, uint16_t commonField, uint16_t timeField, uint16_t imuField, uint16_t gpsField, uint16_t attitudeField, uint16_t insField)
| Generates a command to write to the Binary Output 3 register on a VectorNav sensor. More...
static size_t | genWriteSettings (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to write sensor settings to non-volatile memory. More...
static size_t | genTare (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to tare the sensor. More...
static size_t | genKnownMagneticDisturbance (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, bool isMagneticDisturbancePresent)
| Generates a command to alert the sensor of a known magnetic disturbance. More...
static size_t | genKnownAccelerationDisturbance (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, bool isAccelerationDisturbancePresent)
| Generates a command to alert the sensor of a known acceleration disturbance. More...
static size_t | genSetGyroBias (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to set the gyro bias. More...
static size_t | genRestoreFactorySettings (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to retore factory settings. More...
static size_t | genReset (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to reset the sensor. More...
static size_t | genReadSerialBaudRate (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, uint8_t port)
| Generates a command to read the Serial Baud Rate register on a VectorNav sensor. More...
static size_t | genWriteSerialBaudRate (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, uint32_t baudrate, uint8_t port)
| Generates a command to write to the Serial Baud Rate register on a VectorNav sensor. More...
static size_t | genReadAsyncDataOutputType (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, uint8_t port)
| Generates a command to read the Async Data Output Type register on a VectorNav sensor. More...
static size_t | genWriteAsyncDataOutputType (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, uint32_t ador, uint8_t port)
| Generates a command to write to the Async Data Output Type register on a VectorNav sensor. More...
static size_t | genReadAsyncDataOutputFrequency (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, uint8_t port)
| Generates a command to read the Async Data Output Frequency register on a VectorNav sensor. More...
static size_t | genWriteAsyncDataOutputFrequency (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, uint32_t adof, uint8_t port)
| Generates a command to write to the Async Data Output Frequency register on a VectorNav sensor. More...
static size_t | genReadUserTag (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the User Tag register on a VectorNav sensor. More...
static size_t | genWriteUserTag (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, std::string tag)
| Generates a command to write to the User Tag register on a VectorNav sensor. More...
static size_t | genReadModelNumber (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Model Number register on a VectorNav sensor. More...
static size_t | genReadHardwareRevision (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Hardware Revision register on a VectorNav sensor. More...
static size_t | genReadSerialNumber (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Serial Number register on a VectorNav sensor. More...
static size_t | genReadFirmwareVersion (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Firmware Version register on a VectorNav sensor. More...
static size_t | genReadSerialBaudRate (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Serial Baud Rate register on a VectorNav sensor. More...
static size_t | genWriteSerialBaudRate (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, uint32_t baudrate)
| Generates a command to write to the Serial Baud Rate register on a VectorNav sensor. More...
static size_t | genReadAsyncDataOutputType (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Async Data Output Type register on a VectorNav sensor. More...
static size_t | genWriteAsyncDataOutputType (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, uint32_t ador)
| Generates a command to write to the Async Data Output Type register on a VectorNav sensor. More...
static size_t | genReadAsyncDataOutputFrequency (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Async Data Output Frequency register on a VectorNav sensor. More...
static size_t | genWriteAsyncDataOutputFrequency (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, uint32_t adof)
| Generates a command to write to the Async Data Output Frequency register on a VectorNav sensor. More...
static size_t | genReadYawPitchRoll (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Yaw Pitch Roll register on a VectorNav sensor. More...
static size_t | genReadAttitudeQuaternion (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Attitude Quaternion register on a VectorNav sensor. More...
static size_t | genReadQuaternionMagneticAccelerationAndAngularRates (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Quaternion, Magnetic, Acceleration and Angular Rates register on a VectorNav sensor. More...
static size_t | genReadMagneticMeasurements (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Magnetic Measurements register on a VectorNav sensor. More...
static size_t | genReadAccelerationMeasurements (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Acceleration Measurements register on a VectorNav sensor. More...
static size_t | genReadAngularRateMeasurements (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Angular Rate Measurements register on a VectorNav sensor. More...
static size_t | genReadMagneticAccelerationAndAngularRates (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Magnetic, Acceleration and Angular Rates register on a VectorNav sensor. More...
static size_t | genReadMagneticAndGravityReferenceVectors (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Magnetic and Gravity Reference Vectors register on a VectorNav sensor. More...
static size_t | genWriteMagneticAndGravityReferenceVectors (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, vn::math::vec3f magRef, vn::math::vec3f accRef)
| Generates a command to write to the Magnetic and Gravity Reference Vectors register on a VectorNav sensor. More...
static size_t | genReadFilterMeasurementsVarianceParameters (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Filter Measurements Variance Parameters register on a VectorNav sensor. More...
static size_t | genWriteFilterMeasurementsVarianceParameters (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, float angularWalkVariance, vn::math::vec3f angularRateVariance, vn::math::vec3f magneticVariance, vn::math::vec3f accelerationVariance)
| Generates a command to write to the Filter Measurements Variance Parameters register on a VectorNav sensor. More...
static size_t | genReadMagnetometerCompensation (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Magnetometer Compensation register on a VectorNav sensor. More...
static size_t | genWriteMagnetometerCompensation (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, vn::math::mat3f c, vn::math::vec3f b)
| Generates a command to write to the Magnetometer Compensation register on a VectorNav sensor. More...
static size_t | genReadFilterActiveTuningParameters (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Filter Active Tuning Parameters register on a VectorNav sensor. More...
static size_t | genWriteFilterActiveTuningParameters (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, float magneticDisturbanceGain, float accelerationDisturbanceGain, float magneticDisturbanceMemory, float accelerationDisturbanceMemory)
| Generates a command to write to the Filter Active Tuning Parameters register on a VectorNav sensor. More...
static size_t | genReadAccelerationCompensation (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Acceleration Compensation register on a VectorNav sensor. More...
static size_t | genWriteAccelerationCompensation (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, vn::math::mat3f c, vn::math::vec3f b)
| Generates a command to write to the Acceleration Compensation register on a VectorNav sensor. More...
static size_t | genReadReferenceFrameRotation (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Reference Frame Rotation register on a VectorNav sensor. More...
static size_t | genWriteReferenceFrameRotation (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, vn::math::mat3f c)
| Generates a command to write to the Reference Frame Rotation register on a VectorNav sensor. More...
static size_t | genReadYawPitchRollMagneticAccelerationAndAngularRates (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Yaw, Pitch, Roll, Magnetic, Acceleration and Angular Rates register on a VectorNav sensor. More...
static size_t | genReadCommunicationProtocolControl (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Communication Protocol Control register on a VectorNav sensor. More...
static size_t | genWriteCommunicationProtocolControl (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, uint8_t serialCount, uint8_t serialStatus, uint8_t spiCount, uint8_t spiStatus, uint8_t serialChecksum, uint8_t spiChecksum, uint8_t errorMode)
| Generates a command to write to the Communication Protocol Control register on a VectorNav sensor. More...
static size_t | genReadSynchronizationControl (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Synchronization Control register on a VectorNav sensor. More...
static size_t | genWriteSynchronizationControl (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, uint8_t syncInMode, uint8_t syncInEdge, uint16_t syncInSkipFactor, uint8_t syncOutMode, uint8_t syncOutPolarity, uint16_t syncOutSkipFactor, uint32_t syncOutPulseWidth)
| Generates a command to write to the Synchronization Control register on a VectorNav sensor. More...
static size_t | genReadSynchronizationStatus (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Synchronization Status register on a VectorNav sensor. More...
static size_t | genWriteSynchronizationStatus (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, uint32_t syncInCount, uint32_t syncInTime, uint32_t syncOutCount)
| Generates a command to write to the Synchronization Status register on a VectorNav sensor. More...
static size_t | genReadFilterBasicControl (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Filter Basic Control register on a VectorNav sensor. More...
static size_t | genWriteFilterBasicControl (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, uint8_t magMode, uint8_t extMagMode, uint8_t extAccMode, uint8_t extGyroMode, vn::math::vec3f gyroLimit)
| Generates a command to write to the Filter Basic Control register on a VectorNav sensor. More...
static size_t | genReadVpeBasicControl (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the VPE Basic Control register on a VectorNav sensor. More...
static size_t | genWriteVpeBasicControl (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, uint8_t enable, uint8_t headingMode, uint8_t filteringMode, uint8_t tuningMode)
| Generates a command to write to the VPE Basic Control register on a VectorNav sensor. More...
static size_t | genReadVpeMagnetometerBasicTuning (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the VPE Magnetometer Basic Tuning register on a VectorNav sensor. More...
static size_t | genWriteVpeMagnetometerBasicTuning (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, vn::math::vec3f baseTuning, vn::math::vec3f adaptiveTuning, vn::math::vec3f adaptiveFiltering)
| Generates a command to write to the VPE Magnetometer Basic Tuning register on a VectorNav sensor. More...
static size_t | genReadVpeMagnetometerAdvancedTuning (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the VPE Magnetometer Advanced Tuning register on a VectorNav sensor. More...
static size_t | genWriteVpeMagnetometerAdvancedTuning (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, vn::math::vec3f minFiltering, vn::math::vec3f maxFiltering, float maxAdaptRate, float disturbanceWindow, float maxTuning)
| Generates a command to write to the VPE Magnetometer Advanced Tuning register on a VectorNav sensor. More...
static size_t | genReadVpeAccelerometerBasicTuning (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the VPE Accelerometer Basic Tuning register on a VectorNav sensor. More...
static size_t | genWriteVpeAccelerometerBasicTuning (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, vn::math::vec3f baseTuning, vn::math::vec3f adaptiveTuning, vn::math::vec3f adaptiveFiltering)
| Generates a command to write to the VPE Accelerometer Basic Tuning register on a VectorNav sensor. More...
static size_t | genReadVpeAccelerometerAdvancedTuning (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the VPE Accelerometer Advanced Tuning register on a VectorNav sensor. More...
static size_t | genWriteVpeAccelerometerAdvancedTuning (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, vn::math::vec3f minFiltering, vn::math::vec3f maxFiltering, float maxAdaptRate, float disturbanceWindow, float maxTuning)
| Generates a command to write to the VPE Accelerometer Advanced Tuning register on a VectorNav sensor. More...
static size_t | genReadVpeGyroBasicTuning (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the VPE Gyro Basic Tuning register on a VectorNav sensor. More...
static size_t | genWriteVpeGyroBasicTuning (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, vn::math::vec3f angularWalkVariance, vn::math::vec3f baseTuning, vn::math::vec3f adaptiveTuning)
| Generates a command to write to the VPE Gyro Basic Tuning register on a VectorNav sensor. More...
static size_t | genReadFilterStartupGyroBias (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Filter Startup Gyro Bias register on a VectorNav sensor. More...
static size_t | genWriteFilterStartupGyroBias (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, vn::math::vec3f bias)
| Generates a command to write to the Filter Startup Gyro Bias register on a VectorNav sensor. More...
static size_t | genReadMagnetometerCalibrationControl (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Magnetometer Calibration Control register on a VectorNav sensor. More...
static size_t | genWriteMagnetometerCalibrationControl (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, uint8_t hsiMode, uint8_t hsiOutput, uint8_t convergeRate)
| Generates a command to write to the Magnetometer Calibration Control register on a VectorNav sensor. More...
static size_t | genReadCalculatedMagnetometerCalibration (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Calculated Magnetometer Calibration register on a VectorNav sensor. More...
static size_t | genReadIndoorHeadingModeControl (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Indoor Heading Mode Control register on a VectorNav sensor. More...
static size_t | genWriteIndoorHeadingModeControl (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, float maxRateError)
| Generates a command to write to the Indoor Heading Mode Control register on a VectorNav sensor. More...
static size_t | genReadVelocityCompensationMeasurement (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Velocity Compensation Measurement register on a VectorNav sensor. More...
static size_t | genWriteVelocityCompensationMeasurement (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, vn::math::vec3f velocity)
| Generates a command to write to the Velocity Compensation Measurement register on a VectorNav sensor. More...
static size_t | genReadVelocityCompensationControl (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Velocity Compensation Control register on a VectorNav sensor. More...
static size_t | genWriteVelocityCompensationControl (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, uint8_t mode, float velocityTuning, float rateTuning)
| Generates a command to write to the Velocity Compensation Control register on a VectorNav sensor. More...
static size_t | genReadVelocityCompensationStatus (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Velocity Compensation Status register on a VectorNav sensor. More...
static size_t | genReadImuMeasurements (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the IMU Measurements register on a VectorNav sensor. More...
static size_t | genReadGpsConfiguration (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the GPS Configuration register on a VectorNav sensor. More...
static size_t | genWriteGpsConfiguration (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, uint8_t mode, uint8_t ppsSource)
| Generates a command to write to the GPS Configuration register on a VectorNav sensor. More...
static size_t | genReadGpsAntennaOffset (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the GPS Antenna Offset register on a VectorNav sensor. More...
static size_t | genWriteGpsAntennaOffset (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, vn::math::vec3f position)
| Generates a command to write to the GPS Antenna Offset register on a VectorNav sensor. More...
static size_t | genReadGpsSolutionLla (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the GPS Solution - LLA register on a VectorNav sensor. More...
static size_t | genReadGpsSolutionEcef (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the GPS Solution - ECEF register on a VectorNav sensor. More...
static size_t | genReadInsSolutionLla (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the INS Solution - LLA register on a VectorNav sensor. More...
static size_t | genReadInsSolutionEcef (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the INS Solution - ECEF register on a VectorNav sensor. More...
static size_t | genReadInsBasicConfiguration (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the INS Basic Configuration register on a VectorNav sensor. More...
static size_t | genWriteInsBasicConfiguration (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, uint8_t scenario, uint8_t ahrsAiding, uint8_t estBaseline)
| Generates a command to write to the INS Basic Configuration register on a VectorNav sensor. More...
static size_t | genReadInsAdvancedConfiguration (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the INS Advanced Configuration register on a VectorNav sensor. More...
static size_t | genWriteInsAdvancedConfiguration (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, uint8_t useMag, uint8_t usePres, uint8_t posAtt, uint8_t velAtt, uint8_t velBias, uint8_t useFoam, uint8_t gpsCovType, uint8_t velCount, float velInit, float moveOrigin, float gpsTimeout, float deltaLimitPos, float deltaLimitVel, float minPosUncertainty, float minVelUncertainty)
| Generates a command to write to the INS Advanced Configuration register on a VectorNav sensor. More...
static size_t | genReadInsStateLla (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the INS State - LLA register on a VectorNav sensor. More...
static size_t | genReadInsStateEcef (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the INS State - ECEF register on a VectorNav sensor. More...
static size_t | genReadStartupFilterBiasEstimate (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Startup Filter Bias Estimate register on a VectorNav sensor. More...
static size_t | genWriteStartupFilterBiasEstimate (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, vn::math::vec3f gyroBias, vn::math::vec3f accelBias, float pressureBias)
| Generates a command to write to the Startup Filter Bias Estimate register on a VectorNav sensor. More...
static size_t | genReadDeltaThetaAndDeltaVelocity (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Delta Theta and Delta Velocity register on a VectorNav sensor. More...
static size_t | genReadDeltaThetaAndDeltaVelocityConfiguration (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Delta Theta and Delta Velocity Configuration register on a VectorNav sensor. More...
static size_t | genWriteDeltaThetaAndDeltaVelocityConfiguration (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, uint8_t integrationFrame, uint8_t gyroCompensation, uint8_t accelCompensation)
| Generates a command to write to the Delta Theta and Delta Velocity Configuration register on a VectorNav sensor. More...
static size_t | genReadReferenceVectorConfiguration (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Reference Vector Configuration register on a VectorNav sensor. More...
static size_t | genWriteReferenceVectorConfiguration (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, uint8_t useMagModel, uint8_t useGravityModel, uint32_t recalcThreshold, float year, vn::math::vec3d position)
| Generates a command to write to the Reference Vector Configuration register on a VectorNav sensor. More...
static size_t | genReadGyroCompensation (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Gyro Compensation register on a VectorNav sensor. More...
static size_t | genWriteGyroCompensation (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, vn::math::mat3f c, vn::math::vec3f b)
| Generates a command to write to the Gyro Compensation register on a VectorNav sensor. More...
static size_t | genReadImuFilteringConfiguration (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the IMU Filtering Configuration register on a VectorNav sensor. More...
static size_t | genWriteImuFilteringConfiguration (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, uint16_t magWindowSize, uint16_t accelWindowSize, uint16_t gyroWindowSize, uint16_t tempWindowSize, uint16_t presWindowSize, uint8_t magFilterMode, uint8_t accelFilterMode, uint8_t gyroFilterMode, uint8_t tempFilterMode, uint8_t presFilterMode)
| Generates a command to write to the IMU Filtering Configuration register on a VectorNav sensor. More...
static size_t | genReadGpsCompassBaseline (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the GPS Compass Baseline register on a VectorNav sensor. More...
static size_t | genWriteGpsCompassBaseline (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, vn::math::vec3f position, vn::math::vec3f uncertainty)
| Generates a command to write to the GPS Compass Baseline register on a VectorNav sensor. More...
static size_t | genReadGpsCompassEstimatedBaseline (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the GPS Compass Estimated Baseline register on a VectorNav sensor. More...
static size_t | genReadImuRateConfiguration (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the IMU Rate Configuration register on a VectorNav sensor. More...
static size_t | genWriteImuRateConfiguration (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size, uint16_t imuRate, uint16_t navDivisor, float filterTargetRate, float filterMinRate)
| Generates a command to write to the IMU Rate Configuration register on a VectorNav sensor. More...
static size_t | genReadYawPitchRollTrueBodyAccelerationAndAngularRates (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Yaw, Pitch, Roll, True Body Acceleration and Angular Rates register on a VectorNav sensor. More...
static size_t | genReadYawPitchRollTrueInertialAccelerationAndAngularRates (ErrorDetectionMode errorDetectionMode, char *buffer, size_t size)
| Generates a command to read the Yaw, Pitch, Roll, True Inertial Acceleration and Angular Rates register on a VectorNav sensor. More...

## Static Public Attributes

static const unsigned char | BinaryGroupLengths [sizeof(uint8_t)*8][sizeof(uint16_t)*8]
| Array containing sizes for the binary group fields.

## Detailed Description

Structure representing a UART packet received from the VectorNav sensor.

Examples:
  getting_started/main.cpp, and uart_protocol/main.cpp.

## Member Enumeration Documentation

enum vn::protocol::uart::Packet::Type

The different types of UART packets.

Enumerator
TYPE_UNKNOWN | Type is unknown.
TYPE_BINARY | Binary packet.
TYPE_ASCII | ASCII packet.

## Constructor & Destructor Documentation

vn::protocol::uart::Packet::Packet | ( | char const * | packet,
|  | size_t | length
| ) |  |

Creates a new packet based on the provided packet data buffer. A full packet is expected which contains the deliminators (i.e. "$VNRRG,1*XX\r\n").

Parameters

  [in] | packet | Pointer to buffer containing the packet.
  [in] | length | The number of bytes in the packet.

vn::protocol::uart::Packet::Packet | ( | const Packet & | toCopy | ) |

Copy constructor.

Parameters

  [in] | toCopy | The Packet to copy.

## Member Function Documentation

static size_t vn::protocol::uart::Packet::computeBinaryPacketLength | ( | const char * | startOfPossibleBinaryPacket | ) |

static

Computes the expected number of bytes for a possible binary packet.

This method requires that the group fields present and the complete collection of individual group description fields are present.

Parameters

  [in] | startOfPossibleBinaryPacket | The start of the possible binary packet (i.e. the 0xFA character).

Returns
  The number of bytes expected for this binary packet.

static size_t vn::protocol::uart::Packet::computeNumOfBytesForBinaryGroupPayload | ( | BinaryGroup | group,
|  | uint16_t | groupField
| ) |  |

static

Computes the number of bytes expected for a binary group field.

Parameters

  [in] | group | The group to calculate the total for.
  [in] | groupField | The flags for data types present.

Returns
  The number of bytes for this group.

std::string vn::protocol::uart::Packet::datastr | ( |  | ) |

Returns the encapsulated data as a string.

Returns
  The packet data.

AsciiAsync vn::protocol::uart::Packet::determineAsciiAsyncType | ( |  | ) |

Determines the type of ASCII asynchronous message this packet is.

Returns
  The asynchronous data type of the packet.

Examples:
  getting_started/main.cpp, and uart_protocol/main.cpp.

static size_t vn::protocol::uart::Packet::finalizeCommand | ( | ErrorDetectionMode | errorDetectionMode,
|  | char * | packet,
|  | size_t | length
| ) |  |

static

Appends astrick (*), checksum, and newlines to command.

Parameters

  [in] | errorDetectionMode | The error detection type to append to the command.
  [in] | packet | The start of the packet. Should point to the '$' character.
  [in] | length | The current running length of the packet.

Returns
  The final size of the command after appending the endings.

uint16_t vn::protocol::uart::Packet::groupField | ( | size_t | index | ) |

This will return the requested group field of a binary packet at the specified index.

Parameters

  [in] | index | The 0-based index of the requested group field.

Returns
  The group field.

uint8_t vn::protocol::uart::Packet::groups | ( |  | ) |

If the packet is a binary message, this will return the groups field.

Returns
  The present groups field.

bool vn::protocol::uart::Packet::isAsciiAsync | ( |  | ) |

Indicates if the packet is an ASCII asynchronous message.

Returns
  `true` if the packet is an ASCII asynchronous message; otherwise `false`.

Examples:
  uart_protocol/main.cpp.

bool vn::protocol::uart::Packet::isCompatible | ( | CommonGroup | commonGroup,
|  | TimeGroup | timeGroup,
|  | ImuGroup | imuGroup,
|  | GpsGroup | gpsGroup,
|  | AttitudeGroup | attitudeGroup,
|  | InsGroup | insGroup
| ) |  |

Determines if the packet is a compatible match for an expected binary output message type.

Parameters

  [in] | commonGroup | The Common Group configuration.
  [in] | timeGroup | The Time Group configuration.
  [in] | imuGroup | The IMU Group configuration.
  [in] | gpsGroup | The GPS Group configuration.
  [in] | attitudeGroup | The Attitude Group configuration.
  [in] | insGroup | The INS Group configuration.

Returns
  `true` if the packet matches the expected group configuration; otherwise `false`.

Examples:
  getting_started/main.cpp, and uart_protocol/main.cpp.

bool vn::protocol::uart::Packet::isError | ( |  | ) |

Indicates if the packet is an ASCII error message.

Returns
  `true` if the packet is an error message; otherwise `false`.

Examples:
  uart_protocol/main.cpp.

bool vn::protocol::uart::Packet::isResponse | ( |  | ) |

Indicates if the packet is a response to a message sent to the sensor.

Returns
  `true` if the packet is a response message; otherwise `false`.

Examples:
  uart_protocol/main.cpp.

bool vn::protocol::uart::Packet::isValid | ( |  | ) |

Performs data integrity check on the data packet.

This will perform an 8-bit XOR checksum, a CRC16-CCITT CRC, or no checking depending on the provided data integrity in the packet.

Returns
  `true` if the packet passed the data integrity checks; otherwise `false`.

Packet& vn::protocol::uart::Packet::operator= | ( | const Packet & | from | ) |

Assignment operator.

Parameters

  [in] | from | The packet to assign from.

Returns
  Reference to the newly copied packet.

SensorError vn::protocol::uart::Packet::parseError | ( |  | ) |

Parses an error packet to get the error type.

Returns
  The sensor error.

Examples:
  uart_protocol/main.cpp.

Type vn::protocol::uart::Packet::type | ( |  | ) |

Returns the type of packet.

Returns
  The type of packet.

Examples:
  getting_started/main.cpp, and uart_protocol/main.cpp.

The documentation for this struct was generated from the following file:

- include/vn/packet.h