Skip to content
Start free evaluation

PDComm.GemFormattedProgramExecutionSnapshot

Class

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

public sealed class GemFormattedProgramExecutionSnapshot : GemOwnedSnapshot

GemFormattedPrograms.GetExecutionSnapshot or its GemFormattedProgramsWorker counterpart returns it. It holds the execution state, the executed program, the pending action and the application's terminal report as they were when it was taken. While no execution exists, the program accessors fail with PdcommStatus.InvalidState. The caller owns the snapshot and must dispose it.

Members

GetApplicationDetailBytes

Method

Gets the detail bytes that the application passed with its terminal report.

public byte[] GetApplicationDetailBytes()

Fails with PdcommStatus.InvalidState when the snapshot holds no application report.

Returns

A copy of the detail; empty when the report has none.

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.

GetCommandCode

Method

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

public SecsItem GetCommandCode(nuint command_index)

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

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 executed program.

public GemFormattedProgramCommandInfo GetCommandInfo(nuint command_index)

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

Parameters

NameDescription
command_indexThe zero-based index of the command.

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.

GetInfo

Method

Gets the execution state captured by the snapshot.

public GemFormattedProgramExecutionInfo GetInfo()

Returns

The state, the pending action, the application report and the identity of the executed program.

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 executed program.

public string GetModel()

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

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 executed program.

public SecsItem GetParameter(nuint command_index, nuint parameter_index)

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

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.

GetProgramId

Method

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

public SecsItem GetProgramId()

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

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.

GetSoftwareRevision

Method

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

public string GetSoftwareRevision()

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

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.