Cell trend data packet

This commit is contained in:
Dan Paulat 2022-01-11 23:07:44 -06:00
parent 9073ec706b
commit 67a8184ea7
4 changed files with 277 additions and 0 deletions

View file

@ -0,0 +1,52 @@
#pragma once
#include <scwx/wsr88d/rpg/packet.hpp>
#include <cstdint>
#include <memory>
namespace scwx
{
namespace wsr88d
{
namespace rpg
{
class CellTrendDataPacketImpl;
class CellTrendDataPacket : public Packet
{
public:
explicit CellTrendDataPacket();
~CellTrendDataPacket();
CellTrendDataPacket(const CellTrendDataPacket&) = delete;
CellTrendDataPacket& operator=(const CellTrendDataPacket&) = delete;
CellTrendDataPacket(CellTrendDataPacket&&) noexcept;
CellTrendDataPacket& operator=(CellTrendDataPacket&&) noexcept;
uint16_t packet_code() const;
uint16_t length_of_block() const;
std::string cell_id() const;
int16_t i_position() const;
int16_t j_position() const;
uint16_t number_of_trends() const;
uint16_t trend_code(uint16_t t) const;
uint8_t number_of_volumes(uint16_t t) const;
uint8_t latest_volume_pointer(uint16_t t) const;
uint16_t trend_data(uint16_t t, uint8_t v) const;
size_t data_size() const override;
bool Parse(std::istream& is) override;
static std::shared_ptr<CellTrendDataPacket> Create(std::istream& is);
private:
std::unique_ptr<CellTrendDataPacketImpl> p;
};
} // namespace rpg
} // namespace wsr88d
} // namespace scwx