ZplPrinterFaults
public sealed class ZplPrinterFaultsScriptable faults and printer conditions of a ZplVirtualPrinter: set conditions now (ZplPrinterFaults.Raise), schedule them deterministically (ZplPrinterFaults.Schedule: after n labels, bytes or cuts, on a command, after a time, or randomly with ZplPrinterFaults.Seed) and clear them like an operator (ZplPrinterFaults.Clear). Thread-safe.
Properties
| Property | Type | Description |
|---|---|---|
Active { get; } | IReadOnlyCollection<ZplFaultKind> | Active conditions. |
Scheduled { get; } | IReadOnlyList<ZplFaultRule> | Scheduled rules that have not fired yet (and repeating rules). |
Seed { get; set; } | int | Seed of the random triggers (default 0): the same seed and job give the same faults. |
StopsPrinting { get; } | bool | Printing is stopped (paper/ribbon out, head open, over temperature, cutter fault, pause, power off). |
Methods
| Method Signature | Returns | Description |
|---|---|---|
# ActiveRule(ZplFaultKind kind) | ZplFaultRule | The rule that activated kind (null when raised without rule or inactive). |
# Clear(ZplFaultKind kind) | void | Clears a condition (paper loaded, head closed, cooled down, ~PS for Pause ...). |
# ClearAll() | void | Clears all conditions and removes all scheduled rules. |
# IsActive(ZplFaultKind kind) | bool | |
# Load(ZplChaosScript script) | void | Loads a chaos script (see ZplChaosScript) and schedules its faults. |
# Raise(ZplFaultKind kind) | void | Activates a condition now (like a sensor or the operator). |
# Schedule(ZplFaultRule rule) | ZplFaultRule | Schedules a rule; ZplFaultTriggerKind.Immediately activates it at once. |
# Schedule(ZplFaultKind kind, ZplFaultTrigger trigger) | ZplFaultRule |
Events
| Event | Handler Type | Description |
|---|---|---|
FaultCleared | EventHandler<ZplFaultEventArgs> | |
FaultRaised | EventHandler<ZplFaultEventArgs> |

