@@ -59,6 +59,17 @@ public interface IFocasClient : IDisposable
|
||||
/// </summary>
|
||||
Task<FocasStatusInfo?> GetStatusAsync(CancellationToken cancellationToken)
|
||||
=> Task.FromResult<FocasStatusInfo?>(null);
|
||||
|
||||
/// <summary>
|
||||
/// Read the per-CNC production counters (parts produced / required / total via
|
||||
/// <c>cnc_rdparam(6711/6712/6713)</c>) plus the current cycle-time seconds counter
|
||||
/// (<c>cnc_rdtimer(2)</c>). Surfaced on the FOCAS driver's <c>Production/</c>
|
||||
/// fixed-tree per device (issue #258). Returns <c>null</c> when the wire client
|
||||
/// cannot supply the snapshot (e.g. older transport variant) — the driver leaves
|
||||
/// the cache untouched and the per-field nodes report Bad until the first refresh.
|
||||
/// </summary>
|
||||
Task<FocasProductionInfo?> GetProductionAsync(CancellationToken cancellationToken)
|
||||
=> Task.FromResult<FocasProductionInfo?>(null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -79,6 +90,18 @@ public sealed record FocasStatusInfo(
|
||||
short Alarm,
|
||||
short Edit);
|
||||
|
||||
/// <summary>
|
||||
/// Snapshot of per-CNC production counters refreshed on the probe tick (issue #258).
|
||||
/// Sourced from <c>cnc_rdparam(6711/6712/6713)</c> for the parts counts + the cycle-time
|
||||
/// timer counter (FWLIB <c>cnc_rdtimer</c> when available). All values surfaced as
|
||||
/// <c>Int32</c> in the OPC UA address space.
|
||||
/// </summary>
|
||||
public sealed record FocasProductionInfo(
|
||||
int PartsProduced,
|
||||
int PartsRequired,
|
||||
int PartsTotal,
|
||||
int CycleTimeSeconds);
|
||||
|
||||
/// <summary>Factory for <see cref="IFocasClient"/>s. One client per configured device.</summary>
|
||||
public interface IFocasClientFactory
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user