#include <string>
#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include <platform.hpp>
#include <ptptypes.hpp>
#include <debugout.hpp>
Go to the source code of this file.
|
enum | Event {
NULL_EVENT = 0,
POWERUP = 5,
INITIALIZE,
STATE_CHANGE_EVENT,
SYNC_INTERVAL_TIMEOUT_EXPIRES,
PDELAY_INTERVAL_TIMEOUT_EXPIRES,
SYNC_RECEIPT_TIMEOUT_EXPIRES,
QUALIFICATION_TIMEOUT_EXPIRES,
ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES,
ANNOUNCE_INTERVAL_TIMEOUT_EXPIRES,
FAULT_DETECTED,
PDELAY_DEFERRED_PROCESSING,
PDELAY_RESP_RECEIPT_TIMEOUT_EXPIRES
} |
|
#define HWTIMESTAMPER_EXTENDED_MESSAGE_SIZE 4096 |
#define INVALID_TIMESTAMP (Timestamp( 0xC0000000, 0, 0 )) |
Defines an invalid timestamp using a Timestamp instance and a fixed value
#define INVALID_TIMESTAMP_VERSION 0xFF |
Value defining invalid timestamp version
#define LS_SEC_MAX 0xFFFFFFFFull |
Maximum value of seconds LSB field
#define MAX_NANOSECONDS 1000000000 |
Maximum value of nanoseconds (1 second)
#define MAX_TIMESTAMP_STRLEN 28 |
Maximum size of timestamp strlen
#define NS_PER_SECOND 1000000000 |
Amount of nanoseconds in a second
#define PDELAY_PENDING_TIMESTAMP (Timestamp( 0xC0000001, 0, 0 )) |
PDelay is pending timestamp
#define PTP_CLOCK_IDENTITY_LENGTH 8 |
Size of a clock identifier stored in the ClockIndentity class, described at IEEE 802.1AS Clause 8.5.2.4
#define TIMESTAMP_TO_NS |
( |
|
ts | ) |
|
Value:(((static_cast<long long int>((ts).seconds_ms) \
<< sizeof((ts).seconds_ls)*8) + \
(ts).seconds_ls)*1000000000LL + (ts).nanoseconds)
Converts timestamp value into nanoseconds value
IEEE 1588 event enumeration type Defined at: IEEE 1588-2008 Clause 9.2.6
Enumerator |
---|
NULL_EVENT |
Null Event. Used to initialize events.
|
POWERUP |
Power Up. Initialize state machines.
|
INITIALIZE |
Same as POWERUP.
|
STATE_CHANGE_EVENT |
Signalizes that something has changed. Recalculates best master.
|
SYNC_INTERVAL_TIMEOUT_EXPIRES |
Sync interval expired. Its time to send a sync message.
|
PDELAY_INTERVAL_TIMEOUT_EXPIRES |
PDELAY interval expired. Its time to send pdelay_req message.
|
SYNC_RECEIPT_TIMEOUT_EXPIRES |
Sync receipt timeout. Restart timers and take actions based on port's state.
|
QUALIFICATION_TIMEOUT_EXPIRES |
Qualification timeout. Event not currently used.
|
ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES |
Announce receipt timeout. Same as SYNC_RECEIPT_TIMEOUT_EXPIRES.
|
ANNOUNCE_INTERVAL_TIMEOUT_EXPIRES |
Announce interval timout. Its time to send an announce message if asCapable is true.
|
FAULT_DETECTED |
A fault was detected.
|
PDELAY_DEFERRED_PROCESSING |
Defers pdelay processing.
|
PDELAY_RESP_RECEIPT_TIMEOUT_EXPIRES |
Pdelay response message timeout.
|
Builds a PTP message.
- Parameters
-
buf | [in] message buffer to send |
size | message length |
remote | Destination link layer address |
port | [in] IEEE1588 port |
- Returns
- PTP message instance of PTPMessageCommon