public override IEnumerator ReceivePayload(VisualPayload payload) { var filename = TraceFilename.GetFirstValue(payload.Data); var trace = Trace.LoadFromFile(filename); var newExecution = new Execution { CbAuthor = CbAuthor.GetFirstValue(payload.Data), CbId = 0, ExecutionId = (uint)ExecutionID.GetFirstValue(payload.Data), PovType = PovType.GetFirstValue(payload.Data), RequestId = (uint)RequestId.GetFirstValue(payload.Data), ServiceId = new ServiceIdentifier(), RequestNature = RequestNature.GetFirstValue(payload.Data), Success = Success.GetFirstValue(payload.Data), Traces = new List <Trace> { trace } }; var executionMutable = ExecutionAdapter.ExecutionToMutable( newExecution, IncludeMemory.GetFirstValue(payload.Data), PovType.GetFirstValue(payload.Data)); ExecutionTarget.SetValue(executionMutable, payload.Data); var iterator = Router.TransmitAll(payload); while (iterator.MoveNext()) { yield return(null); } }
private IEnumerator UpdateExecutionId(MutableObject mutable) { BinaryId = new BinaryIdentifier((uint)BinaryIdNumber.GetFirstValue(mutable), "Unknown"); FoundRequestId = (uint)RequestId.GetFirstValue(mutable); var idsId = IdsId.GetFirstValue(mutable); if (ServiceId.Id == 0 || BinaryId == null || FoundRequestId == 0) { FoundExecutionId = 0; Debug.LogError("Incomplete selection: binary " + (BinaryId == null ? "null" : ("" + BinaryId)) + ", request " + FoundRequestId); yield break; } var requestNature = RequestNature.GetFirstValue(mutable); var executionCommand = new GetExecutionIdCommand(requestNature, FoundRequestId, BinaryId.Id, idsId); PriorExecutionIdCommand = executionCommand; Debug.Log("Executing command " + executionCommand.RelativeUrl); var iterator = CommandProcessor.Execute(executionCommand); while (iterator.MoveNext()) { yield return(null); } //Debug.LogFormat( "Execution id is {0}", executionIdCommand.ExecutionId ); if (!executionCommand.Ok) { FoundExecutionId = 0; yield break; } CsSuccess = executionCommand.CsSuccess; PovType = executionCommand.PovType; FoundExecutionId = executionCommand.ExecutionId; }