Main MRPT website > C++ reference for MRPT 1.9.9
List of all members | Public Member Functions | Private Attributes
LegacyDataPacket Struct Reference

Detailed Description

Contains an MTData XsMessage and supports functions for extracting contained data.

Definition at line 41 of file legacydatapacket.h.

#include <xSens_MT4/xcommunication/include/xsens/legacydatapacket.h>

Public Member Functions

 LegacyDataPacket ()
 Construct a new LegacyDataPacket without data. The LegacyDataPacket will be invalid. More...
 
 LegacyDataPacket (uint16_t count, bool xbus)
 Construct a new LegacyDataPacket with room for data from count devices. More...
 
 LegacyDataPacket (const LegacyDataPacket &pack)
 Construct a LegacyDataPacket as a copy of other. More...
 
 ~LegacyDataPacket ()
 Destructor. More...
 
const LegacyDataPacketoperator= (const LegacyDataPacket &pack)
 Assignment operator, copies the contents of pack into this. More...
 
uint16_t itemCount (void) const
 Returns the number of devices whose data is contained in the object. More...
 
void setItemCount (uint16_t count)
 Set the number of devices whose data is contained in this object to count. More...
 
XsTimeStamp timeOfArrival (void) const
 Returns the Time Of Arrival value as stored in the object. More...
 
void setTimeOfArrival (XsTimeStamp timeOfArrival)
 Set the Time Of Arrival value to timeofarrival. More...
 
XsTimeStamp rtc (void) const
 Returns the Real Time Clock value as stored in the object. More...
 
void setRtc (XsTimeStamp rtc)
 Set the Real Time Clock value to realtimeclock. More...
 
int64_t largePacketCounter (void) const
 Return the 64-bit sample counter associated with this packet. More...
 
void setLargePacketCounter (int64_t sc)
 Set the 64-bit sample counter associated with this packet. More...
 
XsMessage message (void) const
 Returns a copy of the XsMessage contained by the object, including computed and added data. More...
 
void setMessage (const XsMessage &message)
 Set the source message to msg. More...
 
XsMessage originalMessage (void) const
 Returns the original message as it was received, without computed and added data (except for SDI interval reconstruction) More...
 
PacketInfo packetInfo (int32_t index) const
 Returns the packet info for the index'th device in the packet. More...
 
bool setDataFormat (const XsDataFormat &format, int32_t index=0)
 Sets the data format of the device with the given index to format. More...
 
bool setDataFormat (XsOutputMode outputMode, XsOutputSettings outputSettings, int32_t index=0)
 Sets the data format of the device with the given index to outputMode and outputSettings. More...
 
XsDataFormat dataFormat (int32_t index=0) const
 Returns the data format of the device with the given index. More...
 
void setXbusSystem (bool xbus, bool convert=false)
 Sets the xbus flag. More...
 
bool isXbusSystem (void) const
 Returns whether the xbus flag is set or not. More...
 
int32_t findDeviceId (XsDeviceId dev) const
 Returns the index of the fixed data with id dev. More...
 
void setDeviceId (XsDeviceId deviceId, int32_t index)
 Sets the device ID of the device with the given index to deviceid. More...
 
XsDeviceId deviceId (int32_t index) const
 Returns the device ID of the device with the given index. More...
 
uint16_t frameCounter () const
 Return the frame counter (previously: sample counter) of the packet. More...
 
XsSize dataSize (int32_t index=0) const
 Returns the size of the data. More...
 
void updateInfoList ()
 Update the internal info list by analyzing the known XsDataFormat for each device. More...
 
uint16_t getFPValueSize (int32_t index) const
 Returns the floating/fixed point value size in bytes. More...
 
XsUShortVector rawAcceleration (int32_t index=0) const
 The Raw Accelerometer component of a data item. More...
 
bool containsRawAcceleration (int32_t index=0) const
 Check if data item contains Raw Accelerometer data. More...
 
bool setRawAcceleration (const XsUShortVector &vec, int32_t index=0)
 Add/update Raw Accelerometer data for the item. More...
 
XsUShortVector rawGyroscopeData (int32_t index=0) const
 Return the Raw Gyroscope component of a data item. More...
 
bool containsRawGyroscopeData (int32_t index=0) const
 Check if data item contains Raw Gyroscope data. More...
 
bool setRawGyroscopeData (const XsUShortVector &vec, int32_t index=0)
 Add/update Raw Gyroscope data for the item. More...
 
XsUShortVector rawMagneticField (int32_t index=0) const
 Return the Raw Magnetometer component of a data item. More...
 
bool containsRawMagneticField (int32_t index=0) const
 Check if data item contains Raw Magnetometer data. More...
 
bool setRawMagneticField (const XsUShortVector &vec, int32_t index=0)
 Add/update Raw Magnetometer data for the item. More...
 
uint16_t rawTemperature (int32_t index=0, int channel=0) const
 Return the Raw Temperature component of a data item. More...
 
bool containsRawTemperature (int32_t index=0, int channel=0) const
 Check if data item contains Raw Temperature data. More...
 
bool setRawTemperature (uint16_t temp, int32_t index=0, int channel=0)
 Add/update Raw Temperature data for the item. More...
 
int rawTemperatureChannelCount (int32_t index=0) const
 Returns the number of available Raw Temperature channels. More...
 
XsScrData rawData (int32_t index=0) const
 Return the Raw Data component of a data item. More...
 
bool containsRawData (int32_t index=0) const
 Check if data item contains Raw Data. More...
 
bool setRawData (const XsScrData &data, int32_t index=0)
 Add/update Raw Data for the item. More...
 
XsGpsPvtData gpsPvtData (int32_t index=0) const
 Return the Gps PVT data component of a data item. More...
 
bool containsGpsPvtData (int32_t index=0) const
 Check if data item contains Gps PVT Data. More...
 
bool setGpsPvtData (const XsGpsPvtData &data, int32_t index=0)
 Add/update Gps PVT Data for the item. More...
 
XsPressure pressure (int32_t index=0) const
 Return the pressure data component of a data item. More...
 
bool containsPressure (int32_t index=0) const
 Return true if the packet contains pressure data. More...
 
bool setPressure (const XsPressure &data, int32_t index=0)
 Add/update pressure data for the item. More...
 
MtwSdiData mtwSdiData (int32_t index=0) const
 Return the strapdown integration (SDI) data component of a data item. More...
 
bool containsMtwSdiData (int32_t index=0) const
 Check if data item contains strapdown integration data. More...
 
bool setMtwSdiData (const MtwSdiData &data, int32_t index=0)
 Add/update strapdown integration data for the item. More...
 
double temperature (int32_t index=0, int channel=0) const
 Return the Temperature component of a data item. More...
 
bool containsTemperature (int32_t index=0, int channel=0) const
 Check if data item contains Temperature data. More...
 
bool setTemperature (const double &temp, int32_t index=0, int channel=0)
 Add/update Calibrated Accelerometer data for the item. More...
 
int temperatureChannelCount (int32_t index=0) const
 Returns the number of temperature channels. More...
 
XsVector calibratedAcceleration (int32_t index=0) const
 Return the Calibrated Accelerometer component of a data item. More...
 
bool containsCalibratedAcceleration (int32_t index=0) const
 Check if data item contains Calibrated Accelerometer data. More...
 
bool setCalibratedAcceleration (const XsVector &vec, int32_t index=0)
 Add/update Calibrated Accelerometer data for the item. More...
 
XsVector calibratedGyroscopeData (int32_t index=0) const
 Return the Calibrated Gyroscope component of a data item. More...
 
bool containsCalibratedGyroscopeData (int32_t index=0) const
 Check if data item contains Calibrated Gyroscope data. More...
 
bool setCalibratedGyroscopeData (const XsVector &vec, int32_t index=0)
 Add/update Calibrated Gyroscope data for the item. More...
 
XsVector calibratedMagneticField (int32_t index=0) const
 Return the Calibrated Magnetometer component of a data item. More...
 
bool containsCalibratedMagneticField (int32_t index=0) const
 Check if data item contains Calibrated Magnetometer data. More...
 
bool setCalibratedMagneticField (const XsVector &vec, int32_t index=0)
 Add/update Calibrated Magnetometer data for the item. More...
 
