public async void RunTest() { Debug.Log("TestProcessingModulesFrequency started ..."); Ubii.Services.ServiceReply reply = await ubiiNode.CallService(new Ubii.Services.ServiceRequest { Topic = UbiiConstants.Instance.DEFAULT_TOPICS.SERVICES.SESSION_RUNTIME_START, Session = ubiiSession }); //Debug.Log("TestProcessingModules.RunTest() - reply to start session: " + reply); if (reply.Session != null) { ubiiSession = reply.Session; } await Task.Delay(5000); reply = await ubiiNode.CallService(new Ubii.Services.ServiceRequest { Topic = UbiiConstants.Instance.DEFAULT_TOPICS.SERVICES.SESSION_RUNTIME_STOP, Session = ubiiSession }); //Debug.Log("TestProcessingModules.RunTest() - reply to stop session: " + reply); if (testFailure) { Debug.LogError("TestProcessingModulesFrequency FAILURE"); } else { Debug.Log("TestProcessingModulesFrequency SUCCESS"); } }
async private void RunTestStartStopSession() { bool success = false; Ubii.Services.ServiceReply replyStart = await ubiiNode.CallService( new Ubii.Services.ServiceRequest { Topic = ubiiConstants.DEFAULT_TOPICS.SERVICES.SESSION_RUNTIME_START, Session = this.sessionSpecs } ); if (replyStart.Session != null) { this.sessionSpecs = replyStart.Session; await Task.Delay(1000); Ubii.Services.ServiceReply replyStop = await ubiiNode.CallService( new Ubii.Services.ServiceRequest { Topic = ubiiConstants.DEFAULT_TOPICS.SERVICES.SESSION_RUNTIME_STOP, Session = this.sessionSpecs } ); if (replyStop.Success != null) { Debug.Log("RunTestStartStopSession SUCCESS!"); } else { Debug.LogError("RunTestStartStopSession FAILURE! Could not stop session."); } } else { Debug.LogError("RunTestStartStopSession FAILURE! Could not start session."); } }