mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 21:10:04 +00:00
Deconflicting internal level 3 struct names
This commit is contained in:
parent
0487a40f67
commit
62429bdea7
3 changed files with 52 additions and 52 deletions
|
|
@ -15,18 +15,18 @@ namespace rpg
|
||||||
static const std::string logPrefix_ =
|
static const std::string logPrefix_ =
|
||||||
"[scwx::wsr88d::rpg::digital_precipitation_data_array_packet] ";
|
"[scwx::wsr88d::rpg::digital_precipitation_data_array_packet] ";
|
||||||
|
|
||||||
struct Row
|
|
||||||
{
|
|
||||||
uint16_t numberOfBytes_;
|
|
||||||
std::vector<uint8_t> run_;
|
|
||||||
std::vector<uint8_t> level_;
|
|
||||||
|
|
||||||
Row() : numberOfBytes_ {0}, run_ {}, level_ {} {}
|
|
||||||
};
|
|
||||||
|
|
||||||
class DigitalPrecipitationDataArrayPacketImpl
|
class DigitalPrecipitationDataArrayPacketImpl
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
struct Row
|
||||||
|
{
|
||||||
|
uint16_t numberOfBytes_;
|
||||||
|
std::vector<uint8_t> run_;
|
||||||
|
std::vector<uint8_t> level_;
|
||||||
|
|
||||||
|
Row() : numberOfBytes_ {0}, run_ {}, level_ {} {}
|
||||||
|
};
|
||||||
|
|
||||||
explicit DigitalPrecipitationDataArrayPacketImpl() :
|
explicit DigitalPrecipitationDataArrayPacketImpl() :
|
||||||
packetCode_ {0},
|
packetCode_ {0},
|
||||||
numberOfLfmBoxesInRow_ {0},
|
numberOfLfmBoxesInRow_ {0},
|
||||||
|
|
@ -122,7 +122,7 @@ bool DigitalPrecipitationDataArrayPacket::Parse(std::istream& is)
|
||||||
{
|
{
|
||||||
size_t rowBytesRead = 0;
|
size_t rowBytesRead = 0;
|
||||||
|
|
||||||
Row& row = p->row_[r];
|
auto& row = p->row_[r];
|
||||||
|
|
||||||
is.read(reinterpret_cast<char*>(&row.numberOfBytes_), 2);
|
is.read(reinterpret_cast<char*>(&row.numberOfBytes_), 2);
|
||||||
bytesRead += 2;
|
bytesRead += 2;
|
||||||
|
|
|
||||||
|
|
@ -15,30 +15,30 @@ namespace rpg
|
||||||
static const std::string logPrefix_ =
|
static const std::string logPrefix_ =
|
||||||
"[scwx::wsr88d::rpg::radial_data_packet] ";
|
"[scwx::wsr88d::rpg::radial_data_packet] ";
|
||||||
|
|
||||||
struct Radial
|
|
||||||
{
|
|
||||||
uint16_t numberOfRleHalfwords_;
|
|
||||||
uint16_t startAngle_;
|
|
||||||
uint16_t angleDelta_;
|
|
||||||
std::vector<uint8_t> data_;
|
|
||||||
|
|
||||||
Radial() :
|
|
||||||
numberOfRleHalfwords_ {0}, startAngle_ {0}, angleDelta_ {0}, data_ {}
|
|
||||||
{
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
class RadialDataPacketImpl
|
class RadialDataPacketImpl
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
struct Radial
|
||||||
|
{
|
||||||
|
uint16_t numberOfRleHalfwords_;
|
||||||
|
uint16_t startAngle_;
|
||||||
|
uint16_t angleDelta_;
|
||||||
|
std::vector<uint8_t> data_;
|
||||||
|
|
||||||
|
Radial() :
|
||||||
|
numberOfRleHalfwords_ {0}, startAngle_ {0}, angleDelta_ {0}, data_ {}
|
||||||
|
{
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
explicit RadialDataPacketImpl() :
|
explicit RadialDataPacketImpl() :
|
||||||
packetCode_ {},
|
packetCode_ {0},
|
||||||
indexOfFirstRangeBin_ {},
|
indexOfFirstRangeBin_ {0},
|
||||||
numberOfRangeBins_ {},
|
numberOfRangeBins_ {0},
|
||||||
iCenterOfSweep_ {},
|
iCenterOfSweep_ {0},
|
||||||
jCenterOfSweep_ {},
|
jCenterOfSweep_ {0},
|
||||||
scaleFactor_ {},
|
scaleFactor_ {0},
|
||||||
dataSize_ {} {};
|
dataSize_ {0} {};
|
||||||
~RadialDataPacketImpl() = default;
|
~RadialDataPacketImpl() = default;
|
||||||
|
|
||||||
uint16_t packetCode_;
|
uint16_t packetCode_;
|
||||||
|
|
@ -162,7 +162,7 @@ bool RadialDataPacket::Parse(std::istream& is)
|
||||||
|
|
||||||
for (uint16_t r = 0; r < p->numberOfRadials_; r++)
|
for (uint16_t r = 0; r < p->numberOfRadials_; r++)
|
||||||
{
|
{
|
||||||
Radial& radial = p->radial_[r];
|
auto& radial = p->radial_[r];
|
||||||
|
|
||||||
is.read(reinterpret_cast<char*>(&radial.numberOfRleHalfwords_), 2);
|
is.read(reinterpret_cast<char*>(&radial.numberOfRleHalfwords_), 2);
|
||||||
is.read(reinterpret_cast<char*>(&radial.startAngle_), 2);
|
is.read(reinterpret_cast<char*>(&radial.startAngle_), 2);
|
||||||
|
|
|
||||||
|
|
@ -15,30 +15,30 @@ namespace rpg
|
||||||
static const std::string logPrefix_ =
|
static const std::string logPrefix_ =
|
||||||
"[scwx::wsr88d::rpg::raster_data_packet] ";
|
"[scwx::wsr88d::rpg::raster_data_packet] ";
|
||||||
|
|
||||||
struct Row
|
|
||||||
{
|
|
||||||
uint16_t numberOfBytes_;
|
|
||||||
std::vector<uint8_t> data_;
|
|
||||||
|
|
||||||
Row() : numberOfBytes_ {0}, data_ {} {}
|
|
||||||
};
|
|
||||||
|
|
||||||
class RasterDataPacketImpl
|
class RasterDataPacketImpl
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
struct Row
|
||||||
|
{
|
||||||
|
uint16_t numberOfBytes_;
|
||||||
|
std::vector<uint8_t> data_;
|
||||||
|
|
||||||
|
Row() : numberOfBytes_ {0}, data_ {} {}
|
||||||
|
};
|
||||||
|
|
||||||
explicit RasterDataPacketImpl() :
|
explicit RasterDataPacketImpl() :
|
||||||
packetCode_ {},
|
packetCode_ {0},
|
||||||
opFlag_ {},
|
opFlag_ {0},
|
||||||
iCoordinateStart_ {},
|
iCoordinateStart_ {0},
|
||||||
jCoordinateStart_ {},
|
jCoordinateStart_ {0},
|
||||||
xScaleInt_ {},
|
xScaleInt_ {0},
|
||||||
xScaleFractional_ {},
|
xScaleFractional_ {0},
|
||||||
yScaleInt_ {},
|
yScaleInt_ {0},
|
||||||
yScaleFractional_ {},
|
yScaleFractional_ {0},
|
||||||
numberOfRows_ {},
|
numberOfRows_ {0},
|
||||||
packagingDescriptor_ {},
|
packagingDescriptor_ {0},
|
||||||
row_ {},
|
row_ {},
|
||||||
dataSize_ {} {};
|
dataSize_ {0} {};
|
||||||
~RasterDataPacketImpl() = default;
|
~RasterDataPacketImpl() = default;
|
||||||
|
|
||||||
uint16_t packetCode_;
|
uint16_t packetCode_;
|
||||||
|
|
@ -52,7 +52,7 @@ public:
|
||||||
uint16_t numberOfRows_;
|
uint16_t numberOfRows_;
|
||||||
uint16_t packagingDescriptor_;
|
uint16_t packagingDescriptor_;
|
||||||
|
|
||||||
// Repeat for each radial
|
// Repeat for each row
|
||||||
std::vector<Row> row_;
|
std::vector<Row> row_;
|
||||||
|
|
||||||
size_t dataSize_;
|
size_t dataSize_;
|
||||||
|
|
@ -181,7 +181,7 @@ bool RasterDataPacket::Parse(std::istream& is)
|
||||||
{
|
{
|
||||||
size_t rowBytesRead = 0;
|
size_t rowBytesRead = 0;
|
||||||
|
|
||||||
Row& row = p->row_[r];
|
auto& row = p->row_[r];
|
||||||
|
|
||||||
is.read(reinterpret_cast<char*>(&row.numberOfBytes_), 2);
|
is.read(reinterpret_cast<char*>(&row.numberOfBytes_), 2);
|
||||||
bytesRead += 2;
|
bytesRead += 2;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue