17#ifndef RCBENCH_LINK_BRINGUP_H
18#define RCBENCH_LINK_BRINGUP_H
void link_bringup_add_rtt(link_bringup_t *b, uint32_t us)
Fold one round-trip measurement in.
Definition link_bringup.c:74
link_diag_t link_bringup_diagnose(const link_bringup_t *b)
Name the most fundamental thing that is wrong.
Definition link_bringup.c:102
link_diag_t
The most fundamental fault a link shows.
Definition link_bringup.h:79
@ LINK_DIAG_INTERMITTENT
It works, and not every time.
Definition link_bringup.h:102
@ LINK_DIAG_REPLIES_LOST
Requests arrive and answers do not: the return path, not the link.
Definition link_bringup.h:88
@ LINK_DIAG_SILENT
Nothing came back at all.
Definition link_bringup.h:82
@ LINK_DIAG_PROTOCOL_MISMATCH
It answers, but it is not speaking this protocol.
Definition link_bringup.h:84
@ LINK_DIAG_CORRUPT
Frames arrive corrupt.
Definition link_bringup.h:94
@ LINK_DIAG_STALE
Answers arrive too late to be wanted.
Definition link_bringup.h:100
bool link_bringup_take_status(link_bringup_t *b, const link_msg_t *st, uint16_t *faults)
Take a STATUS reply read from register 0 into b and the fault bitmap into faults (either may be NULL)...
Definition link_bringup.c:49
uint8_t link_bringup_status_count(uint16_t minor)
How many STATUS registers to read from an IOmcu of protocol minor minor: LINK_ST_COUNT from LINK_MINO...
Definition link_bringup.c:43
const char * link_diag_hint(link_diag_t d)
One line naming what to check, in the order worth checking it.
Definition link_bringup.c:202
const char * link_diag_text(link_diag_t d)
One line naming the fault.
Definition link_bringup.c:188
void link_bringup_window(const link_bringup_t *now, const link_bringup_t *prev, link_bringup_t *out)
The counts of one report window: what happened between two snapshots, for link_bringup_diagnose() to ...
Definition link_bringup.c:164
What crosses the link, independent of the transport: an op, a page, an offset, a count and up to a pa...
The link counters of both ends, and the round-trip statistics.
Definition link_bringup.h:32
bool have_refused
The last status read carried LINK_ST_REFUSED_LO and _HI: protocol 4.21 and later.
Definition link_bringup.h:57
uint32_t dev_refused
CAN frames it refused to decode since its power-up, modulo 2^32; 0 while have_refused is false.
Definition link_bringup.h:62
uint32_t mismatches
Definition link_bringup.h:37
uint32_t dev_crc_errors
The IOmcu's CAN receive error counter (REC, 0 to 255) at the status read: it rises with bad frames an...
Definition link_bringup.h:49
uint32_t dev_resyncs
The IOmcu's CAN transmit error counter (TEC, 0 to 255), a level as dev_crc_errors.
Definition link_bringup.h:52
uint32_t dev_frames
Definition link_bringup.h:45
uint32_t rx_crc_errors
Definition link_bringup.h:39
One link message: the op, the register window and its values.
Definition link_msg.h:55