XsCalibratedData calibratedData (int32_t index=0) const
 Return the Calibrated Data component of a data item. More...
 
bool containsCalibratedData (int32_t index=0) const
 Check if data item contains Calibrated Data. More...
 
bool setCalibratedData (const XsCalibratedData &data, int32_t index=0)
 Add/update Calibrated Data for the item. More...
 
XsQuaternion orientationQuaternion (int32_t index=0) const
 Return the Orientation component of a data item as a Quaternion. More...
 
bool containsOrientationQuaternion (int32_t index=0) const
 Check if data item contains Quaternion Orientation data. More...
 
bool setOrientationQuaternion (const XsQuaternion &data, int32_t index=0)
 Add/update Quaternion Orientation data for the item. More...
 
XsEuler orientationEuler (int32_t index=0) const
 Return the Orientation component of a data item as Euler angles. More...
 
bool containsOrientationEuler (int32_t index=0) const
 Check if data item contains Euler Orientation data. More...
 
bool setOrientationEuler (const XsEuler &data, int32_t index=0)
 Add/update Euler Orientation data for the item. More...
 
XsMatrix orientationMatrix (int32_t index=0) const
 Return the Orientation component of a data item as an Orientation Matrix. More...
 
bool containsOrientationMatrix (int32_t index=0) const
 Check if data item contains Matrix Orientation data. More...
 
bool setOrientationMatrix (const XsMatrix &data, int32_t index=0)
 Add/update Matrix Orientation data for the item. More...
 
bool containsOrientation (int32_t index=0) const
 Check if data item contains Orientation Data of any kind. More...
 
XsAnalogInData analogIn1Data (int32_t index=0) const
 Return the AnalogIn 1 component of a data item. More...
 
bool containsAnalogIn1Data (int32_t index=0) const
 Check if data item contains AnalogIn 1. More...
 
bool setAnalogIn1Data (const XsAnalogInData &data, int32_t index=0)
 Add/update AnalogIn 1 for the item. More...
 
XsAnalogInData analogIn2Data (int32_t index=0) const
 Return the AnalogIn 2 component of a data item. More...
 
bool containsAnalogIn2Data (int32_t index=0) const
 Check if data item contains AnalogIn 2. More...
 
bool setAnalogIn2Data (const XsAnalogInData &data, int32_t index=0)
 Add/update AnalogIn 2 for the item. More...
 
XsVector positionLLA (int32_t index=0) const
 Return the Position Lat Lon Alt component of a data item. More...
 
bool containsPositionLLA (int32_t index=0) const
 Check if data item contains Position Lat Lon Alt. More...
 
bool setPositionLLA (const XsVector &data, int32_t index=0)
 Add/update Position Lat Lon Alt for the item. More...
 
XsVector velocity (int32_t index=0) const
 Return the Velocity component of a data item. More...
 
bool containsVelocity (int32_t index=0) const
 Check if data item contains Velocity. More...
 
bool setVelocity (const XsVector &data, int32_t index=0)
 Add/update Velocity for the item. More...
 
uint32_t status (int32_t index, bool *outIsDetailed) const
 Return the Status component of a data item. More...
 
bool containsStatus (int32_t index=0) const
 Check if data item contains Status. More...
 
bool containsDetailedStatus (int32_t index=0) const
 Check if data item contains detailed Status information. More...
 
bool setStatus (const uint32_t data, int32_t index=0)
 Add/update Status information for the item. More...
 
uint16_t packetCounter (int32_t index=0) const
 Return the Sample Counter component of the packet. More...
 
bool containsPacketCounter (int32_t index=0) const
 Check if data item contains Sample Counter. More...
 
bool setPacketCounter (const uint16_t counter, int32_t index=0)
 Add/update Sample Counter for all items. More...
 
XsUtcTime utcTime (int32_t index=0) const
 Return the UTC Time component of the packet. More...
 
bool containsUtcTime (int32_t index=0) const
 Check if data item contains UTC Time. More...
 
bool setUtcTime (const XsUtcTime &data, int32_t index=0)
 Add/update UTC Time for all items. More...
 
XsVector freeAcceleration (int32_t index=0) const
 Return the Acc-G component of the packet. More...
 
bool containsFreeAcceleration (int32_t index=0) const
 Check if data item contains XKF-3 Acc-G data. More...
 
bool setFreeAcceleration (const XsVector &g, int32_t index=0)
 Add/update XKF-3 Acc-G data for the item. More...
 
XsTimeStamp triggerIndication (int channelID) const
 Return the synhcronization time recorded by the station. More...
 
bool containsTriggerIndication (int channelID=0) const
 Check if data item contains indication time on the given line. More...
 
bool setTriggerIndication (int channelID, const XsTimeStamp &t)
 Add/update trigger indication time for the item to the given line. More...
 
const PacketFixedDatafixedData () const
 Returns a const pointer to the contained fixed data, mostly used for debugging. More...
 

Private Attributes

PacketFixedDatam_fixedData
 Fixed packet data. More...
 
XsDeviceId m_lastFoundId
 Last found deviceId, speeds up searches. More...
 
uint16_t m_lastFoundIndex
 Index of last found deviceId, speeds up searches. More...
 
XsMessage m_msg
 The message. More...
 
XsTimeStamp m_rtc
 Sample time in ms, based on the sample counter. More...
 
XsTimeStamp m_toa
 Time of arrival. More...
 
XsTimeStamp m_packetId
 64 bit sample counter More...
 
XsTimeStamp m_triggerIn1
 Trigger indication on line 1. More...
 
XsTimeStamp m_triggerIn2
 Trigger indication on line 2. More...
 

Constructor & Destructor Documentation

◆ LegacyDataPacket() [1/3]

LegacyDataPacket::LegacyDataPacket ( )

Construct a new LegacyDataPacket without data. The LegacyDataPacket will be invalid.

Definition at line 51 of file legacydatapacket.cpp.

References PACKETLOG.

◆ LegacyDataPacket() [2/3]

LegacyDataPacket::LegacyDataPacket ( uint16_t  count,
bool  xbus 
)

Construct a new LegacyDataPacket with room for data from count devices.

Parameters
countThe number of devices whose data is in the object
xbusWhether the message was sent by an Xbus Master or by a standalone MT. This matters because the sample counter is in a different place.

Definition at line 71 of file legacydatapacket.cpp.

References m_fixedData, PacketFixedData::m_xm, and PACKETLOG.

◆ LegacyDataPacket() [3/3]

LegacyDataPacket::LegacyDataPacket ( const LegacyDataPacket pack)

Construct a LegacyDataPacket as a copy of other.

Definition at line 89 of file legacydatapacket.cpp.

References PACKETLOG.

◆ ~LegacyDataPacket()

LegacyDataPacket::~LegacyDataPacket ( )

Destructor.

Definition at line 135 of file legacydatapacket.cpp.

References m_fixedData, and PACKETLOG.

Member Function Documentation

◆ analogIn1Data()

XsAnalogInData LegacyDataPacket::analogIn1Data ( int32_t  index = 0) const

Return the AnalogIn 1 component of a data item.

Parameters
indexThe index of the item of which the data should be returned.
Returns
The AnalogIn 1 component of a data item.

Definition at line 1996 of file legacydatapacket.cpp.

References containsAnalogIn1Data(), PacketInfo::m_analogIn1, m_fixedData, PacketFixedData::m_infoList, and m_msg.

◆ analogIn2Data()

XsAnalogInData LegacyDataPacket::analogIn2Data ( int32_t  index = 0) const

Return the AnalogIn 2 component of a data item.

Parameters
indexThe index of the item of which the data should be returned.
Returns
The AnalogIn 2 component of a data item.

Definition at line 2033 of file legacydatapacket.cpp.

References containsAnalogIn2Data(), PacketInfo::m_analogIn2, m_fixedData, PacketFixedData::m_infoList, and m_msg.

◆ calibratedAcceleration()

XsVector LegacyDataPacket::calibratedAcceleration ( int32_t  index = 0) const

Return the Calibrated Accelerometer component of a data item.

Parameters
indexThe index of the item of which the data should be returned.
Returns
The Calibrated Accelerometer component of a data item.

Definition at line 1581 of file legacydatapacket.cpp.

