Skip to content
Start free evaluation

PDComm.GemFormattedProgramsWorker

Class

Runs formatted process program operations on a GEM worker's polling thread.

public sealed class GemFormattedProgramsWorker

Get an instance from GemWorker.FormattedPrograms. Each method is the asynchronous counterpart of the GemFormattedPrograms method with the same name without the Async suffix.

Inputs are captured on the calling thread before the command is queued: strings, byte buffers and SecsItem values are copied, and GemResult and GemFormattedProgramDryRunReport arguments are leased, so their native memory stays valid until the command finishes even if the caller disposes them. The captured bytes count against HsmsWorkerOptions.MaxCommandBytes.

Members

CancelExecutionAsync

Method

Queues GemFormattedPrograms.CancelExecution to run on the worker's polling thread.

public Task<GemFormattedProgramExecutionAction> CancelExecutionAsync(GemFormattedProgramExecutionToken token, CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.CancelExecution. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
tokenThe execution token from GemFormattedProgramExecutionStart.Token.
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task whose result is the value returned by GemFormattedPrograms.CancelExecution. The caller owns the returned object and must dispose it.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.
  • Throws ArgumentNullException: token is null.

ClearCapabilitiesAsync

Method

Queues GemFormattedPrograms.ClearCapabilities to run on the worker's polling thread.

public Task<ulong> ClearCapabilitiesAsync(CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.ClearCapabilities. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task whose result is the value returned by GemFormattedPrograms.ClearCapabilities.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.

ClearSelectionAsync

Method

Queues GemFormattedPrograms.ClearSelection to run on the worker's polling thread.

public Task<bool> ClearSelectionAsync(GemFormattedProgramSelectionToken token, CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.ClearSelection. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
tokenThe token of the current selection, from GemFormattedPrograms.SelectProgram.
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task whose result is the value returned by GemFormattedPrograms.ClearSelection.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.
  • Throws ArgumentNullException: token is null.

CompleteExecutionAsync

Method

Queues GemFormattedPrograms.CompleteExecution to run on the worker's polling thread.

public Task CompleteExecutionAsync(GemFormattedProgramExecutionToken token, ulong reportId, GemFormattedProgramTerminalOutcome outcome, ReadOnlyMemory<byte> detail, CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.CompleteExecution. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
tokenThe execution token from GemFormattedProgramExecutionStart.Token.
reportIdAn application-defined report ID that is recorded with the outcome.
outcomeThe final outcome of the program.
detailApplication-defined detail bytes that are recorded with the outcome, at most SecsLimits.MessageBytes of the endpoint's GEM item limits; may be empty.
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task that completes when GemFormattedPrograms.CompleteExecution has run on the worker's polling thread.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.
  • Throws ArgumentNullException: token is null.
  • Throws PdcommException: The captured input exceeds the worker's command byte budget (PdcommStatus.Backpressure).

ConfigureCapabilitiesAsync

Method

Queues GemFormattedPrograms.ConfigureCapabilities to run on the worker's polling thread.

public Task ConfigureCapabilitiesAsync(GemFormattedProgramCapabilityOptions options, CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.ConfigureCapabilities. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
optionsThe catalog bounds and the request, received, result and history capacities of the service.
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task that completes when GemFormattedPrograms.ConfigureCapabilities has run on the worker's polling thread.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.
  • Throws ArgumentNullException: options is null.

ConfigureQueriesAsync

Method

Queues GemFormattedPrograms.ConfigureQueries to run on the worker's polling thread.

public Task ConfigureQueriesAsync(GemFormattedProgramQueryOptions options, CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.ConfigureQueries. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
optionsThe command and parameter bounds, the store bounds, and the request, received, result and history capacities of the service.
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task that completes when GemFormattedPrograms.ConfigureQueries has run on the worker's polling thread.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.
  • Throws ArgumentNullException: options is null.

ConfigureTransfersAsync

Method

Queues GemFormattedPrograms.ConfigureTransfers to run on the worker's polling thread.

public Task ConfigureTransfersAsync(GemFormattedProgramTransferOptions options, CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.ConfigureTransfers. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
optionsThe command and parameter bounds and the request, received, result and history capacities of the service.
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task that completes when GemFormattedPrograms.ConfigureTransfers has run on the worker's polling thread.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.
  • Throws ArgumentNullException: options is null.

ConfigureVerificationNegotiationAsync

Method

Queues GemFormattedPrograms.ConfigureVerificationNegotiation to run on the worker's polling thread.

public Task ConfigureVerificationNegotiationAsync(GemFormattedProgramVerificationNegotiationOptions options, CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.ConfigureVerificationNegotiation. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
optionsThe issue bounds, the prepared-negotiation capacity, and the request, received, result and history capacities of the service.
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task that completes when GemFormattedPrograms.ConfigureVerificationNegotiation has run on the worker's polling thread.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.
  • Throws ArgumentNullException: options is null.

ConfigureVerificationReportsAsync

Method

Queues GemFormattedPrograms.ConfigureVerificationReports to run on the worker's polling thread.

public Task ConfigureVerificationReportsAsync(GemFormattedProgramOptions options, CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.ConfigureVerificationReports. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
optionsThe issue bounds and the request, received, result and history capacities of the service.
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task that completes when GemFormattedPrograms.ConfigureVerificationReports has run on the worker's polling thread.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.
  • Throws ArgumentNullException: options is null.

ConfigureVerificationRequestsAsync

Method

Queues GemFormattedPrograms.ConfigureVerificationRequests to run on the worker's polling thread.

public Task ConfigureVerificationRequestsAsync(GemFormattedProgramVerificationRequestOptions options, CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.ConfigureVerificationRequests. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
optionsThe command and parameter bounds and the request, received, result and history capacities of the service.
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task that completes when GemFormattedPrograms.ConfigureVerificationRequests has run on the worker's polling thread.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.
  • Throws ArgumentNullException: options is null.

DryRunAsync

Method

Queues GemFormattedPrograms.DryRun to run on the worker's polling thread.

public Task<GemFormattedProgramDryRunReport> DryRunAsync(GemFormattedProgramSelectionToken token, GemFormattedProgramDryRunOptions options, CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.DryRun. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
tokenThe token of the current selection, from GemFormattedPrograms.SelectProgram.
optionsThe analysis policy version, which must be 1, and the bounds on the issue count and the encoded program size in bytes.
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task whose result is the value returned by GemFormattedPrograms.DryRun. The caller owns the returned object and must dispose it.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.
  • Throws ArgumentNullException: token or options is null.

GetExecutionSnapshotAsync

Method

Queues GemFormattedPrograms.GetExecutionSnapshot to run on the worker's polling thread.

public Task<GemFormattedProgramExecutionSnapshot> GetExecutionSnapshotAsync(CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.GetExecutionSnapshot. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task whose result is the value returned by GemFormattedPrograms.GetExecutionSnapshot. The caller owns the returned object and must dispose it.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.

GetSelectionSnapshotAsync

Method

Queues GemFormattedPrograms.GetSelectionSnapshot to run on the worker's polling thread.

public Task<GemFormattedProgramSelectionSnapshot> GetSelectionSnapshotAsync(CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.GetSelectionSnapshot. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task whose result is the value returned by GemFormattedPrograms.GetSelectionSnapshot. The caller owns the returned object and must dispose it.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.

GetStoreInfoAsync

Method

Queues GemFormattedPrograms.GetStoreInfo to run on the worker's polling thread.

public Task<GemFormattedProgramStoreInfo> GetStoreInfoAsync(CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.GetStoreInfo. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task whose result is the value returned by GemFormattedPrograms.GetStoreInfo.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.

GetStoreSnapshotAsync

Method

Queues GemFormattedPrograms.GetStoreSnapshot to run on the worker's polling thread.

public Task<GemFormattedProgramStoreSnapshot> GetStoreSnapshotAsync(CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.GetStoreSnapshot. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task whose result is the value returned by GemFormattedPrograms.GetStoreSnapshot. The caller owns the returned object and must dispose it.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.

PrepareVerificationAsync

Method

Queues GemFormattedPrograms.PrepareVerification to run on the worker's polling thread.

public Task<GemResult> PrepareVerificationAsync(SecsItem id, IReadOnlyList<GemFormattedProgramIssue> issues, CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.PrepareVerification. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
idThe process program ID (PPID): a nonempty ASCII or Binary item of at most 120 bytes.
issuesThe verification issues in wire order.
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task whose result is the value returned by GemFormattedPrograms.PrepareVerification. The caller owns the returned object and must dispose it.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.
  • Throws ArgumentNullException: id or issues is null or contains a null value.
  • Throws ObjectDisposedException: A SecsItem argument has been disposed.
  • Throws PdcommException: The captured input exceeds the worker's command byte budget (PdcommStatus.Backpressure), or a captured item exceeds the worker's item limits.

PutProgramAsync

Method

Queues GemFormattedPrograms.PutProgram to run on the worker's polling thread.

public Task PutProgramAsync(GemFormattedProgramPayload payload, GemFormattedProgramStoreAction action, CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.PutProgram. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
payloadThe program to store; GemFormattedProgramPayload describes the rules for each field.
actionHow to write the program: GemFormattedProgramStoreAction.CreateOnly, GemFormattedProgramStoreAction.ReplaceOnly or GemFormattedProgramStoreAction.Upsert.
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task that completes when GemFormattedPrograms.PutProgram has run on the worker's polling thread.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.
  • Throws ArgumentNullException: payload is null or contains a null value.
  • Throws ObjectDisposedException: A SecsItem argument, including an item inside a payload, has been disposed.
  • Throws PdcommException: The captured input exceeds the worker's command byte budget (PdcommStatus.Backpressure), or a captured item exceeds the worker's item limits.

RemoveProgramAsync

Method

Queues GemFormattedPrograms.RemoveProgram to run on the worker's polling thread.

public Task<bool> RemoveProgramAsync(SecsItem id, CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.RemoveProgram. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
idThe process program ID (PPID) to remove: an ASCII or Binary item.
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task whose result is the value returned by GemFormattedPrograms.RemoveProgram.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.
  • Throws ArgumentNullException: id is null.
  • Throws ObjectDisposedException: A SecsItem argument has been disposed.
  • Throws PdcommException: The captured input exceeds the worker's command byte budget (PdcommStatus.Backpressure), or a captured item exceeds the worker's item limits.

RemoveQueryAsync

Method

Queues GemFormattedPrograms.RemoveQuery to run on the worker's polling thread.

public Task<bool> RemoveQueryAsync(SecsItem id, CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.RemoveQuery. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
idThe process program ID (PPID) to remove: an ASCII or Binary item.
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task whose result is the value returned by GemFormattedPrograms.RemoveQuery.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.
  • Throws ArgumentNullException: id is null.
  • Throws ObjectDisposedException: A SecsItem argument has been disposed.
  • Throws PdcommException: The captured input exceeds the worker's command byte budget (PdcommStatus.Backpressure), or a captured item exceeds the worker's item limits.

ReplaceCapabilitiesAsync

Method

Queues GemFormattedPrograms.ReplaceCapabilities to run on the worker's polling thread.

public Task<ulong> ReplaceCapabilitiesAsync(string model, string softwareRevision, byte commandMaximum, uint byteMaximum, IReadOnlyList<GemFormattedProgramCapabilityCommand> commands, CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.ReplaceCapabilities. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
modelThe equipment model type (MDLN): ASCII text of at most 20 bytes.
softwareRevisionThe software revision (SOFTREV): ASCII text of at most 20 bytes.
commandMaximumThe largest number of commands a program may contain (CMDMAX); it is sent as a U1 item.
byteMaximumThe largest encoded program size, in bytes (BYTMAX); it is sent as a U4 item.
commandsThe command entries in wire order.
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task whose result is the value returned by GemFormattedPrograms.ReplaceCapabilities.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.
  • Throws ArgumentNullException: model, softwareRevision or commands is null or contains a null value.
  • Throws PdcommException: The captured input exceeds the worker's command byte budget (PdcommStatus.Backpressure).

RespondCapabilityQueryAsync

Method

Queues GemFormattedPrograms.RespondCapabilityQuery to run on the worker's polling thread.

public Task RespondCapabilityQueryAsync(GemResult result, CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full or its event output is blocked, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.RespondCapabilityQuery. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
resultThe GemResult of the received S7F21 request (GemOutcome.FormattedCapabilityReceived) from this endpoint and session.
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task that completes when GemFormattedPrograms.RespondCapabilityQuery has run on the worker's polling thread.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.
  • Throws ArgumentNullException: result is null.
  • Throws ObjectDisposedException: A GemResult argument has been disposed.
  • Throws PdcommException: The captured input exceeds the worker's command byte budget (PdcommStatus.Backpressure).

RespondQueryAsync

Method

Queues GemFormattedPrograms.RespondQuery to run on the worker's polling thread.

public Task RespondQueryAsync(GemResult result, CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full or its event output is blocked, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.RespondQuery. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
resultThe GemResult of the received S7F25 (GemOutcome.FormattedQueryReceived) from this endpoint and session.
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task that completes when GemFormattedPrograms.RespondQuery has run on the worker's polling thread.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.
  • Throws ArgumentNullException: result is null.
  • Throws ObjectDisposedException: A GemResult argument has been disposed.
  • Throws PdcommException: The captured input exceeds the worker's command byte budget (PdcommStatus.Backpressure).

RespondTransferAndStoreAsync

Method

Queues GemFormattedPrograms.RespondTransferAndStore to run on the worker's polling thread.

public Task RespondTransferAndStoreAsync(GemResult result, byte acknowledgement, GemFormattedProgramStoreAction action, CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full or its event output is blocked, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.RespondTransferAndStore. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
resultThe GemResult of the received S7F23 (GemOutcome.FormattedTransferReceived) from this endpoint and session.
acknowledgementThe acknowledge code (ACKC7), from 0 through 7; 0 accepts the program.
actionHow to write the program to the store; GemFormattedProgramStoreAction.RespondOnly replies without writing.
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task that completes when GemFormattedPrograms.RespondTransferAndStore has run on the worker's polling thread.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.
  • Throws ArgumentNullException: result is null.
  • Throws ObjectDisposedException: A GemResult argument has been disposed.
  • Throws PdcommException: The captured input exceeds the worker's command byte budget (PdcommStatus.Backpressure).

RespondTransferAsync

Method

Queues GemFormattedPrograms.RespondTransfer to run on the worker's polling thread.

public Task RespondTransferAsync(GemResult result, byte acknowledgement, CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full or its event output is blocked, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.RespondTransfer. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
resultThe GemResult of the received S7F23 (GemOutcome.FormattedTransferReceived) from this endpoint and session.
acknowledgementThe acknowledge code (ACKC7), from 0 through 7; 0 accepts the program.
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task that completes when GemFormattedPrograms.RespondTransfer has run on the worker's polling thread.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.
  • Throws ArgumentNullException: result is null.
  • Throws ObjectDisposedException: A GemResult argument has been disposed.
  • Throws PdcommException: The captured input exceeds the worker's command byte budget (PdcommStatus.Backpressure).

RespondVerificationAsync

Method

Queues GemFormattedPrograms.RespondVerification to run on the worker's polling thread.

public Task RespondVerificationAsync(GemResult result, byte grant, CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full or its event output is blocked, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.RespondVerification. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
resultThe GemResult of the received S7F29 (GemOutcome.FormattedVerificationInquireReceived) from this endpoint and session.
grantThe grant code (PPGNT), from 0 through 63; 0 grants the verification send.
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task that completes when GemFormattedPrograms.RespondVerification has run on the worker's polling thread.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.
  • Throws ArgumentNullException: result is null.
  • Throws ObjectDisposedException: A GemResult argument has been disposed.
  • Throws PdcommException: The captured input exceeds the worker's command byte budget (PdcommStatus.Backpressure).

RespondVerificationReportAsync

Method

Queues GemFormattedPrograms.RespondVerificationReport to run on the worker's polling thread.

public Task RespondVerificationReportAsync(GemResult result, CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full or its event output is blocked, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.RespondVerificationReport. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
resultThe GemResult of the received S7F27 (GemOutcome.FormattedVerificationReportReceived) from this endpoint and session.
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task that completes when GemFormattedPrograms.RespondVerificationReport has run on the worker's polling thread.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.
  • Throws ArgumentNullException: result is null.
  • Throws ObjectDisposedException: A GemResult argument has been disposed.
  • Throws PdcommException: The captured input exceeds the worker's command byte budget (PdcommStatus.Backpressure).

RespondVerificationRequestAsync

Method

Queues GemFormattedPrograms.RespondVerificationRequest to run on the worker's polling thread.

public Task RespondVerificationRequestAsync(GemResult result, byte acknowledgement, CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full or its event output is blocked, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.RespondVerificationRequest. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
resultThe GemResult of the received S7F31 (GemOutcome.FormattedVerificationRequestReceived) from this endpoint and session.
acknowledgementThe acknowledge code (ACKC7), from 0 through 7; 0 accepts the request.
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task that completes when GemFormattedPrograms.RespondVerificationRequest has run on the worker's polling thread.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.
  • Throws ArgumentNullException: result is null.
  • Throws ObjectDisposedException: A GemResult argument has been disposed.
  • Throws PdcommException: The captured input exceeds the worker's command byte budget (PdcommStatus.Backpressure).

RetryVerificationAsync

Method

Queues GemFormattedPrograms.RetryVerification to run on the worker's polling thread.

public Task<HsmsToken> RetryVerificationAsync(GemResult result, CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full or its event output is blocked, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.RetryVerification. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
resultThe prepared negotiation GemResult, or the result that reported its S7F30 grant, on this endpoint and session.
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task whose result is the value returned by GemFormattedPrograms.RetryVerification.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.
  • Throws ArgumentNullException: result is null.
  • Throws ObjectDisposedException: A GemResult argument has been disposed.
  • Throws PdcommException: The captured input exceeds the worker's command byte budget (PdcommStatus.Backpressure).

RetryVerificationResponseAsync

Method

Queues GemFormattedPrograms.RetryVerificationResponse to run on the worker's polling thread.

public Task RetryVerificationResponseAsync(GemResult result, CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full or its event output is blocked, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.RetryVerificationResponse. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
resultThe GemResult of the received S7F29 (GemOutcome.FormattedVerificationInquireReceived) whose reply is still unsent.
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task that completes when GemFormattedPrograms.RetryVerificationResponse has run on the worker's polling thread.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.
  • Throws ArgumentNullException: result is null.
  • Throws ObjectDisposedException: A GemResult argument has been disposed.
  • Throws PdcommException: The captured input exceeds the worker's command byte budget (PdcommStatus.Backpressure).

SeedQueryAsync

Method

Queues GemFormattedPrograms.SeedQuery to run on the worker's polling thread.

public Task SeedQueryAsync(GemFormattedProgramPayload payload, CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.SeedQuery. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
payloadThe program to store; GemFormattedProgramPayload describes the rules for each field.
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task that completes when GemFormattedPrograms.SeedQuery has run on the worker's polling thread.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.
  • Throws ArgumentNullException: payload is null or contains a null value.
  • Throws ObjectDisposedException: A SecsItem argument, including an item inside a payload, has been disposed.
  • Throws PdcommException: The captured input exceeds the worker's command byte budget (PdcommStatus.Backpressure), or a captured item exceeds the worker's item limits.

SelectProgramAsync

Method

Queues GemFormattedPrograms.SelectProgram to run on the worker's polling thread.

public Task<GemFormattedProgramSelectionToken> SelectProgramAsync(SecsItem id, CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.SelectProgram. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
idThe process program ID (PPID) of a program in the local store: an ASCII or Binary item.
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task whose result is the value returned by GemFormattedPrograms.SelectProgram.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.
  • Throws ArgumentNullException: id is null.
  • Throws ObjectDisposedException: A SecsItem argument has been disposed.
  • Throws PdcommException: The captured input exceeds the worker's command byte budget (PdcommStatus.Backpressure), or a captured item exceeds the worker's item limits.

StartExecutionAsync

Method

Queues GemFormattedPrograms.StartExecution to run on the worker's polling thread.

public Task<GemFormattedProgramExecutionStart> StartExecutionAsync(GemFormattedProgramSelectionToken selection, GemFormattedProgramDryRunReport report, CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.StartExecution. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
selectionThe token returned by GemFormattedPrograms.SelectProgram; it must still match the current selection.
reportA dry run report of the same selection from GemFormattedPrograms.DryRun, made against the current capability catalog revision. A report with the outcome GemFormattedProgramDryRunOutcome.Reject is refused.
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task whose result is the value returned by GemFormattedPrograms.StartExecution. The caller owns the returned object and must dispose it.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.
  • Throws ArgumentNullException: selection or report is null.
  • Throws ObjectDisposedException: A GemFormattedProgramDryRunReport argument has been disposed.
  • Throws PdcommException: The captured input exceeds the worker's command byte budget (PdcommStatus.Backpressure).

StepExecutionAsync

Method

Queues GemFormattedPrograms.StepExecution to run on the worker's polling thread.

public Task<GemFormattedProgramExecutionAction> StepExecutionAsync(GemFormattedProgramExecutionToken token, CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.StepExecution. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
tokenThe execution token from GemFormattedProgramExecutionStart.Token.
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task whose result is the value returned by GemFormattedPrograms.StepExecution. The caller owns the returned object and must dispose it.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.
  • Throws ArgumentNullException: token is null.

SubmitActionResultAsync

Method

Queues GemFormattedPrograms.SubmitActionResult to run on the worker's polling thread.

public Task SubmitActionResultAsync(GemFormattedProgramExecutionActionToken token, GemFormattedProgramActionResult result, CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full or its event output is blocked, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.SubmitActionResult. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
tokenThe action token from GemFormattedPrograms.GetActionToken for the pending action.
resultThe result; it must suit the action kind, as described for GemFormattedProgramActionResult.
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task that completes when GemFormattedPrograms.SubmitActionResult has run on the worker's polling thread.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.
  • Throws ArgumentNullException: token is null.

SubmitCapabilityQueryAsync

Method

Queues GemFormattedPrograms.SubmitCapabilityQuery to run on the worker's polling thread.

public Task<HsmsToken> SubmitCapabilityQueryAsync(CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full or its event output is blocked, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.SubmitCapabilityQuery. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task whose result is the value returned by GemFormattedPrograms.SubmitCapabilityQuery.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.

SubmitPreparedVerificationAsync

Method

Queues GemFormattedPrograms.SubmitPreparedVerification to run on the worker's polling thread.

public Task<HsmsToken> SubmitPreparedVerificationAsync(GemResult prepared, CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full or its event output is blocked, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.SubmitPreparedVerification. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
preparedThe GemResult returned by GemFormattedPrograms.PrepareVerification on this endpoint and session.
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task whose result is the value returned by GemFormattedPrograms.SubmitPreparedVerification.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.
  • Throws ArgumentNullException: prepared is null.
  • Throws ObjectDisposedException: A GemResult argument has been disposed.
  • Throws PdcommException: The captured input exceeds the worker's command byte budget (PdcommStatus.Backpressure).

SubmitQueryAsync

Method

Queues GemFormattedPrograms.SubmitQuery to run on the worker's polling thread.

public Task<HsmsToken> SubmitQueryAsync(SecsItem id, CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full or its event output is blocked, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.SubmitQuery. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
idThe process program ID (PPID) to request: a nonempty ASCII or Binary item of at most 120 bytes.
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task whose result is the value returned by GemFormattedPrograms.SubmitQuery.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.
  • Throws ArgumentNullException: id is null.
  • Throws ObjectDisposedException: A SecsItem argument has been disposed.
  • Throws PdcommException: The captured input exceeds the worker's command byte budget (PdcommStatus.Backpressure), or a captured item exceeds the worker's item limits.

SubmitTransferAsync

Method

Queues GemFormattedPrograms.SubmitTransfer to run on the worker's polling thread.

public Task<HsmsToken> SubmitTransferAsync(GemFormattedProgramPayload payload, CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full or its event output is blocked, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.SubmitTransfer. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
payloadThe program to send; GemFormattedProgramPayload describes the rules for each field.
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task whose result is the value returned by GemFormattedPrograms.SubmitTransfer.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.
  • Throws ArgumentNullException: payload is null or contains a null value.
  • Throws ObjectDisposedException: A SecsItem argument, including an item inside a payload, has been disposed.
  • Throws PdcommException: The captured input exceeds the worker's command byte budget (PdcommStatus.Backpressure), or a captured item exceeds the worker's item limits.

SubmitVerificationReportAsync

Method

Queues GemFormattedPrograms.SubmitVerificationReport to run on the worker's polling thread.

public Task<HsmsToken> SubmitVerificationReportAsync(SecsItem id, IReadOnlyList<GemFormattedProgramIssue> issues, CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full or its event output is blocked, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.SubmitVerificationReport. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
idThe process program ID (PPID): a nonempty ASCII or Binary item of at most 120 bytes.
issuesThe verification issues in wire order; an empty list sends an empty issue list.
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task whose result is the value returned by GemFormattedPrograms.SubmitVerificationReport.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.
  • Throws ArgumentNullException: id or issues is null or contains a null value.
  • Throws ObjectDisposedException: A SecsItem argument has been disposed.
  • Throws PdcommException: The captured input exceeds the worker's command byte budget (PdcommStatus.Backpressure), or a captured item exceeds the worker's item limits.

SubmitVerificationRequestAsync

Method

Queues GemFormattedPrograms.SubmitVerificationRequest to run on the worker's polling thread.

public Task<HsmsToken> SubmitVerificationRequestAsync(GemFormattedProgramPayload payload, CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full or its event output is blocked, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.SubmitVerificationRequest. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
payloadThe program to verify; GemFormattedProgramPayload describes the rules for each field.
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task whose result is the value returned by GemFormattedPrograms.SubmitVerificationRequest.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.
  • Throws ArgumentNullException: payload is null or contains a null value.
  • Throws ObjectDisposedException: A SecsItem argument, including an item inside a payload, has been disposed.
  • Throws PdcommException: The captured input exceeds the worker's command byte budget (PdcommStatus.Backpressure), or a captured item exceeds the worker's item limits.

ValidateSelectionAsync

Method

Queues GemFormattedPrograms.ValidateSelection to run on the worker's polling thread.

public Task<GemFormattedProgramSelectionSnapshot> ValidateSelectionAsync(GemFormattedProgramSelectionToken token, CancellationToken cancellationToken = default)

The task faults with PdcommException and PdcommStatus.Backpressure when the worker's command queue or byte budget is full, with ObjectDisposedException after the worker stops accepting commands, and otherwise with the exception thrown by GemFormattedPrograms.ValidateSelection. It is canceled when cancellationToken is canceled before the command runs.

Parameters

NameDescription
tokenThe token of the current selection, from GemFormattedPrograms.SelectProgram.
cancellationTokenA token that cancels the command if it has not started running.

Returns

A task whose result is the value returned by GemFormattedPrograms.ValidateSelection. The caller owns the returned object and must dispose it.

Notes

  • Throws OperationCanceledException: cancellationToken is already canceled.
  • Throws ArgumentNullException: token is null.