pub struct Signature {
pub link_id: SignedLinkId,
pub timestamp: MavTimestamp,
pub value: SignatureValue,
}
Expand description
Fields§
§link_id: SignedLinkId
ID
of link on which packet is sent.
timestamp: MavTimestamp
Timestamp in 10 microsecond units since the beginning of MAVLink epoch (1st January 2015 GMT).
value: SignatureValue
Value of a signature.
Implementations§
source§impl Signature
impl Signature
sourcepub fn link_id(&self) -> SignedLinkId
pub fn link_id(&self) -> SignedLinkId
Signature link_id
is an 8-bit identifier of a MAVLink channel.
Peers may have different semantics or rules for different links. For example, some links may have higher priority over another during routing. Or even different secret keys for authorization.
sourcepub fn timestamp(&self) -> MavTimestamp
pub fn timestamp(&self) -> MavTimestamp
Signature MavTimestamp
is a 48-bit value that specifies the moment when message was sent.
The unit of measurement is the number of millisecond * 10 since MAVLink epoch (1st January 2015 GMT).
According to MAVLink protocol, the sender must guarantee that the next timestamp is greater than the previous one.
§Links
MavTimestamp
struct.- Timestamp handling in MAVLink documentation.
sourcepub fn value(&self) -> SignatureValue
pub fn value(&self) -> SignatureValue
Signature value
is cryptographic 48-bit hash that depends on the entire frame content.
§Links
- Signature specification in MAVLink docs.
sourcepub fn from_byte_array(bytes: SignatureBytes) -> Self
pub fn from_byte_array(bytes: SignatureBytes) -> Self
Decodes an array of bytes into Signature
.
sourcepub fn to_byte_array(&self) -> SignatureBytes
pub fn to_byte_array(&self) -> SignatureBytes
Encodes Signature
into SignatureBytes
byte array.
Used in From<MavLinkV2Signature>
trait implementation for SignatureBytes
.