TLE92466ED Driver 0.1.0
API reference
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Friends | List of all members
tle92466ed::Faults Struct Reference

The diagnosis registers as read: GLOBAL_DIAG0..2, DIAG_ERR_CHGR0..2 and DIAG_WARN_CHGR0..2. Raw words, so a latch is a plain OR; Has() and Of() decode them. More...

#include <tle92466ed_types.hpp>

Public Member Functions

constexpr bool Has (GlobalFault fault) const noexcept
 Whether a global fault is set.
 
constexpr ChannelFaults Of (Channel channel) const noexcept
 The faults of one channel.
 
constexpr bool Any () const noexcept
 

Public Attributes

std::array< uint16_t, 3 > global {}
 GLOBAL_DIAG0, 1, 2.
 
std::array< uint16_t, 3 > errors {}
 DIAG_ERR_CHGR0, 1, 2.
 
std::array< uint16_t, 3 > warnings {}
 DIAG_WARN_CHGR0, 1, 2.
 

Friends

constexpr bool operator== (const Faults &lhs, const Faults &rhs) noexcept=default
 Word-by-word equality (KB-CPP20-033: integral members only).
 

Detailed Description

The diagnosis registers as read: GLOBAL_DIAG0..2, DIAG_ERR_CHGR0..2 and DIAG_WARN_CHGR0..2. Raw words, so a latch is a plain OR; Has() and Of() decode them.

Member Function Documentation

◆ Any()

constexpr bool tle92466ed::Faults::Any ( ) const
inlineconstexprnoexcept
Returns
true when any fault or warning is set. POR_EVENT and RES_EVENT (events, not faults) and OLSG_WARN_CHK_NOK (a check that could not run) do not count.

◆ Has()

constexpr bool tle92466ed::Faults::Has ( GlobalFault  fault) const
inlineconstexprnoexcept

Whether a global fault is set.

Parameters
faultThe fault.
Returns
The bit.

◆ Of()

constexpr ChannelFaults tle92466ed::Faults::Of ( Channel  channel) const
inlineconstexprnoexcept

The faults of one channel.

Parameters
channelThe channel.
Returns
The decoded flags.

The documentation for this struct was generated from the following file: