blob: 272be8475f8ab75d78b5ed41682ffeb60565ace4 [file] [log] [blame]
Constantin Zieschefa612082020-04-03 09:54:56 +02001/*******************************************************************************
2* Copyright (c) 2020 Robert Bosch GmbH
3* Author: Constantin Ziesche (constantin.ziesche@bosch.com)
4*
5* This program and the accompanying materials are made available under the
6* terms of the Eclipse Public License 2.0 which is available at
7* http://www.eclipse.org/legal/epl-2.0
8*
9* SPDX-License-Identifier: EPL-2.0
10*******************************************************************************/
11using BaSyx.Models.Core.Common;
12using BaSyx.Utils.ResultHandling;
13using System.Runtime.Serialization;
14
15namespace BaSyx.Models.Communication
16{
17 [DataContract]
18 public class InvocationResponse
19 {
20 [DataMember(EmitDefaultValue = false, IsRequired = true, Name = "requestId")]
21 public string RequestId { get; private set; }
22
23 [DataMember(EmitDefaultValue = false, IsRequired = false, Name = "outputArguments")]
24 public IOperationVariableSet OutputArguments { get; set; }
25
26 [DataMember(EmitDefaultValue = false, IsRequired = false, Name = "operationResult")]
27 public OperationResult OperationResult { get; set; }
28
29 [DataMember(EmitDefaultValue = false, IsRequired = false, Name = "executionState")]
30 public ExecutionState ExecutionState { get; set; }
31
32 public InvocationResponse(string requestId)
33 {
34 RequestId = requestId;
35 OutputArguments = new OperationVariableSet();
36 ExecutionState = ExecutionState.Initiated;
37 }
38 }
39}