ObjectDiagnosticsSession Class

Declaration

struct winrt::Microsoft::Azure::ObjectAnchors::Diagnostics::ObjectDiagnosticsSession

Description

Diagnostics object that captures observer input, output and internal states.

Methods

CloseAsync

Closes this session to stop collecting diagnostics. A closed session should be considered as dead thus its state is invalid.

Windows::Foundation::IAsyncAction CloseAsync(hstring const& diagnosticsFilePath);

Parameters

  • diagnosticsFilePath - File to store the diagnostics data.

Returns

  • Windows::Foundation::IAsyncAction - System.Threading.Tasks.Task.

ReportActualInstanceLocation

Report actual instance location provided by the application.

void ReportActualInstanceLocation(winrt::Microsoft::Azure::ObjectAnchors::ObjectInstance const& instance, winrt::Microsoft::Azure::ObjectAnchors::SpatialGraph::SpatialGraphCoordinateSystem const& coordinateSystem, Windows::Foundation::Numerics::float3 const& position, Windows::Foundation::Numerics::quaternion const& orientation);

Parameters

  • instance - An instance being tracked within this session.
  • coordinateSystem - Reference coordinate system for the user provided instance location.
  • position - Instance position.
  • orientation - Instance orientation.

UploadDiagnosticsAsync

Uploads diagnostics to the Azure Object Anchors service and returns the job status. Throws exception on invalid diagnostics package or incorrect account credentials.

static Windows::Foundation::IAsyncOperation<::winrt::Microsoft::Azure::ObjectAnchors::Diagnostics::ObjectDiagnosticsUploadStatus> UploadDiagnosticsAsync(hstring const& diagnosticsFilePath, winrt::Microsoft::Azure::ObjectAnchors::ObjectAnchorsSession const& objectAnchorsSession);

Parameters

  • diagnosticsFilePath - The diagnostics file path.
  • objectAnchorsSession - The Azure Object Anchors session.

Returns