Click or drag to resize

API changes 2.0.0

Version 2.0.0 introduces enhancements to the streaming API and acquisition service, adding support for trace file loading and improved configuration options.

Symbol

Indicates

+

Trace Loading:Load(LoadRequest, ServerCallContext) RPC method to load trace files from disk for streaming and analysis

+

Trace Options:Options message added to LoadRequest for configuring loaded traces

+

File Format Options:FileFormat enum in SaveRequest supporting ZIP, FOLDER, and RAW formats

+

Firmware Version Query:GetConnectedCardsFirmwareVersions(ConnectedCardsFirmwareVersionsRequest, ServerCallContext) RPC method to retrieve firmware information from connected cards

+

Streaming Segment Control:WaitForCurrentSegmentSent(WaitForCurrentSegmentSentRequest, ServerCallContext) RPC method for synchronizing with segment completion

+

Condition DLL Path:ConditionDllPathFieldNumber field in InitializeRequest for loading custom condition implementations

+

Timestamp in Ticks:TimestampInTicksFieldNumber option in GetFrameRequest for high-resolution timestamps

+

Trigger Edge Options:IncludeTriggeredOnEdgeFieldNumber and IncludeTriggeredOffEdgeFieldNumber in GetFrameRequest

+

Streaming Mode Extensions:SmConditionToFile, SmConditionToStream, SmConditionToFileAndStream, and SmFileAndStream modes added

+

Segment Numbering:SegmentNumberFieldNumber field added to Frame message for tracking multi-segment acquisitions

~

LoadRequest Enhancement: Added Options field for configuring virtual signals on loaded traces

Acquisition Service Changes

Load() RPC Method

A new Load(LoadRequest, ServerCallContext) RPC method enables loading trace files for offline analysis:

protobuf
// Load acquired trace data from a file.
rpc Load (LoadRequest) returns (LoadReply);

message LoadRequest {
    // Path to load the traces from (for PC running the service).
    string path = 1;
    // Additional trace options
    optional Trace.Options options = 2;
}

This allows clients to:

  • Load previously saved trace files

  • Apply virtual signal processing to loaded data via Options

  • Stream loaded traces through the same API as live acquisition

File Format Specification

The SaveRequest message now includes an optional SaveFormat field:

protobuf
enum FileFormat {
    ZIP = 0;
    FOLDER = 10;
    RAW = 11;
}

message SaveRequest {
    optional Card card = 1;
    string save_path = 2;
    optional FileFormat save_format = 3;
}

Firmware Version Query

New RPC method to query firmware versions from connected cards:

protobuf
rpc GetConnectedCardsFirmwareVersions(ConnectedCardsFirmwareVersionsRequest) 
    returns (ConnectedCardsFirmwareVersionsReply);

message ConnectedCardsFirmwareVersionsRequest {
    repeated Card cards = 1;
}

message ConnectedCardsFirmwareVersionsReply {
    map<string, string> firmware_versions = 1;
}
Streaming Service Changes

Enhanced Streaming Modes

The StreamingMode enum has been expanded with condition-based modes:

protobuf
enum StreamingMode {
    SM_NONE = 0;
    SM_FILE = 1;
    SM_TRIGGER = 2;
    SM_CONDITION_TO_FILE = 3;              // New
    SM_CONDITION_TO_STREAM = 4;            // New
    SM_CONDITION_TO_FILE_AND_STREAM = 5;   // New
    SM_FILE_AND_STREAM = 6;                // New
}

Custom Condition Support

The InitializeRequest now accepts a path to a custom condition DLL:

protobuf
message InitializeRequest {
    string device_id = 1;
    optional StreamingMode streaming_mode = 2;
    google.protobuf.StringValue streaming_trace_path = 3;
    google.protobuf.Int32Value frames_per_trace = 4;
    google.protobuf.Int32Value frames_after_trigger = 5;
    google.protobuf.Int32Value max_simultaneous_trigger = 6;
    string condition_dll_path = 7;           // New
    optional Trace.Options options = 8;      // New
}

Frame Streaming Enhancements

GetFrameRequest now supports additional options:

protobuf
message GetFrameRequest {
    string device_id = 1;
    optional bool timestamp_in_ticks = 2;              // New
    optional bool include_triggered_off_edge = 3;      // New
    optional bool include_triggered_on_edge = 4;       // New
}

The Frame message now includes segment tracking:

protobuf
message Frame {
    repeated Sample samples = 1;
    uint64 segment_number = 2;    // New
}

Segment Synchronization

New RPC method for waiting until the current segment is completely sent:

protobuf
rpc WaitForCurrentSegmentSent(WaitForCurrentSegmentSentRequest) 
    returns (WaitForCurrentSegmentSentReply);

message WaitForCurrentSegmentSentRequest {
    string device_id = 1;
}
Usage Examples

Loading and Streaming a Trace File

C#
// Load a trace file with virtual signal options
var loadRequest = new LoadRequest
{
    Path = @"C:\Traces\MyTrace.zip",
    Options = new Trace.Options
    {
        // Configure virtual signals here
    }
};
await acquisitionClient.LoadAsync(loadRequest);

// Stream the loaded trace
var streamRequest = new GetFrameRequest 
{ 
    DeviceId = "0",
    TimestampInTicks = true 
};
    using var call = streamingClient.GetFrame(streamRequest);
    await foreach (var frame in call.ResponseStream.ReadAllAsync())
    {
        // Process frame data
        Console.WriteLine($"Segment: {frame.SegmentNumber}, Samples: {frame.Samples.Count}");
    }

Using Condition-Based Streaming

C#
// Initialize streaming with custom condition
var initRequest = new InitializeRequest
{
    DeviceId = "SP310194",
    StreamingMode = StreamingMode.SmConditionToFileAndStream,
    StreamingTracePath = @"C:\Traces",
    FramesPerTrace = 100,
    FramesAfterTrigger = 10,
    ConditionDllPath = @"C:\Conditions\MyCondition.dll"
};
await streamingClient.InitializeAsync(initRequest);

// Condition will automatically trigger saves and streaming
See Also

Other Resources

API changes 2.4.0
Streaming
Acquisition Service
Custom Condition