Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions monitoring/mock_uss/scd_injection/routes_injection.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,16 @@ def unsuccessful(
except PlanningError as e:
return unsuccessful(PlanningActivityResult.Rejected, str(e))

if not locality.uses_cmsa():
if new_flight.op_intent.reference.state in [
scd_api.OperationalIntentState.Nonconforming,
scd_api.OperationalIntentState.Contingent,
]:
return unsuccessful(
PlanningActivityResult.NotSupported,
f"The current locality {locality} does not support CMSA, flight cannot transition to {new_flight.op_intent.reference.state}",
)

step_name = "performing unknown operation"
notes: str | None = None
try:
Expand Down
11 changes: 11 additions & 0 deletions monitoring/monitorlib/locality.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ def highest_priority(self) -> int:
"""Returns the highest priority level for ASTM F3548-21 defined by the regulator of this locality"""
raise NotImplementedError(Locality._NOT_IMPLEMENTED_MSG)

@abstractmethod
def uses_cmsa(self) -> bool:
"""Return true if the ecosystem supports CMSA operations"""
raise NotImplementedError(Locality._NOT_IMPLEMENTED_MSG)

def __str__(self):
return self.__class__.__name__

Expand Down Expand Up @@ -69,6 +74,9 @@ def lowest_bound_priority(self) -> int:
def highest_priority(self) -> int:
return 100

def uses_cmsa(self) -> bool:
return True


class UnitedStatesIndustryCollaboration(Locality):
@classmethod
Expand All @@ -86,3 +94,6 @@ def lowest_bound_priority(self) -> int:

def highest_priority(self) -> int:
return 100

def uses_cmsa(self) -> bool:
return False
Loading