PDComm.GemFormattedProgramStoreSnapshot
Class
A read-only copy of the equipment's formatted process program store.
public sealed class GemFormattedProgramStoreSnapshot : GemOwnedSnapshotGemFormattedPrograms.GetStoreSnapshot or its GemFormattedProgramsWorker counterpart returns it. It holds the store information and every stored process program as they were when it was taken, and stays valid after later store changes and after the endpoint is disposed. Programs are addressed by zero-based entry index. The caller owns the snapshot and must dispose it.
Members
GetEntryCommandCode
Method
Gets the command code (CCODE) of one command of a stored program.
public SecsItem GetEntryCommandCode(nuint entry_index, nuint command_index)Parameters
| Name | Description |
|---|---|
entry_index | The zero-based index of the stored program, less than GemFormattedProgramStoreInfo.EntryCount. |
command_index | The 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 withPdcommStatus.InvalidStatewhen the snapshot does not hold the requested data, or withPdcommStatus.OutOfRangewhen an index is past the end or the indexed entry is absent.
GetEntryCommandInfo
Method
Gets the parameter count and the command code format of one command of a stored program.
public GemFormattedProgramCommandInfo GetEntryCommandInfo(nuint entry_index, nuint command_index)Parameters
| Name | Description |
|---|---|
entry_index | The zero-based index of the stored program, less than GemFormattedProgramStoreInfo.EntryCount. |
command_index | The zero-based index of the command, less than GemFormattedProgramStoreEntryInfo.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 withPdcommStatus.InvalidStatewhen the snapshot does not hold the requested data, or withPdcommStatus.OutOfRangewhen an index is past the end or the indexed entry is absent.
GetEntryId
Method
Gets the process program ID (PPID) of one stored program.
public SecsItem GetEntryId(nuint entry_index)Parameters
| Name | Description |
|---|---|
entry_index | The zero-based index of the stored program, less than GemFormattedProgramStoreInfo.EntryCount. |
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 withPdcommStatus.InvalidStatewhen the snapshot does not hold the requested data, or withPdcommStatus.OutOfRangewhen an index is past the end or the indexed entry is absent.
GetEntryInfo
Method
Gets the description of one stored program.
public GemFormattedProgramStoreEntryInfo GetEntryInfo(nuint entry_index)Parameters
| Name | Description |
|---|---|
entry_index | The zero-based index of the stored program, less than GemFormattedProgramStoreInfo.EntryCount. |
Returns
The command count and the PPID format of the program.
Notes
- Throws
ObjectDisposedException: The snapshot has been disposed. - Throws
PdcommException: The native accessor failed, for example withPdcommStatus.InvalidStatewhen the snapshot does not hold the requested data, or withPdcommStatus.OutOfRangewhen an index is past the end or the indexed entry is absent.
GetEntryModel
Method
Gets the equipment model type (MDLN) of one stored program.
public string GetEntryModel(nuint entry_index)Parameters
| Name | Description |
|---|---|
entry_index | The zero-based index of the stored program, less than GemFormattedProgramStoreInfo.EntryCount. |
Returns
The equipment model type (MDLN) text.
Notes
- Throws
ObjectDisposedException: The snapshot has been disposed. - Throws
PdcommException: The native accessor failed, for example withPdcommStatus.InvalidStatewhen the snapshot does not hold the requested data, or withPdcommStatus.OutOfRangewhen an index is past the end or the indexed entry is absent.
GetEntryParameter
Method
Gets one parameter (PPARM) of one command of a stored program.
public SecsItem GetEntryParameter(nuint entry_index, nuint command_index, nuint parameter_index)Parameters
| Name | Description |
|---|---|
entry_index | The zero-based index of the stored program, less than GemFormattedProgramStoreInfo.EntryCount. |
command_index | The zero-based index of the command. |
parameter_index | The 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 withPdcommStatus.InvalidStatewhen the snapshot does not hold the requested data, or withPdcommStatus.OutOfRangewhen an index is past the end or the indexed entry is absent.
GetEntrySoftwareRevision
Method
Gets the software revision (SOFTREV) of one stored program.
public string GetEntrySoftwareRevision(nuint entry_index)Parameters
| Name | Description |
|---|---|
entry_index | The zero-based index of the stored program, less than GemFormattedProgramStoreInfo.EntryCount. |
Returns
The software revision (SOFTREV) text.
Notes
- Throws
ObjectDisposedException: The snapshot has been disposed. - Throws
PdcommException: The native accessor failed, for example withPdcommStatus.InvalidStatewhen the snapshot does not hold the requested data, or withPdcommStatus.OutOfRangewhen an index is past the end or the indexed entry is absent.
GetSnapshotInfo
Method
Gets the store information captured by the snapshot.
public GemFormattedProgramStoreInfo GetSnapshotInfo()Returns
The store revision, its usage and its limits at the time of the snapshot.
Notes
- Throws
ObjectDisposedException: The snapshot has been disposed. - Throws
PdcommException: The native accessor failed, for example withPdcommStatus.InvalidStatewhen the snapshot does not hold the requested data.