85 explicit Data(
const uint32_t data);
95 bool operator==(
const Data& other);
105 bool operator!=(
const Data& other);
109 using TimePoint = std::chrono::system_clock::time_point;
211 void setData(
const uint32_t data);
237 void getMessages(std::vector<std::string>& infos, std::vector<std::string>& warnings,
238 std::vector<std::string>& errors, std::vector<std::string>& fatals)
const;
255 std::vector<std::string>& warnings, std::vector<std::string>& errors,
256 std::vector<std::string>& fatals)
const;
uint32_t errorSensingRangeExceeded_
bool hasErrorAccSaturated() const
Checks if the statusword has error ACC saturated.
std::recursive_mutex mutex_
Mutex enabling synchronization.
void getMessages(std::vector< std::string > &infos, std::vector< std::string > &warnings, std::vector< std::string > &errors, std::vector< std::string > &fatals) const
Gets all the messages relevant to statuswords.
double getAge() const
Gets the age variable.
std::ostream & operator<<(std::ostream &os, const Statusword &statusword)
Outputs the statusword data to an output stream.
bool hasErrorSensingRangeExceeded() const
Checks if the statusword has error sensing range exceeded.
void setData(const uint32_t data)
Sets the data variable.
std::chrono::system_clock::time_point TimePoint
Class representing the different states the communication or the sensors can be in.
bool isEmpty() const
Checks whether the statusword is empty.
uint32_t errorAdcOutOfSync_
uint32_t errorAdcSaturated_
Bits representing errors.
uint32_t getData() const
Gets the data variable.
void getMessagesDiff(Statusword &previousStatusword, std::vector< std::string > &infos, std::vector< std::string > &warnings, std::vector< std::string > &errors, std::vector< std::string > &fatals) const
Gets the different messages form the previous statusword.
Data data_
The data variable.
Statusword & operator=(const Statusword &statusword)
Assignment operator.
bool hasErrorGyroSaturated() const
Checks if the statusword has error gyro saturated.
bool hasErrorAdcOutOfSync() const
Checks if the statusword has error ADC out-of-sync.
TimePoint stamp_
Timestamp associated with the Data.
bool hasFatalSupplyVoltage() const
Checks if the statusword has fatal supply voltage.
TimePoint getStamp() const
Gets the stamp variable.
Data associated with a Status Word.
std::chrono::duration< double > Duration
uint32_t errorGyroSaturated_
virtual ~Statusword()=default
uint32_t errorAccSaturated_
bool hasWarningOvertemperature() const
Checks if the statusword has warning over temperature.
bool hasErrorAdcSaturated() const
Checks if the statusword has error ADC saturated.
uint32_t warningOvertemperature_
uint32_t fatalSupplyVoltage_
Statusword()=default
Default constructor.
DataBits bits_
The bits of the data.