References CHECKIFDOUBLE, containsCalibratedAcceleration(), PacketInfo::m_calAcc, m_fixedData, PacketFixedData::m_infoList, and m_msg.

Referenced by XsDataPacket_assignFromXsLegacyDataPacket().

◆ calibratedData()

XsCalibratedData LegacyDataPacket::calibratedData ( int32_t  index = 0) const

Return the Calibrated Data component of a data item.

Parameters
indexThe index of the item of which the data should be returned.
Returns
The Calibrated Data component of a data item.

Definition at line 1721 of file legacydatapacket.cpp.

References CHECKIFDOUBLE, containsCalibratedData(), PacketInfo::m_calAcc, PacketInfo::m_calGyr, PacketInfo::m_calMag, m_fixedData, PacketFixedData::m_infoList, m_msg, and XS_DATA_ITEM_NOT_AVAILABLE.

◆ calibratedGyroscopeData()

XsVector LegacyDataPacket::calibratedGyroscopeData ( int32_t  index = 0) const

Return the Calibrated Gyroscope component of a data item.

Parameters
indexThe index of the item of which the data should be returned.
Returns
The Calibrated Gyroscope component of a data item.

Definition at line 1627 of file legacydatapacket.cpp.

References CHECKIFDOUBLE, containsCalibratedGyroscopeData(), PacketInfo::m_calGyr, m_fixedData, PacketFixedData::m_infoList, and m_msg.

◆ calibratedMagneticField()

XsVector LegacyDataPacket::calibratedMagneticField ( int32_t  index = 0) const

Return the Calibrated Magnetometer component of a data item.

Parameters
indexThe index of the item of which the data should be returned.
Returns
The Calibrated Magnetometer component of a data item.

Definition at line 1673 of file legacydatapacket.cpp.

References CHECKIFDOUBLE, containsCalibratedMagneticField(), PacketInfo::m_calMag, m_fixedData, PacketFixedData::m_infoList, and m_msg.

Referenced by XsDataPacket_assignFromXsLegacyDataPacket().

◆ containsAnalogIn1Data()

bool LegacyDataPacket::containsAnalogIn1Data ( int32_t  index = 0) const

Check if data item contains AnalogIn 1.

Definition at line 2005 of file legacydatapacket.cpp.

References dataSize(), PacketInfo::m_analogIn1, m_fixedData, PacketFixedData::m_infoList, and XS_DATA_ITEM_NOT_AVAILABLE.

Referenced by analogIn1Data().

◆ containsAnalogIn2Data()

bool LegacyDataPacket::containsAnalogIn2Data ( int32_t  index = 0) const

Check if data item contains AnalogIn 2.

Definition at line 2042 of file legacydatapacket.cpp.

References dataSize(), PacketInfo::m_analogIn2, m_fixedData, PacketFixedData::m_infoList, and XS_DATA_ITEM_NOT_AVAILABLE.

Referenced by analogIn2Data().

◆ containsCalibratedAcceleration()

bool LegacyDataPacket::containsCalibratedAcceleration ( int32_t  index = 0) const

Check if data item contains Calibrated Accelerometer data.

Definition at line 1592 of file legacydatapacket.cpp.

References dataSize(), PacketInfo::m_calAcc, m_fixedData, PacketFixedData::m_infoList, and XS_DATA_ITEM_NOT_AVAILABLE.

Referenced by calibratedAcceleration(), and XsDataPacket_assignFromXsLegacyDataPacket().

◆ containsCalibratedData()

bool LegacyDataPacket::containsCalibratedData ( int32_t  index = 0) const

Check if data item contains Calibrated Data.

Parameters
indexThe index of the item of which the data should be returned.
Returns
true if the packet contains Calibrated Data

Definition at line 1767 of file legacydatapacket.cpp.

References dataSize(), PacketInfo::m_calData, m_fixedData, PacketFixedData::m_infoList, and XS_DATA_ITEM_NOT_AVAILABLE.

Referenced by calibratedData().

◆ containsCalibratedGyroscopeData()

bool LegacyDataPacket::containsCalibratedGyroscopeData ( int32_t  index = 0) const

Check if data item contains Calibrated Gyroscope data.

Definition at line 1638 of file legacydatapacket.cpp.

References dataSize(), PacketInfo::m_calGyr, m_fixedData, PacketFixedData::m_infoList, and XS_DATA_ITEM_NOT_AVAILABLE.

Referenced by calibratedGyroscopeData(), and XsDataPacket_assignFromXsLegacyDataPacket().

◆ containsCalibratedMagneticField()

bool LegacyDataPacket::containsCalibratedMagneticField ( int32_t  index = 0) const

Check if data item contains Calibrated Magnetometer data.

Definition at line 1684 of file legacydatapacket.cpp.

References dataSize(), PacketInfo::m_calMag, m_fixedData, PacketFixedData::m_infoList, and XS_DATA_ITEM_NOT_AVAILABLE.

Referenced by calibratedMagneticField(), and XsDataPacket_assignFromXsLegacyDataPacket().

◆ containsDetailedStatus()

bool LegacyDataPacket::containsDetailedStatus ( int32_t  index = 0) const

Check if data item contains detailed Status information.

Definition at line 2194 of file legacydatapacket.cpp.

References dataSize(), PacketInfo::m_detailedStatus, m_fixedData, PacketFixedData::m_infoList, and XS_DATA_ITEM_NOT_AVAILABLE.

◆ containsFreeAcceleration()

bool LegacyDataPacket::containsFreeAcceleration ( int32_t  index = 0) const

Check if data item contains XKF-3 Acc-G data.

Definition at line 2340 of file legacydatapacket.cpp.

References dataSize(), PacketInfo::m_acc_g, m_fixedData, PacketFixedData::m_infoList, and XS_DATA_ITEM_NOT_AVAILABLE.

Referenced by freeAcceleration().

◆ containsGpsPvtData()

bool LegacyDataPacket::containsGpsPvtData ( int32_t  index = 0) const

Check if data item contains Gps PVT Data.

Definition at line 1226 of file legacydatapacket.cpp.

References dataSize(), m_fixedData, PacketInfo::m_gpsPvtData, PacketFixedData::m_infoList, and XS_DATA_ITEM_NOT_AVAILABLE.

Referenced by gpsPvtData(), and XsDataPacket_assignFromXsLegacyDataPacket().

◆ containsMtwSdiData()

bool LegacyDataPacket::containsMtwSdiData ( int32_t  index = 0) const

Check if data item contains strapdown integration data.

Parameters
indexThe index of the item of which the data should be returned.
Returns
true if the packet contains MTw SDI data

Definition at line 1434 of file legacydatapacket.cpp.

References dataSize(), m_fixedData, PacketFixedData::m_infoList, PacketInfo::m_mtwSdiData, and XS_DATA_ITEM_NOT_AVAILABLE.

Referenced by frameCounter(), mtwSdiData(), pressure(), and XsDataPacket_assignFromXsLegacyDataPacket().

◆ containsOrientation()

bool LegacyDataPacket::containsOrientation ( int32_t  index = 0) const

Check if data item contains Orientation Data of any kind.

Definition at line 1984 of file legacydatapacket.cpp.

References dataSize(), m_fixedData, PacketFixedData::m_infoList, PacketInfo::m_oriEul, PacketInfo::m_oriMat, PacketInfo::m_oriQuat, and XS_DATA_ITEM_NOT_AVAILABLE.

◆ containsOrientationEuler()

bool LegacyDataPacket::containsOrientationEuler ( int32_t  index = 0) const

Check if data item contains Euler Orientation data.

Definition at line 1894 of file legacydatapacket.cpp.

References dataSize(), m_fixedData, PacketFixedData::m_infoList, PacketInfo::m_oriEul, and XS_DATA_ITEM_NOT_AVAILABLE.

Referenced by orientationEuler(), and XsDataPacket_assignFromXsLegacyDataPacket().

◆ containsOrientationMatrix()

bool LegacyDataPacket::containsOrientationMatrix ( int32_t  index = 0) const

Check if data item contains Matrix Orientation data.

Definition at line 1948 of file legacydatapacket.cpp.

References dataSize(), m_fixedData, PacketFixedData::m_infoList, PacketInfo::m_oriMat, and XS_DATA_ITEM_NOT_AVAILABLE.

Referenced by orientationMatrix(), and XsDataPacket_assignFromXsLegacyDataPacket().

◆ containsOrientationQuaternion()

bool LegacyDataPacket::containsOrientationQuaternion ( int32_t  index = 0) const

Check if data item contains Quaternion Orientation data.

Definition at line 1836 of file legacydatapacket.cpp.

References dataSize(), m_fixedData, PacketFixedData::m_infoList, PacketInfo::m_oriQuat, and XS_DATA_ITEM_NOT_AVAILABLE.

Referenced by orientationQuaternion(), and XsDataPacket_assignFromXsLegacyDataPacket().

◆ containsPacketCounter()

bool LegacyDataPacket::containsPacketCounter ( int32_t  index = 0) const

Check if data item contains Sample Counter.

Definition at line 2233 of file legacydatapacket.cpp.

References dataSize(), m_fixedData, PacketFixedData::m_infoList, PacketInfo::m_sc, and XS_DATA_ITEM_NOT_AVAILABLE.

Referenced by frameCounter(), packetCounter(), and XsDataPacket_assignFromXsLegacyDataPacket().

◆ containsPositionLLA()

bool LegacyDataPacket::containsPositionLLA ( int32_t  index = 0) const

Check if data item contains Position Lat Lon Alt.

Definition at line 2081 of file legacydatapacket.cpp.

References dataSize(), m_fixedData, PacketFixedData::m_infoList, PacketInfo::m_posLLA, and XS_DATA_ITEM_NOT_AVAILABLE.

Referenced by positionLLA(), and XsDataPacket_assignFromXsLegacyDataPacket().

◆ containsPressure()

bool LegacyDataPacket::containsPressure ( int32_t  index = 0) const

Return true if the packet contains pressure data.

Definition at line 1330 of file legacydatapacket.cpp.

References dataSize(), m_fixedData, PacketInfo::m_gpsPvtPressure, PacketFixedData::m_infoList, PacketInfo::m_wBaroMeter, and XS_DATA_ITEM_NOT_AVAILABLE.

Referenced by pressure().

◆ containsRawAcceleration()

bool LegacyDataPacket::containsRawAcceleration ( int32_t  index = 0) const

Check if data item contains Raw Accelerometer data.

Parameters
indexThe index of the item of which the data should be returned
Returns
true if this packet contains raw acceleration data

Definition at line 961 of file legacydatapacket.cpp.

References dataSize(), m_fixedData, PacketFixedData::m_infoList, PacketInfo::m_rawAcc, and XS_DATA_ITEM_NOT_AVAILABLE.

Referenced by rawAcceleration().

◆ containsRawData()

bool LegacyDataPacket::containsRawData ( int32_t  index = 0) const

Check if data item contains Raw Data.

Definition at line 1133 of file legacydatapacket.cpp.

References dataSize(), m_fixedData, PacketFixedData::m_infoList, PacketInfo::m_rawData, and XS_DATA_ITEM_NOT_AVAILABLE.

Referenced by rawData(), and XsDataPacket_assignFromXsLegacyDataPacket().

◆ containsRawGyroscopeData()

bool LegacyDataPacket::containsRawGyroscopeData ( int32_t  index = 0) const

Check if data item contains Raw Gyroscope data.

Definition at line 1000 of file legacydatapacket.cpp.

References dataSize(), m_fixedData, PacketFixedData::m_infoList, PacketInfo::m_rawGyr, and XS_DATA_ITEM_NOT_AVAILABLE.

Referenced by rawGyroscopeData().

◆ containsRawMagneticField()

bool LegacyDataPacket::containsRawMagneticField ( int32_t  index = 0) const

Check if data item contains Raw Magnetometer data.

Definition at line 1037 of file legacydatapacket.cpp.

References dataSize(), m_fixedData, PacketFixedData::m_infoList, PacketInfo::m_rawMag, and XS_DATA_ITEM_NOT_AVAILABLE.

Referenced by rawMagneticField().

◆ containsRawTemperature()

bool LegacyDataPacket::containsRawTemperature ( int32_t  index = 0,
int  channel = 0 
) const

Check if data item contains Raw Temperature data.

Definition at line 1071 of file legacydatapacket.cpp.

References dataSize(), m_fixedData, PacketFixedData::m_infoList, PacketInfo::m_rawTemp, XS_DATA_ITEM_NOT_AVAILABLE, and XS_MAX_TEMPERATURE_CHANNELS.

Referenced by rawTemperature().

◆ containsStatus()

bool LegacyDataPacket::containsStatus ( int32_t  index = 0) const

Check if data item contains Status.

Definition at line 2187 of file legacydatapacket.cpp.

References dataSize(), m_fixedData, PacketFixedData::m_infoList, PacketInfo::m_status, and XS_DATA_ITEM_NOT_AVAILABLE.

Referenced by status(), and XsDataPacket_assignFromXsLegacyDataPacket().

◆ containsTemperature()

bool LegacyDataPacket::containsTemperature ( int32_t  index = 0,
int  channel = 0 
) const

◆ containsTriggerIndication()

bool LegacyDataPacket::containsTriggerIndication ( int  channelID = 0) const

Check if data item contains indication time on the given line.

Definition at line 2386 of file legacydatapacket.cpp.

References m_triggerIn1, and m_triggerIn2.

◆ containsUtcTime()

bool LegacyDataPacket::containsUtcTime ( int32_t  index = 0) const

Check if data item contains UTC Time.

Definition at line 2278 of file legacydatapacket.cpp.

References dataSize(), m_fixedData, PacketFixedData::m_infoList, PacketInfo::m_utcTime, and XS_DATA_ITEM_NOT_AVAILABLE.

Referenced by utcTime(), and XsDataPacket_assignFromXsLegacyDataPacket().

◆ containsVelocity()

bool LegacyDataPacket::containsVelocity ( int32_t  index = 0) const

◆ dataFormat()

XsDataFormat LegacyDataPacket::dataFormat ( int32_t  index = 0) const

Returns the data format of the device with the given index.

Parameters
indexThe index of the device whose data format should be returned
Returns
The data format of the device
See also
findDeviceId

Definition at line 323 of file legacydatapacket.cpp.

References m_fixedData, PacketFixedData::m_formatList, and PacketFixedData::m_itemCount.

Referenced by XsDataPacket_assignFromXsLegacyDataPacket().

◆ dataSize()

XsSize LegacyDataPacket::dataSize ( int32_t  index = 0) const

◆ deviceId()

XsDeviceId LegacyDataPacket::deviceId ( int32_t  index) const

Returns the device ID of the device with the given index.

Parameters
indexThe index of the device whose device ID should be returned
Returns
The device ID of the device
See also
findDeviceId

Definition at line 298 of file legacydatapacket.cpp.

References m_fixedData, and PacketFixedData::m_idList.

Referenced by XsDataPacket_assignFromXsLegacyDataPacket().

◆ findDeviceId()

int32_t LegacyDataPacket::findDeviceId ( XsDeviceId  dev) const

Returns the index of the fixed data with id dev.

If the result is not -1, it can be used as the index parameter in other functions that require it (see the list below).

Parameters
devThe device ID to find
Returns
The index of the fixed data
See also
deviceId
setDeviceId
dataFormat
setDataFormat(const XsDataFormat&, int32_t)
setDataFormat(XsOutputMode, XsOutputSettings, int32_t)

Definition at line 276 of file legacydatapacket.cpp.

References m_fixedData, PacketFixedData::m_idList, PacketFixedData::m_itemCount, m_lastFoundId, and m_lastFoundIndex.

◆ fixedData()

const PacketFixedData* LegacyDataPacket::fixedData ( ) const
inline

Returns a const pointer to the contained fixed data, mostly used for debugging.

Definition at line 331 of file legacydatapacket.h.

References m_fixedData.

◆ frameCounter()

uint16_t LegacyDataPacket::frameCounter ( ) const

Return the frame counter (previously: sample counter) of the packet.

For SDI data, this function will return the Last Frame Number in the SDI interval. For other data, this function will return the plain Sample Counter.

Returns
The frame counter of the packet or 0 if it isn't present in the packet (note that 0 is a valid sample counter, so don't use it for an error check).

Definition at line 254 of file legacydatapacket.cpp.

References containsMtwSdiData(), containsPacketCounter(), m_fixedData, PacketFixedData::m_infoList, m_msg, PacketInfo::m_sc, and PacketInfo::m_wLastFrameNumber.

◆ freeAcceleration()

XsVector LegacyDataPacket::freeAcceleration ( int32_t  index = 0) const

Return the Acc-G component of the packet.

Parameters
indexThe index of the item of which the data should be returned.
Returns
The Acc-G component of the packet.

Definition at line 2329 of file legacydatapacket.cpp.

References CHECKIFDOUBLE, containsFreeAcceleration(), PacketInfo::m_acc_g, m_fixedData, PacketFixedData::m_infoList, and m_msg.

◆ getFPValueSize()

uint16_t LegacyDataPacket::getFPValueSize ( int32_t  index) const

◆ gpsPvtData()

XsGpsPvtData LegacyDataPacket::gpsPvtData ( int32_t  index = 0) const

Return the Gps PVT data component of a data item.

Parameters
indexThe index of the item of which the data should be returned.
Returns
The Gps PVT data component of a data item.

Definition at line 1172 of file legacydatapacket.cpp.

References containsGpsPvtData(), m_fixedData, PacketInfo::m_gpsPvtGpsAge, PacketInfo::m_gpsPvtGpsData, PacketInfo::m_gpsPvtPressure, PacketInfo::m_gpsPvtPressureAge, PacketFixedData::m_infoList, m_msg, and XS_DATA_ITEM_NOT_AVAILABLE.

Referenced by XsDataPacket_assignFromXsLegacyDataPacket().

◆ isXbusSystem()

bool LegacyDataPacket::isXbusSystem ( void  ) const

Returns whether the xbus flag is set or not.

Returns
trur if the xbus flag is set or not
See also
setXbusSystem

Definition at line 384 of file legacydatapacket.cpp.

References m_fixedData, and PacketFixedData::m_xm.

Referenced by XsDataPacket_assignFromXsLegacyDataPacket().

◆ itemCount()

uint16_t LegacyDataPacket::itemCount ( void  ) const

Returns the number of devices whose data is contained in the object.

Definition at line 153 of file legacydatapacket.cpp.

References m_fixedData, and PacketFixedData::m_itemCount.

◆ largePacketCounter()

int64_t LegacyDataPacket::largePacketCounter ( void  ) const

Return the 64-bit sample counter associated with this packet.

Returns
The 64-bit sample counter associated with this packet
Note
This sample counter may differ a lot from the normal 16-bit sample counter

Definition at line 193 of file legacydatapacket.cpp.

References m_packetId.

Referenced by XsDataPacket_assignFromXsLegacyDataPacket().

◆ message()

XsMessage LegacyDataPacket::message ( void  ) const

Returns a copy of the XsMessage contained by the object, including computed and added data.

Definition at line 207 of file legacydatapacket.cpp.

References m_msg.

Referenced by XsDataPacket_assignFromXsLegacyDataPacket().

◆ mtwSdiData()

MtwSdiData LegacyDataPacket::mtwSdiData ( int32_t  index = 0) const

◆ operator=()

const LegacyDataPacket & LegacyDataPacket::operator= ( const LegacyDataPacket pack)

Assignment operator, copies the contents of pack into this.

Definition at line 107 of file legacydatapacket.cpp.

References m_fixedData, m_lastFoundId, m_lastFoundIndex, m_msg, m_packetId, m_rtc, m_toa, m_triggerIn1, m_triggerIn2, and PACKETLOG.

◆ orientationEuler()

XsEuler LegacyDataPacket::orientationEuler ( int32_t  index = 0) const

Return the Orientation component of a data item as Euler angles.

Parameters
indexThe index of the item of which the data should be returned.
Returns
The Orientation component of a data item as Euler angles.

Definition at line 1881 of file legacydatapacket.cpp.

References CHECKIFDOUBLE, containsOrientationEuler(), m_fixedData, PacketFixedData::m_infoList, m_msg, and PacketInfo::m_oriEul.

Referenced by XsDataPacket_assignFromXsLegacyDataPacket().

◆ orientationMatrix()

XsMatrix LegacyDataPacket::orientationMatrix ( int32_t  index = 0) const

Return the Orientation component of a data item as an Orientation Matrix.

Parameters
indexThe index of the item of which the data should be returned.
Returns
The Orientation component of a data item as an Orientation Matrix.

Definition at line 1928 of file legacydatapacket.cpp.

References CHECKIFDOUBLE, containsOrientationMatrix(), getFPValueSize(), m_fixedData, PacketFixedData::m_infoList, m_msg, and PacketInfo::m_oriMat.

Referenced by XsDataPacket_assignFromXsLegacyDataPacket().

◆ orientationQuaternion()

XsQuaternion LegacyDataPacket::orientationQuaternion ( int32_t  index = 0) const

Return the Orientation component of a data item as a Quaternion.

Parameters
indexThe index of the item of which the data should be returned.
Returns
The Orientation component of a data item as a Quaternion.

Definition at line 1824 of file legacydatapacket.cpp.

References CHECKIFDOUBLE, containsOrientationQuaternion(), m_fixedData, PacketFixedData::m_infoList, m_msg, and PacketInfo::m_oriQuat.

Referenced by XsDataPacket_assignFromXsLegacyDataPacket().

◆ originalMessage()

XsMessage LegacyDataPacket::originalMessage ( void  ) const

Returns the original message as it was received, without computed and added data (except for SDI interval reconstruction)

Definition at line 211 of file legacydatapacket.cpp.

References PacketInfo::m_doubleBoundary, m_fixedData, PacketFixedData::m_infoList, PacketFixedData::m_itemCount, and m_msg.

Referenced by XsDataPacket_assignFromXsLegacyDataPacket().

◆ packetCounter()

uint16_t LegacyDataPacket::packetCounter ( int32_t  index = 0) const

Return the Sample Counter component of the packet.

Parameters
indexThe index of the item of which the data should be returned. (ignored)
Returns
The Sample Counter component of the packet.

Definition at line 2228 of file legacydatapacket.cpp.

References containsPacketCounter(), m_fixedData, PacketFixedData::m_infoList, m_msg, and PacketInfo::m_sc.

Referenced by setXbusSystem(), and XsDataPacket_assignFromXsLegacyDataPacket().

◆ packetInfo()

PacketInfo LegacyDataPacket::packetInfo ( int32_t  index) const

Returns the packet info for the index'th device in the packet.

This describes what data is contained by the object.

Parameters
indexThe index of the device whose packet info should be returned
Returns
The packet info for device index

Definition at line 238 of file legacydatapacket.cpp.

References m_fixedData, PacketFixedData::m_infoList, and PacketFixedData::m_itemCount.

Referenced by XsDataPacket_assignFromXsLegacyDataPacket().

◆ positionLLA()

XsVector LegacyDataPacket::positionLLA ( int32_t  index = 0) const

Return the Position Lat Lon Alt component of a data item.

Parameters
indexThe index of the item of which the data should be returned.
Returns
The Position Lat Lon Alt component of a data item.

Definition at line 2070 of file legacydatapacket.cpp.

References CHECKIFDOUBLE, containsPositionLLA(), m_fixedData, PacketFixedData::m_infoList, m_msg, and PacketInfo::m_posLLA.

Referenced by XsDataPacket_assignFromXsLegacyDataPacket().

◆ pressure()

XsPressure LegacyDataPacket::pressure ( int32_t  index = 0) const

Return the pressure data component of a data item.

Parameters
indexThe index of the item of which the data should be returned.
Returns
The pressure data component of a data item.

Definition at line 1299 of file legacydatapacket.cpp.

References containsMtwSdiData(), containsPressure(), m_fixedData, PacketInfo::m_gpsPvtPressure, PacketInfo::m_gpsPvtPressureAge, PacketFixedData::m_infoList, m_msg, PacketInfo::m_wAidingData, and PacketInfo::m_wBaroMeter.

◆ rawAcceleration()

XsUShortVector LegacyDataPacket::rawAcceleration ( int32_t  index = 0) const

The Raw Accelerometer component of a data item.

\param index The index of the item of which the data should be returned.

\returns A XsUShortVector containing the x, y and z axis values in that

order

Definition at line 944 of file legacydatapacket.cpp.

References containsRawAcceleration(), m_fixedData, PacketFixedData::m_infoList, m_msg, and PacketInfo::m_rawAcc.

◆ rawData()

XsScrData LegacyDataPacket::rawData ( int32_t  index = 0) const

Return the Raw Data component of a data item.

Parameters
indexThe index of the item of which the data should be returned.
Returns
The Raw Data component of a data item.

Definition at line 1115 of file legacydatapacket.cpp.

References containsRawData(), m_fixedData, PacketFixedData::m_infoList, m_msg, PacketInfo::m_rawData, rawTemperatureChannelCount(), and swapEndian16.

Referenced by XsDataPacket_assignFromXsLegacyDataPacket().

◆ rawGyroscopeData()

XsUShortVector LegacyDataPacket::rawGyroscopeData ( int32_t  index = 0) const

Return the Raw Gyroscope component of a data item.

Parameters
indexThe index of the item of which the data should be returned.
Returns
The Raw Gyroscope component of a data item.

Definition at line 990 of file legacydatapacket.cpp.

References containsRawGyroscopeData(), m_fixedData, PacketFixedData::m_infoList, m_msg, and PacketInfo::m_rawGyr.

◆ rawMagneticField()

XsUShortVector LegacyDataPacket::rawMagneticField ( int32_t  index = 0) const

Return the Raw Magnetometer component of a data item.

Parameters
indexThe index of the item of which the data should be returned.
Returns
The Raw Magnetometer component of a data item.

Definition at line 1027 of file legacydatapacket.cpp.

References containsRawMagneticField(), m_fixedData, PacketFixedData::m_infoList, m_msg, and PacketInfo::m_rawMag.

◆ rawTemperature()

uint16_t LegacyDataPacket::rawTemperature ( int32_t  index = 0,
int  channel = 0 
) const

Return the Raw Temperature component of a data item.

Parameters
indexThe index of the item of which the data should be returned.
channelThe Temperature channel to return
Returns
The Raw Temperature component of a data item.

Definition at line 1064 of file legacydatapacket.cpp.

References containsRawTemperature(), m_fixedData, PacketFixedData::m_infoList, m_msg, and PacketInfo::m_rawTemp.

Referenced by XsDataPacket_assignFromXsLegacyDataPacket().

◆ rawTemperatureChannelCount()

int LegacyDataPacket::rawTemperatureChannelCount ( int32_t  index = 0) const

◆ rtc()

XsTimeStamp LegacyDataPacket::rtc ( void  ) const

Returns the Real Time Clock value as stored in the object.

Definition at line 180 of file legacydatapacket.cpp.

References m_rtc.

◆ setAnalogIn1Data()

bool LegacyDataPacket::setAnalogIn1Data ( const XsAnalogInData data,
int32_t  index = 0 
)

Add/update AnalogIn 1 for the item.

Definition at line 2013 of file legacydatapacket.cpp.

References dataSize(), PacketInfo::m_analogIn1, m_fixedData, PacketFixedData::m_infoList, m_msg, PacketInfo::m_size, and XS_DATA_ITEM_NOT_AVAILABLE.

◆ setAnalogIn2Data()

bool LegacyDataPacket::setAnalogIn2Data ( const XsAnalogInData data,
int32_t  index = 0 
)

Add/update AnalogIn 2 for the item.

Definition at line 2050 of file legacydatapacket.cpp.

References dataSize(), PacketInfo::m_analogIn2, m_fixedData, PacketFixedData::m_infoList, m_msg, PacketInfo::m_size, and XS_DATA_ITEM_NOT_AVAILABLE.

◆ setCalibratedAcceleration()

bool LegacyDataPacket::setCalibratedAcceleration ( const XsVector vec,
int32_t  index = 0 
)

Add/update Calibrated Accelerometer data for the item.

Definition at line 1599 of file legacydatapacket.cpp.

References CHECKIFDOUBLE, dataSize(), getFPValueSize(), ISDOUBLE, PacketInfo::m_calAcc, m_fixedData, PacketFixedData::m_infoList, m_msg, PacketInfo::m_size, and XS_DATA_ITEM_NOT_AVAILABLE.

◆ setCalibratedData()

bool LegacyDataPacket::setCalibratedData ( const XsCalibratedData data,
int32_t  index = 0 
)

◆ setCalibratedGyroscopeData()

bool LegacyDataPacket::setCalibratedGyroscopeData ( const XsVector vec,
int32_t  index = 0 
)

◆ setCalibratedMagneticField()

bool LegacyDataPacket::setCalibratedMagneticField ( const XsVector vec,
int32_t  index = 0 
)

Add/update Calibrated Magnetometer data for the item.

Definition at line 1691 of file legacydatapacket.cpp.

References CHECKIFDOUBLE, dataSize(), getFPValueSize(), ISDOUBLE, PacketInfo::m_calMag, m_fixedData, PacketFixedData::m_infoList, m_msg, PacketInfo::m_size, and XS_DATA_ITEM_NOT_AVAILABLE.

◆ setDataFormat() [1/2]

bool LegacyDataPacket::setDataFormat ( const XsDataFormat format,
int32_t  index = 0 
)

Sets the data format of the device with the given index to format.

Parameters
formatThe data format of the device
indexThe index of the device whose data format should be updated
Returns
true if the data format was successfully updated
See also
findDeviceId

Definition at line 340 of file legacydatapacket.cpp.

References m_fixedData, PacketFixedData::m_formatList, and updateInfoList().

Referenced by mrpt::hwdrivers::CIMUXSens_MT4::doProcess().

◆ setDataFormat() [2/2]

bool LegacyDataPacket::setDataFormat ( XsOutputMode  outputMode,
XsOutputSettings  outputSettings,
int32_t  index = 0 
)

Sets the data format of the device with the given index to outputMode and outputSettings.

Parameters
outputModeThe output mode of the device (see low level communication documentation)
outputSettingsThe output settings of the device (see low level communication documentation)
indexThe index of the device whose data format should be updated
Returns
true if the data format was successfully updated
See also
findDeviceId

Definition at line 364 of file legacydatapacket.cpp.

References m_fixedData, PacketFixedData::m_formatList, XsDataFormat::m_outputMode, XsDataFormat::m_outputSettings, and updateInfoList().

◆ setDeviceId()

void LegacyDataPacket::setDeviceId ( XsDeviceId  deviceid,
int32_t  index 
)

Sets the device ID of the device with the given index to deviceid.

Parameters
deviceidThe device ID to set
indexThe index of the device whose device ID should be updated
Returns
true if the device ID was successfully updated
See also
findDeviceId

Definition at line 311 of file legacydatapacket.cpp.

References m_fixedData, and PacketFixedData::m_idList.

Referenced by mrpt::hwdrivers::CIMUXSens_MT4::doProcess().

◆ setFreeAcceleration()

bool LegacyDataPacket::setFreeAcceleration ( const XsVector g,
int32_t  index = 0 
)

◆ setGpsPvtData()

bool LegacyDataPacket::setGpsPvtData ( const XsGpsPvtData data,
int32_t  index = 0 
)

◆ setItemCount()

void LegacyDataPacket::setItemCount ( uint16_t  count)

Set the number of devices whose data is contained in this object to count.

Definition at line 162 of file legacydatapacket.cpp.

References m_fixedData, and PacketFixedData::m_itemCount.

◆ setLargePacketCounter()

void LegacyDataPacket::setLargePacketCounter ( int64_t  sc)

Set the 64-bit sample counter associated with this packet.

Definition at line 200 of file legacydatapacket.cpp.

References m_packetId.

◆ setMessage()

void LegacyDataPacket::setMessage ( const XsMessage msg)

Set the source message to msg.

Parameters
msgThe message to use
Note
Call updateInfoList() to actually start using the new message

Definition at line 232 of file legacydatapacket.cpp.

References m_msg.

Referenced by mrpt::hwdrivers::CIMUXSens_MT4::doProcess().

◆ setMtwSdiData()

bool LegacyDataPacket::setMtwSdiData ( const MtwSdiData data,
int32_t  index = 0 
)

◆ setOrientationEuler()

bool LegacyDataPacket::setOrientationEuler ( const XsEuler data,
int32_t  index = 0 
)

◆ setOrientationMatrix()

bool LegacyDataPacket::setOrientationMatrix ( const XsMatrix data,
int32_t  index = 0 
)

◆ setOrientationQuaternion()

bool LegacyDataPacket::setOrientationQuaternion ( const XsQuaternion data,
int32_t  index = 0 
)

◆ setPacketCounter()

bool LegacyDataPacket::setPacketCounter ( const uint16_t  counter,
int32_t  index = 0 
)

Add/update Sample Counter for all items.

Definition at line 2240 of file legacydatapacket.cpp.

References dataSize(), m_fixedData, PacketFixedData::m_infoList, m_msg, PacketInfo::m_sc, PacketInfo::m_size, and XS_DATA_ITEM_NOT_AVAILABLE.

◆ setPositionLLA()

bool LegacyDataPacket::setPositionLLA ( const XsVector data,
int32_t  index = 0 
)

◆ setPressure()

bool LegacyDataPacket::setPressure ( const XsPressure data,
int32_t  index = 0 
)

◆ setRawAcceleration()

bool LegacyDataPacket::setRawAcceleration ( const XsUShortVector vec,
int32_t  index = 0 
)

Add/update Raw Accelerometer data for the item.

Definition at line 970 of file legacydatapacket.cpp.

References dataSize(), m_fixedData, PacketFixedData::m_infoList, m_msg, PacketInfo::m_rawAcc, PacketInfo::m_size, and XS_DATA_ITEM_NOT_AVAILABLE.

◆ setRawData()

bool LegacyDataPacket::setRawData ( const XsScrData data,
int32_t  index = 0 
)

◆ setRawGyroscopeData()

bool LegacyDataPacket::setRawGyroscopeData ( const XsUShortVector vec,
int32_t  index = 0 
)

Add/update Raw Gyroscope data for the item.

Definition at line 1007 of file legacydatapacket.cpp.

References dataSize(), m_fixedData, PacketFixedData::m_infoList, m_msg, PacketInfo::m_rawGyr, PacketInfo::m_size, and XS_DATA_ITEM_NOT_AVAILABLE.

◆ setRawMagneticField()

bool LegacyDataPacket::setRawMagneticField ( const XsUShortVector vec,
int32_t  index = 0 
)

Add/update Raw Magnetometer data for the item.

Definition at line 1044 of file legacydatapacket.cpp.

References dataSize(), m_fixedData, PacketFixedData::m_infoList, m_msg, PacketInfo::m_rawMag, PacketInfo::m_size, and XS_DATA_ITEM_NOT_AVAILABLE.

◆ setRawTemperature()

bool LegacyDataPacket::setRawTemperature ( uint16_t  temp,
int32_t  index = 0,
int  channel = 0 
)

◆ setRtc()

void LegacyDataPacket::setRtc ( XsTimeStamp  rtc)

Set the Real Time Clock value to realtimeclock.

Definition at line 183 of file legacydatapacket.cpp.

References m_rtc.

◆ setStatus()

bool LegacyDataPacket::setStatus ( const uint32_t  data,
int32_t  index = 0 
)

◆ setTemperature()

bool LegacyDataPacket::setTemperature ( const double &  temp,
int32_t  index = 0,
int  channel = 0 
)

◆ setTimeOfArrival()

void LegacyDataPacket::setTimeOfArrival ( XsTimeStamp  timeOfArrival)

Set the Time Of Arrival value to timeofarrival.

Definition at line 173 of file legacydatapacket.cpp.

References m_toa.

◆ setTriggerIndication()

bool LegacyDataPacket::setTriggerIndication ( int  channelID,
const XsTimeStamp t 
)

Add/update trigger indication time for the item to the given line.

Definition at line 2404 of file legacydatapacket.cpp.

References m_triggerIn1, and m_triggerIn2.

◆ setUtcTime()

bool LegacyDataPacket::setUtcTime ( const XsUtcTime data,
int32_t  index = 0 
)

◆ setVelocity()

bool LegacyDataPacket::setVelocity ( const XsVector data,
int32_t  index = 0 
)

◆ setXbusSystem()

void LegacyDataPacket::setXbusSystem ( bool  xbus,
bool  convert = false 
)

Sets the xbus flag.

The xbus flag determines where the packet counter is stored in the message. Setting this value incorrectly can lead to corrupted data reads.

Parameters
xbusThe desired setting
convertWhen set to true, the sample counter will be moved from its old place to the new place.

Definition at line 400 of file legacydatapacket.cpp.

References m_fixedData, m_msg, PacketFixedData::m_xm, packetCounter(), and updateInfoList().

Referenced by mrpt::hwdrivers::CIMUXSens_MT4::doProcess().

◆ status()

uint32_t LegacyDataPacket::status ( int32_t  index,
bool *  outIsDetailed 
) const

Return the Status component of a data item.

Parameters
indexThe index of the item of which the data should be returned.
[out]outIsDetailedpointer to boolean. After call, the boolean is true if the status is detailed
Returns
The Status component of a data item.

Definition at line 2163 of file legacydatapacket.cpp.

References containsStatus(), PacketInfo::m_detailedStatus, m_fixedData, PacketFixedData::m_infoList, m_msg, PacketInfo::m_status, and XS_DATA_ITEM_NOT_AVAILABLE.

Referenced by XsDataPacket_assignFromXsLegacyDataPacket().

◆ temperature()

double LegacyDataPacket::temperature ( int32_t  index = 0,
int  channel = 0 
) const

Return the Temperature component of a data item.

Parameters
indexThe index of the item of which the data should be returned.
channelThe Temperature channel to return
Returns
The Temperature component of a data item.

Definition at line 1520 of file legacydatapacket.cpp.

References CHECKIFDOUBLE, containsTemperature(), m_fixedData, PacketFixedData::m_infoList, m_msg, and PacketInfo::m_temp.

Referenced by XsDataPacket_assignFromXsLegacyDataPacket().

◆ temperatureChannelCount()

int LegacyDataPacket::temperatureChannelCount ( int32_t  index = 0) const

Returns the number of temperature channels.

Definition at line 1569 of file legacydatapacket.cpp.

References m_fixedData, PacketFixedData::m_infoList, PacketInfo::m_temp, XS_DATA_ITEM_NOT_AVAILABLE, and XS_MAX_TEMPERATURE_CHANNELS.

Referenced by setTemperature().

◆ timeOfArrival()

XsTimeStamp LegacyDataPacket::timeOfArrival ( void  ) const

Returns the Time Of Arrival value as stored in the object.

Definition at line 170 of file legacydatapacket.cpp.

References m_toa.

Referenced by XsDataPacket_assignFromXsLegacyDataPacket().

◆ triggerIndication()

XsTimeStamp LegacyDataPacket::triggerIndication ( int  channelID) const

Return the synhcronization time recorded by the station.

Parameters
channelIDThe synchronization channel number, where the output signal is connected.
Returns
The synhcronization time recorded by the station.

Definition at line 2372 of file legacydatapacket.cpp.

References m_triggerIn1, and m_triggerIn2.

◆ updateInfoList()

void LegacyDataPacket::updateInfoList ( )

Update the internal info list by analyzing the known XsDataFormat for each device.

Definition at line 485 of file legacydatapacket.cpp.

