Skip to content
Start free evaluation

PDComm.GemFormattedProgramSelectionSnapshot

Class

A read-only copy of the equipment's formatted process program selection.

public sealed class GemFormattedProgramSelectionSnapshot : GemOwnedSnapshot

GemFormattedPrograms.GetSelectionSnapshot and GemFormattedPrograms.ValidateSelection, or their GemFormattedProgramsWorker counterparts, return it. It holds the selection state and the copy of the program taken when the program was selected; that copy does not follow later store changes. While nothing is selected, only GemFormattedProgramSelectionSnapshot.GetInfo succeeds and the program accessors fail with PdcommStatus.InvalidState. The caller owns the snapshot and must dispose it.

Members

GetCommandCode

Method

Gets the command code (CCODE) of one command of the selected program.

public SecsItem GetCommandCode(nuint command_index)

Fails with PdcommStatus.InvalidState when the snapshot holds no selection.

Parameters

NameDescription
command_indexThe zero-based index of the command.

Returns

A new SecsItem holding the ASCII or unsigned integer command code (CCODE). The caller owns the returned item and must dispose it.

Notes

  • Throws ObjectDisposedException: The snapshot has been disposed.
  • Throws PdcommException: The native accessor failed, for example with PdcommStatus.InvalidState when the snapshot does not hold the requested data, or with PdcommStatus.OutOfRange when an index is past the end or the indexed entry is absent.

GetCommandInfo

Method

Gets the parameter count and the command code format of one command of the selected program.

public GemFormattedProgramCommandInfo GetCommandInfo(nuint command_index)

Fails with PdcommStatus.InvalidState when the snapshot holds no selection.

Parameters

NameDescription
command_indexThe zero-based index of the command, less than GemFormattedProgramSelectionInfo.CommandCount.

Returns

The parameter count of the command and the SECS-II format of its command code (CCODE).

Notes

  • Throws ObjectDisposedException: The snapshot has been disposed.
  • Throws PdcommException: The native accessor failed, for example with PdcommStatus.InvalidState when the snapshot does not hold the requested data, or with PdcommStatus.OutOfRange when an index is past the end or the indexed entry is absent.

GetId

Method

Gets the process program ID (PPID) of the selected program.

public SecsItem GetId()

Fails with PdcommStatus.InvalidState when the snapshot holds no selection.

Returns

A new ASCII or binary SecsItem holding the PPID. The caller owns the returned item and must dispose it.

Notes

  • Throws ObjectDisposedException: The snapshot has been disposed.
  • Throws PdcommException: The native accessor failed, for example with PdcommStatus.InvalidState when the snapshot does not hold the requested data.

GetInfo

Method

Gets the selection state captured by the snapshot.

public GemFormattedProgramSelectionInfo GetInfo()

Returns

The selection state, the stale reason and the generations of the selection.

Notes

  • Throws ObjectDisposedException: The snapshot has been disposed.
  • Throws PdcommException: The native accessor failed, for example with PdcommStatus.InvalidState when the snapshot does not hold the requested data.

GetModel

Method

Gets the equipment model type (MDLN) of the selected program.

public string GetModel()

Fails with PdcommStatus.InvalidState when the snapshot holds no selection.

Returns

The equipment model type (MDLN) text.

Notes

  • Throws ObjectDisposedException: The snapshot has been disposed.
  • Throws PdcommException: The native accessor failed, for example with PdcommStatus.InvalidState when the snapshot does not hold the requested data.

GetParameter

Method

Gets one parameter (PPARM) of one command of the selected program.

public SecsItem GetParameter(nuint command_index, nuint parameter_index)

Fails with PdcommStatus.InvalidState when the snapshot holds no selection.

Parameters

NameDescription
command_indexThe zero-based index of the command.
parameter_indexThe zero-based index of the parameter within the command.

Returns

A new SecsItem holding the parameter (PPARM). The caller owns the returned item and must dispose it.

Notes

  • Throws ObjectDisposedException: The snapshot has been disposed.
  • Throws PdcommException: The native accessor failed, for example with PdcommStatus.InvalidState when the snapshot does not hold the requested data, or with PdcommStatus.OutOfRange when an index is past the end or the indexed entry is absent.

GetSoftwareRevision

Method

Gets the software revision (SOFTREV) of the selected program.

public string GetSoftwareRevision()

Fails with PdcommStatus.InvalidState when the snapshot holds no selection.

Returns

The software revision (SOFTREV) text.

Notes

  • Throws ObjectDisposedException: The snapshot has been disposed.
  • Throws PdcommException: The native accessor failed, for example with PdcommStatus.InvalidState when the snapshot does not hold the requested data.