PDComm.GemFormattedProgramsWorker
Class
Runs formatted process program operations on a GEM worker's polling thread.
public sealed class GemFormattedProgramsWorkerGet 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
| Name | Description |
|---|---|
token | The execution token from GemFormattedProgramExecutionStart.Token. |
cancellationToken | A 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:cancellationTokenis already canceled. - Throws
ArgumentNullException:tokenisnull.
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
| Name | Description |
|---|---|
cancellationToken | A 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:cancellationTokenis 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
| Name | Description |
|---|---|
token | The token of the current selection, from GemFormattedPrograms.SelectProgram. |
cancellationToken | A 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:cancellationTokenis already canceled. - Throws
ArgumentNullException:tokenisnull.
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
| Name | Description |
|---|---|
token | The execution token from GemFormattedProgramExecutionStart.Token. |
reportId | An application-defined report ID that is recorded with the outcome. |
outcome | The final outcome of the program. |
detail | Application-defined detail bytes that are recorded with the outcome, at most SecsLimits.MessageBytes of the endpoint's GEM item limits; may be empty. |
cancellationToken | A 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:cancellationTokenis already canceled. - Throws
ArgumentNullException:tokenisnull. - 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
| Name | Description |
|---|---|
options | The catalog bounds and the request, received, result and history capacities of the service. |
cancellationToken | A 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:cancellationTokenis already canceled. - Throws
ArgumentNullException:optionsisnull.
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
| Name | Description |
|---|---|
options | The command and parameter bounds, the store bounds, and the request, received, result and history capacities of the service. |
cancellationToken | A 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:cancellationTokenis already canceled. - Throws
ArgumentNullException:optionsisnull.
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
| Name | Description |
|---|---|
options | The command and parameter bounds and the request, received, result and history capacities of the service. |
cancellationToken | A 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:cancellationTokenis already canceled. - Throws
ArgumentNullException:optionsisnull.
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
| Name | Description |
|---|---|
options | The issue bounds, the prepared-negotiation capacity, and the request, received, result and history capacities of the service. |
cancellationToken | A 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:cancellationTokenis already canceled. - Throws
ArgumentNullException:optionsisnull.
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
| Name | Description |
|---|---|
options | The issue bounds and the request, received, result and history capacities of the service. |
cancellationToken | A 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:cancellationTokenis already canceled. - Throws
ArgumentNullException:optionsisnull.
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
| Name | Description |
|---|---|
options | The command and parameter bounds and the request, received, result and history capacities of the service. |
cancellationToken | A 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:cancellationTokenis already canceled. - Throws
ArgumentNullException:optionsisnull.
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
| Name | Description |
|---|---|
token | The token of the current selection, from GemFormattedPrograms.SelectProgram. |
options | The analysis policy version, which must be 1, and the bounds on the issue count and the encoded program size in bytes. |
cancellationToken | A 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:cancellationTokenis already canceled. - Throws
ArgumentNullException:tokenoroptionsisnull.
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
| Name | Description |
|---|---|
cancellationToken | A 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:cancellationTokenis 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
| Name | Description |
|---|---|
cancellationToken | A 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:cancellationTokenis 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
| Name | Description |
|---|---|
cancellationToken | A 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:cancellationTokenis 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
| Name | Description |
|---|---|
cancellationToken | A 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:cancellationTokenis 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
| Name | Description |
|---|---|
id | The process program ID (PPID): a nonempty ASCII or Binary item of at most 120 bytes. |
issues | The verification issues in wire order. |
cancellationToken | A 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:cancellationTokenis already canceled. - Throws
ArgumentNullException:idorissuesisnullor contains anullvalue. - Throws
ObjectDisposedException: ASecsItemargument 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
| Name | Description |
|---|---|
payload | The program to store; GemFormattedProgramPayload describes the rules for each field. |
action | How to write the program: GemFormattedProgramStoreAction.CreateOnly, GemFormattedProgramStoreAction.ReplaceOnly or GemFormattedProgramStoreAction.Upsert. |
cancellationToken | A 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:cancellationTokenis already canceled. - Throws
ArgumentNullException:payloadisnullor contains anullvalue. - Throws
ObjectDisposedException: ASecsItemargument, 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
| Name | Description |
|---|---|
id | The process program ID (PPID) to remove: an ASCII or Binary item. |
cancellationToken | A 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:cancellationTokenis already canceled. - Throws
ArgumentNullException:idisnull. - Throws
ObjectDisposedException: ASecsItemargument 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
| Name | Description |
|---|---|
id | The process program ID (PPID) to remove: an ASCII or Binary item. |
cancellationToken | A 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:cancellationTokenis already canceled. - Throws
ArgumentNullException:idisnull. - Throws
ObjectDisposedException: ASecsItemargument 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
| Name | Description |
|---|---|
model | The equipment model type (MDLN): ASCII text of at most 20 bytes. |
softwareRevision | The software revision (SOFTREV): ASCII text of at most 20 bytes. |
commandMaximum | The largest number of commands a program may contain (CMDMAX); it is sent as a U1 item. |
byteMaximum | The largest encoded program size, in bytes (BYTMAX); it is sent as a U4 item. |
commands | The command entries in wire order. |
cancellationToken | A 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:cancellationTokenis already canceled. - Throws
ArgumentNullException:model,softwareRevisionorcommandsisnullor contains anullvalue. - 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
| Name | Description |
|---|---|
result | The GemResult of the received S7F21 request (GemOutcome.FormattedCapabilityReceived) from this endpoint and session. |
cancellationToken | A 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:cancellationTokenis already canceled. - Throws
ArgumentNullException:resultisnull. - Throws
ObjectDisposedException: AGemResultargument 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
| Name | Description |
|---|---|
result | The GemResult of the received S7F25 (GemOutcome.FormattedQueryReceived) from this endpoint and session. |
cancellationToken | A 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:cancellationTokenis already canceled. - Throws
ArgumentNullException:resultisnull. - Throws
ObjectDisposedException: AGemResultargument 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
| Name | Description |
|---|---|
result | The GemResult of the received S7F23 (GemOutcome.FormattedTransferReceived) from this endpoint and session. |
acknowledgement | The acknowledge code (ACKC7), from 0 through 7; 0 accepts the program. |
action | How to write the program to the store; GemFormattedProgramStoreAction.RespondOnly replies without writing. |
cancellationToken | A 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:cancellationTokenis already canceled. - Throws
ArgumentNullException:resultisnull. - Throws
ObjectDisposedException: AGemResultargument 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
| Name | Description |
|---|---|
result | The GemResult of the received S7F23 (GemOutcome.FormattedTransferReceived) from this endpoint and session. |
acknowledgement | The acknowledge code (ACKC7), from 0 through 7; 0 accepts the program. |
cancellationToken | A 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:cancellationTokenis already canceled. - Throws
ArgumentNullException:resultisnull. - Throws
ObjectDisposedException: AGemResultargument 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
| Name | Description |
|---|---|
result | The GemResult of the received S7F29 (GemOutcome.FormattedVerificationInquireReceived) from this endpoint and session. |
grant | The grant code (PPGNT), from 0 through 63; 0 grants the verification send. |
cancellationToken | A 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:cancellationTokenis already canceled. - Throws
ArgumentNullException:resultisnull. - Throws
ObjectDisposedException: AGemResultargument 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
| Name | Description |
|---|---|
result | The GemResult of the received S7F27 (GemOutcome.FormattedVerificationReportReceived) from this endpoint and session. |
cancellationToken | A 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:cancellationTokenis already canceled. - Throws
ArgumentNullException:resultisnull. - Throws
ObjectDisposedException: AGemResultargument 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
| Name | Description |
|---|---|
result | The GemResult of the received S7F31 (GemOutcome.FormattedVerificationRequestReceived) from this endpoint and session. |
acknowledgement | The acknowledge code (ACKC7), from 0 through 7; 0 accepts the request. |
cancellationToken | A 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:cancellationTokenis already canceled. - Throws
ArgumentNullException:resultisnull. - Throws
ObjectDisposedException: AGemResultargument 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
| Name | Description |
|---|---|
result | The prepared negotiation GemResult, or the result that reported its S7F30 grant, on this endpoint and session. |
cancellationToken | A 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:cancellationTokenis already canceled. - Throws
ArgumentNullException:resultisnull. - Throws
ObjectDisposedException: AGemResultargument 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
| Name | Description |
|---|---|
result | The GemResult of the received S7F29 (GemOutcome.FormattedVerificationInquireReceived) whose reply is still unsent. |
cancellationToken | A 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:cancellationTokenis already canceled. - Throws
ArgumentNullException:resultisnull. - Throws
ObjectDisposedException: AGemResultargument 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
| Name | Description |
|---|---|
payload | The program to store; GemFormattedProgramPayload describes the rules for each field. |
cancellationToken | A 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:cancellationTokenis already canceled. - Throws
ArgumentNullException:payloadisnullor contains anullvalue. - Throws
ObjectDisposedException: ASecsItemargument, 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
| Name | Description |
|---|---|
id | The process program ID (PPID) of a program in the local store: an ASCII or Binary item. |
cancellationToken | A 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:cancellationTokenis already canceled. - Throws
ArgumentNullException:idisnull. - Throws
ObjectDisposedException: ASecsItemargument 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
| Name | Description |
|---|---|
selection | The token returned by GemFormattedPrograms.SelectProgram; it must still match the current selection. |
report | A 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. |
cancellationToken | A 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:cancellationTokenis already canceled. - Throws
ArgumentNullException:selectionorreportisnull. - Throws
ObjectDisposedException: AGemFormattedProgramDryRunReportargument 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
| Name | Description |
|---|---|
token | The execution token from GemFormattedProgramExecutionStart.Token. |
cancellationToken | A 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:cancellationTokenis already canceled. - Throws
ArgumentNullException:tokenisnull.
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
| Name | Description |
|---|---|
token | The action token from GemFormattedPrograms.GetActionToken for the pending action. |
result | The result; it must suit the action kind, as described for GemFormattedProgramActionResult. |
cancellationToken | A 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:cancellationTokenis already canceled. - Throws
ArgumentNullException:tokenisnull.
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
| Name | Description |
|---|---|
cancellationToken | A 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:cancellationTokenis 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
| Name | Description |
|---|---|
prepared | The GemResult returned by GemFormattedPrograms.PrepareVerification on this endpoint and session. |
cancellationToken | A 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:cancellationTokenis already canceled. - Throws
ArgumentNullException:preparedisnull. - Throws
ObjectDisposedException: AGemResultargument 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
| Name | Description |
|---|---|
id | The process program ID (PPID) to request: a nonempty ASCII or Binary item of at most 120 bytes. |
cancellationToken | A 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:cancellationTokenis already canceled. - Throws
ArgumentNullException:idisnull. - Throws
ObjectDisposedException: ASecsItemargument 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
| Name | Description |
|---|---|
payload | The program to send; GemFormattedProgramPayload describes the rules for each field. |
cancellationToken | A 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:cancellationTokenis already canceled. - Throws
ArgumentNullException:payloadisnullor contains anullvalue. - Throws
ObjectDisposedException: ASecsItemargument, 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
| Name | Description |
|---|---|
id | The process program ID (PPID): a nonempty ASCII or Binary item of at most 120 bytes. |
issues | The verification issues in wire order; an empty list sends an empty issue list. |
cancellationToken | A 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:cancellationTokenis already canceled. - Throws
ArgumentNullException:idorissuesisnullor contains anullvalue. - Throws
ObjectDisposedException: ASecsItemargument 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
| Name | Description |
|---|---|
payload | The program to verify; GemFormattedProgramPayload describes the rules for each field. |
cancellationToken | A 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:cancellationTokenis already canceled. - Throws
ArgumentNullException:payloadisnullor contains anullvalue. - Throws
ObjectDisposedException: ASecsItemargument, 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
| Name | Description |
|---|---|
token | The token of the current selection, from GemFormattedPrograms.SelectProgram. |
cancellationToken | A 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:cancellationTokenis already canceled. - Throws
ArgumentNullException:tokenisnull.