mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-10 23:50:21 -04:00
Formatted code (#1007)
* Updated style * Updated files * fixed new line * Updated spacing * File fix WIP * Updated to clang 13 * updated comment style * Removed old comment code
This commit is contained in:
parent
7aca7ce74d
commit
033c4e9a5b
599 changed files with 70746 additions and 66896 deletions
|
@ -40,51 +40,50 @@ constexpr CommodityType invalid_commodity_type = -1;
|
|||
constexpr Consumption invalid_consumption = 0;
|
||||
|
||||
class Packet {
|
||||
public:
|
||||
enum class Type : uint32_t {
|
||||
Unknown = 0,
|
||||
IDM = 1,
|
||||
SCM = 2,
|
||||
SCMPLUS = 3,
|
||||
};
|
||||
public:
|
||||
enum class Type : uint32_t {
|
||||
Unknown = 0,
|
||||
IDM = 1,
|
||||
SCM = 2,
|
||||
SCMPLUS = 3,
|
||||
};
|
||||
|
||||
Packet(
|
||||
const Type type,
|
||||
const baseband::Packet& packet
|
||||
) : packet_ { packet },
|
||||
decoder_ { packet_ },
|
||||
reader_ { decoder_ },
|
||||
type_ { type }
|
||||
{
|
||||
}
|
||||
Packet(
|
||||
const Type type,
|
||||
const baseband::Packet& packet)
|
||||
: packet_{packet},
|
||||
decoder_{packet_},
|
||||
reader_{decoder_},
|
||||
type_{type} {
|
||||
}
|
||||
|
||||
size_t length() const;
|
||||
|
||||
bool is_valid() const;
|
||||
size_t length() const;
|
||||
|
||||
Timestamp received_at() const;
|
||||
bool is_valid() const;
|
||||
|
||||
Type type() const;
|
||||
ID id() const;
|
||||
CommodityType commodity_type() const;
|
||||
Consumption consumption() const;
|
||||
Timestamp received_at() const;
|
||||
|
||||
FormattedSymbols symbols_formatted() const;
|
||||
Type type() const;
|
||||
ID id() const;
|
||||
CommodityType commodity_type() const;
|
||||
Consumption consumption() const;
|
||||
|
||||
bool crc_ok() const;
|
||||
FormattedSymbols symbols_formatted() const;
|
||||
|
||||
private:
|
||||
using Reader = FieldReader<ManchesterDecoder, BitRemapNone>;
|
||||
bool crc_ok() const;
|
||||
|
||||
const baseband::Packet packet_;
|
||||
const ManchesterDecoder decoder_;
|
||||
const Reader reader_;
|
||||
const Type type_;
|
||||
private:
|
||||
using Reader = FieldReader<ManchesterDecoder, BitRemapNone>;
|
||||
|
||||
bool crc_ok_ccitt() const;
|
||||
bool crc_ok_scm() const;
|
||||
const baseband::Packet packet_;
|
||||
const ManchesterDecoder decoder_;
|
||||
const Reader reader_;
|
||||
const Type type_;
|
||||
|
||||
bool crc_ok_ccitt() const;
|
||||
bool crc_ok_scm() const;
|
||||
};
|
||||
|
||||
} /* namespace ert */
|
||||
|
||||
#endif/*__ERT_PACKET_H__*/
|
||||
#endif /*__ERT_PACKET_H__*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue