Constantin Ziesche | 857c7ab | 2020-02-25 11:24:51 +0100 | [diff] [blame] | 1 | /******************************************************************************* |
| 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 | *******************************************************************************/ |
| 11 | using BaSyx.Models.Core.AssetAdministrationShell.Generics; |
| 12 | using BaSyx.Utils.ResultHandling; |
| 13 | using BaSyx.Models.Core.Common; |
| 14 | using BaSyx.Models.Core.AssetAdministrationShell.Generics.SubmodelElementTypes; |
Constantin Ziesche | fa61208 | 2020-04-03 09:54:56 +0200 | [diff] [blame] | 15 | using BaSyx.Models.Communication; |
Constantin Ziesche | 857c7ab | 2020-02-25 11:24:51 +0100 | [diff] [blame] | 16 | |
| 17 | namespace 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 Ziesche | fa61208 | 2020-04-03 09:54:56 +0200 | [diff] [blame] | 46 | 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 Ziesche | 857c7ab | 2020-02-25 11:24:51 +0100 | [diff] [blame] | 50 | #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 | } |