Enum statime::port::PortAction
source · pub enum PortAction<'a> {
SendEvent {
context: TimestampContext,
data: &'a [u8],
link_local: bool,
},
SendGeneral {
data: &'a [u8],
link_local: bool,
},
ResetAnnounceTimer {
duration: Duration,
},
ResetSyncTimer {
duration: Duration,
},
ResetDelayRequestTimer {
duration: Duration,
},
ResetAnnounceReceiptTimer {
duration: Duration,
},
ResetFilterUpdateTimer {
duration: Duration,
},
ForwardTLV {
tlv: ForwardedTLV<'a>,
},
}
Expand description
An action the Port
needs the user to perform
Variants§
SendEvent
Send a time-critical packet
Once the packet is sent and the transmit timestamp known the user should
return the given TimestampContext
using
Port::handle_send_timestamp
.
Packets marked as link local should be sent per the instructions for sending peer to peer delay mechanism messages of the relevant transport specification of PTP.
SendGeneral
Send a general packet
For a packet sent this way no timestamp needs to be captured.
Packets marked as link local should be sent per the instructions for sending peer to peer delay mechanism messages of the relevant transport specification of PTP.
ResetAnnounceTimer
Call Port::handle_announce_timer
in duration
from now
ResetSyncTimer
Call Port::handle_sync_timer
in
duration
from now
ResetDelayRequestTimer
Call Port::handle_delay_request_timer
in duration
from now
ResetAnnounceReceiptTimer
Call Port::handle_announce_receipt_timer
in duration
from now
ResetFilterUpdateTimer
Call Port::handle_filter_update_timer
in duration
from now
ForwardTLV
Forward this TLV to the announce timer call of all other ports. The receiver must ensure the TLV is yielded only once to the announce method of a port.
This can be ignored when implementing a single port or slave only ptp instance.
Fields
tlv: ForwardedTLV<'a>