Skip to content

Commit

Permalink
Public release MSCL 58.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
mgill committed Sep 4, 2020
1 parent a84495e commit 40148c5
Show file tree
Hide file tree
Showing 49 changed files with 2,377 additions and 587 deletions.
51 changes: 51 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,57 @@ RENAMED - A function/class has been renamed.
REMOVED - A function/class has been removed.
======================================================================================================

58.0.7 - 2020-09-04
- Added reporting for DeviceStatusData::asMap() of
- gnss1PpsPulseInfo_LastTimeinMS
- gnss1PpsPulseInfo_Count

58.0.6 - 2020-08-21
- Fixed Bitfield values in GNSS Signal Configuration (0x0E,0x02) constructor

58.0.5 - 2020-08-19
- Added Bitfield class to handle reading and writing masked values within a bitfield
- Added support for reading and writing signed int8 to ByteStream, DataPoint, and Value classes
- Added GNSS and RTK command set IDs to MipPacketInfo and DescriptorSet enums
- Added support for inertial commands:
- Relative Position Configuration (0x0D,0x55)
- GNSS Antenna Cal Control (0x0D,0x64)
- GNSS Signal Configuration (0x0E,0x02)
- GNSS RTK Dongle Configuration (0x0E,0x10)
- Added MipNodeFeatures::supportedAdaptiveFilterLevels to support varied level availability across devices
- Added InertialTypes::HeadingSource::HEADINGSOURCE_GNSS_DUAL_ANTENNA

58.0.4 - 2020-08-07
- CHANGED InertialTypes::GnssFixType::FIXTYPE_FTK_FIXED to FIXTYPE_RTK_FIXED (typo)

58.0.3 - 2020-08-06
- Changed RTKDeviceStatusFlags::ResetReason enum values to their base values outside of the StatusFlags (uint32) context
- Added InertialTypes::FilterStatus_Running::FILTERSTATUS_CONDITION to mask the Condition bits in the Prospect Filter Status bitfield
- Added InertialTypes::FilterCondition enum to represent the FILTERSTATUS_CONDITION option values

58.0.2 - 2020-08-03
- Updated RTKDeviceStatusFlags to reflect bitfield definition changes
- Changed MipTyes::CHANNEL_NAMES entries for GPS and GNSS Ionospheric Corrections channel field/qualifiers to ensure they're unique

58.0.1 - 2020-08-03
- Update inertial field parsers for:
- GNSS RTK Corrections Status (0x81,0x31) - added RTK status data point, fixed valid flags
- GPS Ionospheric Correction (0x81,0x71) - fixed matrix parsing, fixed valid flags
- GNSS Ionospheric Correction (0x81,0x73) - fixed vector parsing, fixed valid flags

58.0.0 - 2020-07-30
- REMOVED support for inertial command Kinematic Constraint Control (0x0D,0x51) (no device support):
- InertialNode::get/setKinematicConstraints()
- MipNodeFeatures::supportedAccelerationConstraintOptions(), supportedVelocityConstraintOptions(), supportedAngularConstraintOptions()
- MipTypes::Command::CMD_EF_KINEMATIC_CONSTRAINT
- InertialTypes::KinematicConstraint
- struct KinematicConstraints
- type KinematicConstraintOptions
- Added support for inertial commands
- Vertical Gyro Constraint Control (0x0D,0x62)
- Wheeled Vehicle Constraint Control (0x0D,0x63)
- Added new Sample Rate type (decimation) to support inertial data sets with an unknown base rate (SampleRate::Decimation(), RateType::rateType_decimation)

57.2.2 - 2020-07-28
- Add additional options to following enums for new product support:
- InertialTypes::GnssFixType
Expand Down
2 changes: 2 additions & 0 deletions MSCL/MSCL.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,7 @@
<ClInclude Include="source\mscl\HighResClock.h" />
<ClInclude Include="source\mscl\Histogram.h" />
<ClInclude Include="source\mscl\LibVersion.h" />
<ClInclude Include="source\mscl\MicroStrain\Bitfield.h" />
<ClInclude Include="source\mscl\MicroStrain\Displacement\Commands\DeviceTime.h" />
<ClInclude Include="source\mscl\MicroStrain\Displacement\Commands\DisplacementOutputDataRate.h" />
<ClInclude Include="source\mscl\MicroStrain\Displacement\Commands\GetAnalogToDisplacementCals.h" />
Expand Down Expand Up @@ -1022,6 +1023,7 @@
<ClCompile Include="source\mscl\Communication\WsdaFinder.cpp" />
<ClCompile Include="source\mscl\HighResClock.cpp" />
<ClCompile Include="source\mscl\Histogram.cpp" />
<ClCompile Include="source\mscl\MicroStrain\Bitfield.cpp" />
<ClCompile Include="source\mscl\MicroStrain\Displacement\Commands\DeviceTime.cpp" />
<ClCompile Include="source\mscl\MicroStrain\Displacement\Commands\DisplacementOutputDataRate.cpp" />
<ClCompile Include="source\mscl\MicroStrain\Displacement\Commands\GetAnalogToDisplacementCals.cpp" />
Expand Down
6 changes: 6 additions & 0 deletions MSCL/MSCL.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,9 @@
<ClInclude Include="source\mscl\MicroStrain\RTK\Commands\DeviceStatusFlags.h">
<Filter>MicroStrain\RTK\Commands</Filter>
</ClInclude>
<ClInclude Include="source\mscl\MicroStrain\Bitfield.h">
<Filter>MicroStrain</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="source\mscl\MicroStrain\ByteStream.cpp">
Expand Down Expand Up @@ -1881,6 +1884,9 @@
<ClCompile Include="source\mscl\MicroStrain\RTK\Commands\DeviceStatusFlags.cpp">
<Filter>MicroStrain\RTK\Commands</Filter>
</ClCompile>
<ClCompile Include="source\mscl\MicroStrain\Bitfield.cpp">
<Filter>MicroStrain</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="source\mscl\Wrapper\MSCL_Exceptions.i">
Expand Down
6 changes: 3 additions & 3 deletions MSCL/source/mscl/LibVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ MIT Licensed. See the included LICENSE.txt for a copy of the full MIT License.

#ifndef SWIG
//update with each release
#define MSCL_MAJOR 57
#define MSCL_MINOR 2
#define MSCL_PATCH 2
#define MSCL_MAJOR 58
#define MSCL_MINOR 0
#define MSCL_PATCH 7
#endif

namespace mscl
Expand Down
65 changes: 65 additions & 0 deletions MSCL/source/mscl/MicroStrain/Bitfield.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/*******************************************************************************
Copyright(c) 2015-2020 Parker Hannifin Corp. All rights reserved.
MIT Licensed. See the included LICENSE.txt for a copy of the full MIT License.
*******************************************************************************/
#include "stdafx.h"

#include "Bitfield.h"

namespace mscl
{
uint64 Bitfield::get(uint64 mask, bool shiftToLsb) const
{
uint64 getVal = m_value & mask;

if (!shiftToLsb)
{
return getVal;
}

return getVal >> shiftCount(mask);
}

void Bitfield::set(uint64 mask, uint64 value, bool shiftRequired)
{
clear(mask);

// if value was 0, just need to clear
if (value == 0)
{
return;
}

// bitshift value to put it in the right spot in the bitfield
uint64 setVal = value;

if (shiftRequired)
{
setVal = setVal << shiftCount(mask);
}

// or the set value into the complete value now that it's in the correct place
m_value = m_value | setVal;
}

void Bitfield::clear(uint64 mask)
{
uint64 clearMap = 0xFFFFFFFFFFFFFFFF ^ mask;
m_value = m_value & clearMap;
}

uint8 Bitfield::shiftCount(uint64 mask)
{
// shift until all zeros removed from right-hand side of map (least significant bit is 1)
uint64 shiftMap = mask;
uint8 count = 0;
while (shiftMap % 2 != 1)
{
shiftMap = shiftMap >> 1;
count++;
}

return count;
}
}
80 changes: 80 additions & 0 deletions MSCL/source/mscl/MicroStrain/Bitfield.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/*******************************************************************************
Copyright(c) 2015-2020 Parker Hannifin Corp. All rights reserved.
MIT Licensed. See the included LICENSE.txt for a copy of the full MIT License.
*******************************************************************************/

#pragma once

#include "mscl/Types.h"

namespace mscl
{
class Bitfield
{
public:
//Constructor: Bitfield
// Constructs Bitfield object with value 0
Bitfield() {};

//Constructor: Bitfield
// Constructs Bitfield object with indicated value
//
//Parameters:
// val - uint64 bitfield value
Bitfield(uint64 val) :
m_value(val)
{};

//Destructor: ~Bitfield
// Default destructor for the Bitfield object
virtual ~Bitfield() {};

private:
//Variable: m_value
// The bitfield value
uint64 m_value;

public:
//Function: value
// Gets or sets the entire underlying bitfield value
uint64 value() const { return m_value; }
void value(uint64 val) { m_value = val; }

//Function: get
// Gets the value of only the bits masked by the indicated mask.
//
//Parameters:
// mask - uint64 indicating which bits to evaluate
// shiftToLsb - true: return the masked bits shifted all the way to the right, false: return the masked bits in their original position
//
//Returns:
// uint64 - the masked value
uint64 get(uint64 mask, bool shiftToLsb = true) const;

//Function: set
// Sets the provided value to the position indicated by the indicated mask
//
//Parameters:
// mask - uint64 indicating the position to place the value
// value - uint64 value to set
// shiftRequired - true: provided value needs to be shifted to the masked position before being set, false: provided value already in the correct position within the bitfield
void set(uint64 mask, uint64 value, bool shiftRequired = true);

protected:
//Function: clear
// Sets all bits under the indicated mask to 0.
//
//Parameters:
// mask - uint64 mask indicating the position of the bits to clear
void clear(uint64 mask);

private:
//Function shiftCount
// Calculate the number of bits to shift the mask value so that the least significant bit is 1 (mask shifted all the way to the right).
//
//Parameters:
// mask - uint64 mask to calculate shift count for
static uint8 shiftCount(uint64 mask);
};
}
6 changes: 6 additions & 0 deletions MSCL/source/mscl/MicroStrain/ByteStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ namespace mscl
m_bytes.push_back(value);
}

//add a single byte to the bytestream
void ByteStream::append_int8(int8 value)
{
m_bytes.push_back(static_cast<uint8>(value));
}

//add a WORD (2 bytes) to the bytestream
void ByteStream::append_int16(int16 value, Utils::Endianness endian /*= Utils::bigEndian*/)
{
Expand Down
8 changes: 8 additions & 0 deletions MSCL/source/mscl/MicroStrain/ByteStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ namespace mscl
// value - The 1-byte uint8 to be added to the byte stream
void append_uint8(uint8 value);

//Function: append_int8
// Appends a 1-byte signed integer to the byte stream
//
//Parameters:
// value - The 1-byte int8 to be added to the byte stream
// endian - The <Utils::Endianness> to append the bytes in.
void append_int8(int8 value);

//Function: append_int16
// Appends a 2-byte signed integer to the byte stream
//
Expand Down
1 change: 1 addition & 0 deletions MSCL/source/mscl/MicroStrain/DataPoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ namespace mscl
case valueType_uint8:
case valueType_uint16:
case valueType_uint32:
case valueType_int8:
case valueType_int16:
case valueType_int32:
case valueType_bool:
Expand Down
Loading

0 comments on commit 40148c5

Please sign in to comment.