#include "bmca.h"
#include "clock_utils.h"
#include "event.h"
#include "format_utils.h"
#include "ptp_core.h"
#include "ptp_defs.h"
#include "ptp_types.h"
#include "task_ptp.h"
#include <flexptp_options.h>
#include <stdint.h>
#include <string.h>
Go to the source code of this file.
◆ COMPARE_AND_RETURN
#define COMPARE_AND_RETURN |
( |
|
pmp1, |
|
|
|
pmp2, |
|
|
|
field |
|
) |
| |
Value: { \
if (pmp1->field < pmp2->field) { \
return 0; \
} else if (pmp1->field > pmp2->field) { \
return 1; \
} \
}
Definition at line 22 of file bmca.c.
◆ SBMC_PRINT_LOG
#define SBMC_PRINT_LOG |
( |
|
p, |
|
|
|
c |
|
) |
| |
Value: if (S.logging.bmca) \
static char * BMCA_HINTS[]
Definition at line 52 of file bmca.c.
◆ ptp_bmca_destroy()
void ptp_bmca_destroy |
( |
| ) |
|
Destroy SBMC module.
Definition at line 205 of file bmca.c.
◆ ptp_bmca_handle_state_change()
◆ ptp_bmca_init()
Initialize SBMC module.
Definition at line 191 of file bmca.c.
◆ ptp_bmca_reset()
Reset the SBMC module.
Definition at line 209 of file bmca.c.
◆ ptp_bmca_tick()
Call this to notify SBMC about the time passing.
Definition at line 72 of file bmca.c.
◆ ptp_handle_announce_msg()
Handle announce messages.
- Parameters
-
pAnn | pointer to PtpAnnounceBody object |
pHeader | pointer to Announce message header |
Definition at line 135 of file bmca.c.
◆ ptp_select_better_master()
Select better master. (Not "best", with intent!)
- Parameters
-
pMP1 | pointer to the first master's PtpMasterProperites object |
pMP2 | pointer to the second master's PtpMasterProperites object |
- Returns
- 0: if pMP1 is better than pMP2, 1: if reversed
Definition at line 31 of file bmca.c.
◆ BMCA_HINTS
Initial value:= {
"INITIALIZING",
"LISTENING",
"PRE_MASTER",
"MASTER",
"SLAVE",
"PASSIVE",
"UNCALIBRATED",
"FAULTY",
"DISABLED"}
Definition at line 41 of file bmca.c.