Interface IDigitalTwinModelEndpoint
- Namespace
- Scaleout.Modules.DigitalTwin.Abstractions
- Assembly
- Scaleout.Modules.DigitalTwin.Abstractions.dll
Interface for use by client applications that send messages to digital twin instances.
public interface IDigitalTwinModelEndpoint
Properties
SharedGlobalData
Gets an ISharedData instance for accessing objects that are shared globally between all models.
ISharedData SharedGlobalData { get; }
Property Value
SharedModelData
Gets an ISharedData instance for accessing shared objects that are associated with the endpoint's model.
ISharedData SharedModelData { get; }
Property Value
Methods
CreateTwinAsync(string, object)
Creates a new digital twin instance.
Task<CreateResult> CreateTwinAsync(string digitalTwinId, object digitalTwin)
Parameters
digitalTwinIdstringID of the digital twin instance.
digitalTwinobjectDigital twin instance to create. It could an object of a real digital twin model type or simply an anonymous object with a set of digital twin model's properties and their initial values.
Returns
- Task<CreateResult>
The CreateResult indicating the result of the operation.
DeleteTwinAsync(string)
Delete a digital twin instance from the ScaleOut data grid.
Task<DeleteResult> DeleteTwinAsync(string digitalTwinId)
Parameters
digitalTwinIdstringDigital twin identifier.
Returns
- Task<DeleteResult>
The DeleteResult indicating the result of the operation.
SendAsync(string, byte[])
Sends a JSON serialized message to a digital twin instance.
Task SendAsync(string digitalTwinId, byte[] message)
Parameters
Returns
- Task
The task object representing the asynchronous operation.
SendAsync(string, IEnumerable<byte[]>)
Sends JSON serialized messages to a digital twin instance.
Task SendAsync(string digitalTwinId, IEnumerable<byte[]> messages)
Parameters
digitalTwinIdstringID of the digital twin instance.
messagesIEnumerable<byte[]>Enumerable collection of serialized messages.