Skip to content

Commit

Permalink
[uss_qualifier/scenarios/utm] Add requirement SCD0100 check; Fix some…
Browse files Browse the repository at this point in the history
… validation issues
  • Loading branch information
mickmis committed Dec 22, 2023
1 parent 51ef122 commit 9a19121
Show file tree
Hide file tree
Showing 7 changed files with 204 additions and 136 deletions.
27 changes: 26 additions & 1 deletion monitoring/uss_qualifier/resources/astm/f3548/v21/dss.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from monitoring.monitorlib import infrastructure, fetch
from monitoring.monitorlib.fetch import QueryType
from monitoring.monitorlib.scd import SCOPE_SC, SCOPE_AA
from monitoring.monitorlib.scd import SCOPE_SC, SCOPE_AA, SCOPE_CM_SA
from monitoring.uss_qualifier.resources.resource import Resource
from monitoring.uss_qualifier.resources.communications import AuthAdapterResource
from uas_standards.astm.f3548.v21.api import (
Expand All @@ -30,6 +30,8 @@
GetOperationalIntentReferenceResponse,
OPERATIONS,
OperationID,
GetOperationalIntentTelemetryResponse,
VehicleTelemetry,
)

# A base URL for a USS that is not expected to be ever called
Expand Down Expand Up @@ -164,6 +166,29 @@ def get_full_op_intent_without_validation(

return result, query

def get_op_intent_telemetry(
self,
op_intent_ref: OperationalIntentReference,
uss_participant_id: Optional[str] = None,
) -> Tuple[Optional[VehicleTelemetry], fetch.Query]:
op = OPERATIONS[OperationID.GetOperationalIntentTelemetry]
query = fetch.query_and_describe(
self.client,
op.verb,
f"{op_intent_ref.uss_base_url}{op.path.format(entityid=op_intent_ref.id)}",
QueryType.F3548v21USSGetOperationalIntentTelemetry,
uss_participant_id,
scope=SCOPE_CM_SA,
)
if query.status_code == 200:
result: GetOperationalIntentTelemetryResponse = ImplicitDict.parse(
query.response.json, GetOperationalIntentTelemetryResponse
)
telemetry = result.telemetry if "telemetry" in result else None
return telemetry, query
else:
return None, query

def put_op_intent(
self,
extents: List[Volume4D],
Expand Down
Loading

0 comments on commit 9a19121

Please sign in to comment.