blob: 1632deeb636dacf9bd7bd39a82929786fc9c64cb [file] [log] [blame]
Constantin Ziesche857c7ab2020-02-25 11:24:51 +01001/*******************************************************************************
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.AssetAdministrationShell.Generics;
12using BaSyx.Utils.ResultHandling;
13using BaSyx.Models.Core.Common;
14using BaSyx.Models.Core.AssetAdministrationShell.Generics.SubmodelElementTypes;
Constantin Zieschefa612082020-04-03 09:54:56 +020015using BaSyx.Models.Communication;
Constantin Ziesche857c7ab2020-02-25 11:24:51 +010016
17namespace BaSyx.API.Clients
18{
19 public interface ISubmodelClient
20 {
21 IResult<ISubmodel> RetrieveSubmodel();
22
23 #region SubmodelElement - CRUD-Operations
24 IResult<ISubmodelElement> CreateSubmodelElement(ISubmodelElement submodelElement);
25
26 IResult<IElementContainer<ISubmodelElement>> RetrieveSubmodelElements();
27
28 IResult<ISubmodelElement> RetrieveSubmodelElement(string submodelElementId);
29
30 IResult<IValue> RetrieveSubmodelElementValue(string submodelElementId);
31
32 IResult UpdateSubmodelElement(string submodelElementId, ISubmodelElement submodelElement);
33
34 IResult DeleteSubmodelElement(string submodelElementId);
35 #endregion
36
37 #region Operation - CRUD-Operations
38 IResult<IOperation> CreateOperation(IOperation operation);
39
40 IResult<IElementContainer<IOperation>> RetrieveOperations();
41
42 IResult<IOperation> RetrieveOperation(string operationId);
43
44 IResult DeleteOperation(string operationId);
45
Constantin Zieschefa612082020-04-03 09:54:56 +020046 IResult<InvocationResponse> InvokeOperation(string operationId, InvocationRequest invocationRequest);
47 IResult<CallbackResponse> InvokeOperationAsync(string operationId, InvocationRequest invocationRequest);
48 IResult<InvocationResponse> GetInvocationResult(string operationId, string requestId);
49
Constantin Ziesche857c7ab2020-02-25 11:24:51 +010050 #endregion
51
52 #region Property - CRUD-Operations
53 IResult<IProperty> CreateProperty(IProperty property);
54
55 IResult<IElementContainer<IProperty>> RetrieveProperties();
56
57 IResult<IProperty> RetrieveProperty(string propertyId);
58
59 IResult<IValue> RetrievePropertyValue(string propertyId);
60
61 IResult UpdatePropertyValue(string propertyId, IValue propertyValue);
62
63 IResult DeleteProperty(string propertyId);
64 #endregion
65
66 #region Event - CRUD-Operations
67 IResult<IEvent> CreateEvent(IEvent eventable);
68
69 IResult<IElementContainer<IEvent>> RetrieveEvents();
70
71 IResult<IEvent> RetrieveEvent(string eventId);
72
73 IResult DeleteEvent(string eventId);
74 #endregion
75 }
76}