References getFPValueSize(), PacketInfo::m_acc_g, PacketInfo::m_analogIn1, PacketInfo::m_analogIn2, PacketInfo::m_calAcc, PacketInfo::m_calData, PacketInfo::m_calGyr, PacketInfo::m_calMag, PacketInfo::m_detailedStatus, PacketInfo::m_doubleBoundary, m_fixedData, PacketFixedData::m_formatList, PacketInfo::m_gpsPvtData, PacketInfo::m_gpsPvtGpsAge, PacketInfo::m_gpsPvtGpsData, PacketInfo::m_gpsPvtHacc, PacketInfo::m_gpsPvtHeight, PacketInfo::m_gpsPvtItow, PacketInfo::m_gpsPvtLatitude, PacketInfo::m_gpsPvtLongitude, PacketInfo::m_gpsPvtPressure, PacketInfo::m_gpsPvtPressureAge, PacketInfo::m_gpsPvtSacc, PacketInfo::m_gpsPvtVacc, PacketInfo::m_gpsPvtVeld, PacketInfo::m_gpsPvtVele, PacketInfo::m_gpsPvtVeln, PacketFixedData::m_infoList, PacketFixedData::m_itemCount, PacketInfo::m_mtwSdiData, PacketInfo::m_offset, PacketInfo::m_oriEul, PacketInfo::m_oriMat, PacketInfo::m_oriQuat, XsDataFormat::m_outputMode, XsDataFormat::m_outputSettings, PacketInfo::m_posLLA, PacketInfo::m_rawAcc, PacketInfo::m_rawData, PacketInfo::m_rawGyr, PacketInfo::m_rawMag, PacketInfo::m_rawTemp, PacketInfo::m_sc, PacketInfo::m_size, PacketInfo::m_status, PacketInfo::m_temp, PacketInfo::m_utcDay, PacketInfo::m_utcHour, PacketInfo::m_utcMinute, PacketInfo::m_utcMonth, PacketInfo::m_utcNano, PacketInfo::m_utcSecond, PacketInfo::m_utcTime, PacketInfo::m_utcValid, PacketInfo::m_utcYear, PacketInfo::m_velNEDorNWU, PacketInfo::m_wAidingData, PacketInfo::m_wBaroMeter, PacketInfo::m_wClientId, PacketInfo::m_wCurrentBias, PacketInfo::m_wFirstFrameNumber, PacketInfo::m_wLastFrameNumber, PacketInfo::m_wMagnetoMeter, PacketInfo::m_wOrientationIncrement, PacketInfo::m_wRssi, PacketInfo::m_wTimeSync, PacketInfo::m_wVelocityIncrement, PacketFixedData::m_xm, XOM_Auxiliary, XOM_Calibrated, XOM_GpsPvt_Pressure, XOM_Orientation, XOM_Position, XOM_Raw, XOM_Sdi, XOM_Status, XOM_Temperature, XOM_Velocity, XOS_AuxiliaryMode_Ain1_Mask, XOS_AuxiliaryMode_Ain2_Mask, XOS_CalibratedMode_Acc_Mask, XOS_CalibratedMode_AccGyrMag_Mask, XOS_CalibratedMode_Gyr_Mask, XOS_CalibratedMode_Mag_Mask, XOS_ExtendedTemperature_Mask, XOS_NoGpsInGpsPvt, XOS_OrientationMode_Euler, XOS_OrientationMode_Mask, XOS_OrientationMode_Matrix, XOS_OrientationMode_Quaternion, XOS_PositionMode_Lla_Wgs84, XOS_PositionMode_Mask, XOS_Status_Detailed, XOS_Timestamp_PacketCounter, XOS_Timestamp_SampleUtc, XOS_VelocityMode_Mask, XOS_VelocityMode_Ms_Xyz, XS_DATA_ITEM_NOT_AVAILABLE, XS_EXTRA_TEMPERATURE_CHANNELS, and XS_MAX_TEMPERATURE_CHANNELS.

Referenced by setDataFormat(), and setXbusSystem().

◆ utcTime()

XsUtcTime LegacyDataPacket::utcTime ( int32_t  index = 0) const

Return the UTC Time component of the packet.

Parameters
indexThe index of the item of which the data should be returned. (ignored)
Returns
The UTC Time component of the packet.

Definition at line 2257 of file legacydatapacket.cpp.

References containsUtcTime(), m_fixedData, PacketFixedData::m_infoList, m_msg, PacketInfo::m_utcMonth, PacketInfo::m_utcNano, and PacketInfo::m_utcYear.

Referenced by XsDataPacket_assignFromXsLegacyDataPacket().

◆ velocity()

XsVector LegacyDataPacket::velocity ( int32_t  index = 0) const

Return the Velocity component of a data item.

Parameters
indexThe index of the item of which the data should be returned.
Returns
The Velocity component of a data item.

Definition at line 2115 of file legacydatapacket.cpp.

References CHECKIFDOUBLE, containsVelocity(), m_fixedData, PacketFixedData::m_infoList, m_msg, and PacketInfo::m_velNEDorNWU.

Referenced by XsDataPacket_assignFromXsLegacyDataPacket().

Member Data Documentation

◆ m_fixedData

PacketFixedData* LegacyDataPacket::m_fixedData
private

Fixed packet data.

Definition at line 334 of file legacydatapacket.h.

Referenced by analogIn1Data(), analogIn2Data(), calibratedAcceleration(), calibratedData(), calibratedGyroscopeData(), calibratedMagneticField(), containsAnalogIn1Data(), containsAnalogIn2Data(), containsCalibratedAcceleration(), containsCalibratedData(), containsCalibratedGyroscopeData(), containsCalibratedMagneticField(), containsDetailedStatus(), containsFreeAcceleration(), containsGpsPvtData(), containsMtwSdiData(), containsOrientation(), containsOrientationEuler(), containsOrientationMatrix(), containsOrientationQuaternion(), containsPacketCounter(), containsPositionLLA(), containsPressure(), containsRawAcceleration(), containsRawData(), containsRawGyroscopeData(), containsRawMagneticField(), containsRawTemperature(), containsStatus(), containsTemperature(), containsUtcTime(), containsVelocity(), dataFormat(), dataSize(), deviceId(), findDeviceId(), fixedData(), frameCounter(), freeAcceleration(), getFPValueSize(), gpsPvtData(), isXbusSystem(), itemCount(), LegacyDataPacket(), mtwSdiData(), operator=(), orientationEuler(), orientationMatrix(), orientationQuaternion(), originalMessage(), packetCounter(), packetInfo(), positionLLA(), pressure(), rawAcceleration(), rawData(), rawGyroscopeData(), rawMagneticField(), rawTemperature(), rawTemperatureChannelCount(), setAnalogIn1Data(), setAnalogIn2Data(), setCalibratedAcceleration(), setCalibratedData(), setCalibratedGyroscopeData(), setCalibratedMagneticField(), setDataFormat(), setDeviceId(), setFreeAcceleration(), setGpsPvtData(), setItemCount(), setMtwSdiData(), setOrientationEuler(), setOrientationMatrix(), setOrientationQuaternion(), setPacketCounter(), setPositionLLA(), setPressure(), setRawAcceleration(), setRawData(), setRawGyroscopeData(), setRawMagneticField(), setRawTemperature(), setStatus(), setTemperature(), setUtcTime(), setVelocity(), setXbusSystem(), status(), temperature(), temperatureChannelCount(), updateInfoList(), utcTime(), velocity(), and ~LegacyDataPacket().

◆ m_lastFoundId

XsDeviceId LegacyDataPacket::m_lastFoundId
mutableprivate

Last found deviceId, speeds up searches.

Definition at line 336 of file legacydatapacket.h.

Referenced by findDeviceId(), and operator=().

◆ m_lastFoundIndex

uint16_t LegacyDataPacket::m_lastFoundIndex
mutableprivate

Index of last found deviceId, speeds up searches.

Definition at line 338 of file legacydatapacket.h.

Referenced by findDeviceId(), and operator=().

◆ m_msg

XsMessage LegacyDataPacket::m_msg
private

◆ m_packetId

XsTimeStamp LegacyDataPacket::m_packetId
private

64 bit sample counter

Definition at line 346 of file legacydatapacket.h.

Referenced by largePacketCounter(), operator=(), and setLargePacketCounter().

◆ m_rtc

XsTimeStamp LegacyDataPacket::m_rtc
private

Sample time in ms, based on the sample counter.

Definition at line 342 of file legacydatapacket.h.

Referenced by operator=(), rtc(), and setRtc().

◆ m_toa

XsTimeStamp LegacyDataPacket::m_toa
private

Time of arrival.

Definition at line 344 of file legacydatapacket.h.

Referenced by operator=(), setTimeOfArrival(), and timeOfArrival().

◆ m_triggerIn1

XsTimeStamp LegacyDataPacket::m_triggerIn1
private

Trigger indication on line 1.

Todo:
remove this

Definition at line 348 of file legacydatapacket.h.

Referenced by containsTriggerIndication(), operator=(), setTriggerIndication(), and triggerIndication().

◆ m_triggerIn2

XsTimeStamp LegacyDataPacket::m_triggerIn2
private

Trigger indication on line 2.

Todo:
remove this

Definition at line 350 of file legacydatapacket.h.

Referenced by containsTriggerIndication(), operator=(), setTriggerIndication(), and triggerIndication().




Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST