Table of Contents

Interface INexusClient

Namespace
Nexus.Api
Assembly
Nexus.Api.dll

A client for the Nexus system.

public interface INexusClient

Properties

V1

Gets the V1 client.

IV1 V1 { get; }

Property Value

IV1

V2

Gets the V2 client.

IV2 V2 { get; }

Property Value

IV2

Methods

AttachConfiguration(object)

Attaches configuration data to subsequent API requests.

IDisposable AttachConfiguration(object configuration)

Parameters

configuration object

The configuration data.

Returns

IDisposable

ClearConfiguration()

Clears configuration data for all subsequent API requests.

void ClearConfiguration()

Export(DateTime, DateTime, TimeSpan, string?, IEnumerable<string>, IReadOnlyDictionary<string, object>?, string, Precision, Action<double, string>?)

This high-level methods simplifies exporting multiple resources at once.

void Export(DateTime begin, DateTime end, TimeSpan filePeriod, string? fileFormat, IEnumerable<string> resourcePaths, IReadOnlyDictionary<string, object>? configuration, string targetFolder, Precision precision, Action<double, string>? onProgress = null)

Parameters

begin DateTime

The begin date/time.

end DateTime

The end date/time.

filePeriod TimeSpan

The file period. Use TimeSpan.Zero to get a single file.

fileFormat string

The target file format. If null, data will be read (and possibly cached) but not returned. This is useful for data pre-aggregation.

resourcePaths IEnumerable<string>

The resource paths to export.

configuration IReadOnlyDictionary<string, object>

The configuration.

targetFolder string

The target folder for the files to extract.

precision Precision

The floating point precision used for exported sample values.

onProgress Action<double, string>

A callback which accepts the current progress and the progress message.

ExportAsync(DateTime, DateTime, TimeSpan, string?, IEnumerable<string>, IReadOnlyDictionary<string, object>?, string, Precision, Action<double, string>?, CancellationToken)

This high-level methods simplifies exporting multiple resources at once.

Task ExportAsync(DateTime begin, DateTime end, TimeSpan filePeriod, string? fileFormat, IEnumerable<string> resourcePaths, IReadOnlyDictionary<string, object>? configuration, string targetFolder, Precision precision, Action<double, string>? onProgress = null, CancellationToken cancellationToken = default)

Parameters

begin DateTime

The begin date/time.

end DateTime

The end date/time.

filePeriod TimeSpan

The file period. Use TimeSpan.Zero to get a single file.

fileFormat string

The target file format. If null, data will be read (and possibly cached) but not returned. This is useful for data pre-aggregation.

resourcePaths IEnumerable<string>

The resource paths to export.

configuration IReadOnlyDictionary<string, object>

The configuration.

targetFolder string

The target folder for the files to extract.

precision Precision

The floating point precision used for exported sample values.

onProgress Action<double, string>

A callback which accepts the current progress and the progress message.

cancellationToken CancellationToken

A token to cancel the current operation.

Returns

Task

LoadAsync<T>(DateTime, DateTime, IEnumerable<string>, Action<double>?, CancellationToken)

This high-level methods simplifies loading multiple resources at once.

Task<IReadOnlyDictionary<string, DataResponse<T>>> LoadAsync<T>(DateTime begin, DateTime end, IEnumerable<string> resourcePaths, Action<double>? onProgress = null, CancellationToken cancellationToken = default) where T : struct

Parameters

begin DateTime

Start date/time.

end DateTime

End date/time.

resourcePaths IEnumerable<string>

The resource paths.

onProgress Action<double>

A callback which accepts the current progress.

cancellationToken CancellationToken

A token to cancel the current operation.

Returns

Task<IReadOnlyDictionary<string, DataResponse<T>>>

Type Parameters

T

The element type. Use double for 64-bit or float for 32-bit precision.

LoadAsync<T>(DateTime, DateTime, IEnumerable<string>, Func<string, int, long, Memory<T>>, Action<double>?, CancellationToken)

This high-level methods simplifies loading multiple resources at once into caller-provided buffers.

Task<IReadOnlyDictionary<string, ResourceInfo>> LoadAsync<T>(DateTime begin, DateTime end, IEnumerable<string> resourcePaths, Func<string, int, long, Memory<T>> bufferProvider, Action<double>? onProgress = null, CancellationToken cancellationToken = default) where T : struct

Parameters

begin DateTime

Start date/time.

end DateTime

End date/time.

resourcePaths IEnumerable<string>

The resource paths.

bufferProvider Func<string, int, long, Memory<T>>

A callback which provides a writable buffer for each resource path, chunk element count, and remaining resource element count.

onProgress Action<double>

A callback which accepts the current progress.

cancellationToken CancellationToken

A token to cancel the current operation.

Returns

Task<IReadOnlyDictionary<string, ResourceInfo>>

Type Parameters

T

The element type. Use double for 64-bit or float for 32-bit precision.

Load<T>(DateTime, DateTime, IEnumerable<string>, Action<double>?)

This high-level methods simplifies loading multiple resources at once.

IReadOnlyDictionary<string, DataResponse<T>> Load<T>(DateTime begin, DateTime end, IEnumerable<string> resourcePaths, Action<double>? onProgress = null) where T : struct

Parameters

begin DateTime

Start date/time.

end DateTime

End date/time.

resourcePaths IEnumerable<string>

The resource paths.

onProgress Action<double>

A callback which accepts the current progress.

Returns

IReadOnlyDictionary<string, DataResponse<T>>

Type Parameters

T

The element type. Use double for 64-bit or float for 32-bit precision.

Load<T>(DateTime, DateTime, IEnumerable<string>, Func<string, int, long, Memory<T>>, Action<double>?)

This high-level methods simplifies loading multiple resources at once into caller-provided buffers.

IReadOnlyDictionary<string, ResourceInfo> Load<T>(DateTime begin, DateTime end, IEnumerable<string> resourcePaths, Func<string, int, long, Memory<T>> bufferProvider, Action<double>? onProgress = null) where T : struct

Parameters

begin DateTime

Start date/time.

end DateTime

End date/time.

resourcePaths IEnumerable<string>

The resource paths.

bufferProvider Func<string, int, long, Memory<T>>

A callback which provides a writable buffer for each resource path, chunk element count, and remaining resource element count.

onProgress Action<double>

A callback which accepts the current progress.

Returns

IReadOnlyDictionary<string, ResourceInfo>

Type Parameters

T

The element type. Use double for 64-bit or float for 32-bit precision.

SignIn(string)

Signs in the user.

void SignIn(string accessToken)

Parameters

accessToken string

The access token.