Skip to content
Snippets Groups Projects
Commit 1f796bcc authored by Mario Impesi's avatar Mario Impesi
Browse files

Comment

parent b7c945a4
No related branches found
No related tags found
No related merge requests found
...@@ -146,7 +146,6 @@ def broadcast_endorsement_structure(evidence, drone_hi: HostIdentity, sam_type: ...@@ -146,7 +146,6 @@ def broadcast_endorsement_structure(evidence, drone_hi: HostIdentity, sam_type:
# Basic ID (ASTM Message 0x0) Type 1 (A) # Basic ID (ASTM Message 0x0) Type 1 (A)
# Updated to draft-ietf-drip-auth-37 # Updated to draft-ietf-drip-auth-37
def broadcast_basic_id_1(drone_hi) -> bytes: def broadcast_basic_id_1(drone_hi) -> bytes:
""" """
Broadcast Basic ID (ASTM Message 0x0) Type 1 (A). Broadcast Basic ID (ASTM Message 0x0) Type 1 (A).
...@@ -167,7 +166,6 @@ def broadcast_basic_id_1(drone_hi) -> bytes: ...@@ -167,7 +166,6 @@ def broadcast_basic_id_1(drone_hi) -> bytes:
# Basic ID (ASTM Message 0x0) Type 4 (D) # Basic ID (ASTM Message 0x0) Type 4 (D)
# Copied from 2022 implementation of beacon.py, unclear where the message structure comes from (it's just the hhit). The ASTM standard does not include a type 4 Basic ID message. # Copied from 2022 implementation of beacon.py, unclear where the message structure comes from (it's just the hhit). The ASTM standard does not include a type 4 Basic ID message.
def broadcast_basic_id_4(drone_hi) -> bytes: def broadcast_basic_id_4(drone_hi) -> bytes:
""" """
Broadcast Basic ID (ASTM Message 0x0) Type 4 (D). Broadcast Basic ID (ASTM Message 0x0) Type 4 (D).
...@@ -183,8 +181,10 @@ def broadcast_basic_id_4(drone_hi) -> bytes: ...@@ -183,8 +181,10 @@ def broadcast_basic_id_4(drone_hi) -> bytes:
return message return message
# Location (ASTM Message 0x1) # Location (ASTM Message 0x1)
def broadcast_location(gpsd: GpsPoller) -> bytes: def broadcast_location(gpsd: GpsPoller) -> bytes:
"""
Broadcast Location (ASTM Message 0x1).
"""
print(f"broadcasting location") print(f"broadcasting location")
# If gpsd is active, check that it has received values # If gpsd is active, check that it has received values
if gpsd and gpsd.get_current_value() == None: if gpsd and gpsd.get_current_value() == None:
...@@ -213,8 +213,13 @@ def broadcast_location(gpsd: GpsPoller) -> bytes: ...@@ -213,8 +213,13 @@ def broadcast_location(gpsd: GpsPoller) -> bytes:
broadcast_message(message, message_type.LOCATION, 0) broadcast_message(message, message_type.LOCATION, 0)
return message return message
# DRIP Manifest Authentication Message # Self ID (ASTM Message 0x3)
def broadcast_self_id():
"""
Broadcast Self ID (ASTM Message 0x3).
"""
# DRIP Manifest Authentication Message
def broadcast_manifest(messages, previous_manifest_hash, drone_hi) -> bytes: def broadcast_manifest(messages, previous_manifest_hash, drone_hi) -> bytes:
""" """
Broadcast DRIP Manifest including the messages given as argument. Broadcast DRIP Manifest including the messages given as argument.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment