mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-09 15:12:35 -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
|
@ -30,43 +30,43 @@
|
|||
namespace baseband {
|
||||
|
||||
class Packet {
|
||||
public:
|
||||
void set_timestamp(const Timestamp& value) {
|
||||
timestamp_ = value;
|
||||
}
|
||||
|
||||
Timestamp timestamp() const {
|
||||
return timestamp_;
|
||||
}
|
||||
public:
|
||||
void set_timestamp(const Timestamp& value) {
|
||||
timestamp_ = value;
|
||||
}
|
||||
|
||||
void add(const bool symbol) {
|
||||
if( count < capacity() ) {
|
||||
data[count++] = symbol;
|
||||
}
|
||||
}
|
||||
Timestamp timestamp() const {
|
||||
return timestamp_;
|
||||
}
|
||||
|
||||
uint_fast8_t operator[](const size_t index) const {
|
||||
return (index < size()) ? data[index] : 0;
|
||||
}
|
||||
void add(const bool symbol) {
|
||||
if (count < capacity()) {
|
||||
data[count++] = symbol;
|
||||
}
|
||||
}
|
||||
|
||||
size_t size() const {
|
||||
return count;
|
||||
}
|
||||
uint_fast8_t operator[](const size_t index) const {
|
||||
return (index < size()) ? data[index] : 0;
|
||||
}
|
||||
|
||||
size_t capacity() const {
|
||||
return data.size();
|
||||
}
|
||||
size_t size() const {
|
||||
return count;
|
||||
}
|
||||
|
||||
void clear() {
|
||||
count = 0;
|
||||
}
|
||||
size_t capacity() const {
|
||||
return data.size();
|
||||
}
|
||||
|
||||
private:
|
||||
std::bitset<2560> data { };
|
||||
Timestamp timestamp_ { };
|
||||
size_t count { 0 };
|
||||
void clear() {
|
||||
count = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
std::bitset<2560> data{};
|
||||
Timestamp timestamp_{};
|
||||
size_t count{0};
|
||||
};
|
||||
|
||||
} /* namespace baseband */
|
||||
|
||||
#endif/*__BASEBAND_PACKET_H__*/
|
||||
#endif /*__BASEBAND_PACKET_H__*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue