mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-07-29 01:29:03 -04:00
Add ERT commodity type.
This commit is contained in:
parent
6571ef0c11
commit
b7c0efbb64
4 changed files with 56 additions and 11 deletions
|
@ -33,6 +33,11 @@ namespace ert {
|
|||
|
||||
using ID = uint32_t;
|
||||
using Consumption = uint32_t;
|
||||
using CommodityType = uint32_t;
|
||||
|
||||
constexpr ID invalid_id = 0;
|
||||
constexpr CommodityType invalid_commodity_type = -1;
|
||||
constexpr Consumption invalid_consumption = 0;
|
||||
|
||||
class Packet {
|
||||
public:
|
||||
|
@ -60,6 +65,7 @@ public:
|
|||
|
||||
Type type() const;
|
||||
ID id() const;
|
||||
CommodityType commodity_type() const;
|
||||
Consumption consumption() const;
|
||||
|
||||
ManchesterFormatted symbols_formatted() const;
|
||||
|
@ -74,9 +80,6 @@ private:
|
|||
const Reader reader_;
|
||||
const Type type_;
|
||||
|
||||
const ID invalid_id = 0;
|
||||
const Consumption invalid_consumption = 0;
|
||||
|
||||
bool crc_ok_idm() const;
|
||||
bool crc_ok_scm() const;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue