Table of Contents

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

ISharedData

SharedModelData

Gets an ISharedData instance for accessing shared objects that are associated with the endpoint's model.

ISharedData SharedModelData { get; }

Property Value

ISharedData

Methods

CreateTwinAsync(string, object)

Creates a new digital twin instance.

Task<CreateResult> CreateTwinAsync(string digitalTwinId, object digitalTwin)

Parameters

digitalTwinId string

ID of the digital twin instance.

digitalTwin object

Digital 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

digitalTwinId string

Digital 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

digitalTwinId string

ID of the digital twin instance.

message byte[]

Serialized message.

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

digitalTwinId string

ID of the digital twin instance.

messages IEnumerable<byte[]>

Enumerable collection of serialized messages.

Returns

Task