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:
jLynx 2023-05-19 08:16:05 +12:00 committed by GitHub
parent 7aca7ce74d
commit 033c4e9a5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
599 changed files with 70746 additions and 66896 deletions

View file

@ -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__*/