Click or drag to resize

PrinterAlert Class

Defines a printer alert.
Inheritance Hierarchy
SystemObject
  Zebra.Sdk.PrinterPrinterAlert

Namespace: Zebra.Sdk.Printer
Assembly: SdkApi.Core (in SdkApi.Core.dll) Version: 3.0.3271
Syntax
[JsonObjectAttribute]
public class PrinterAlert

The PrinterAlert type exposes the following members.

Constructors
 NameDescription
Public methodPrinterAlert(AlertCondition, AlertDestination, Boolean, Boolean, String, Int32, Boolean) Creates an instance of a PrinterAlert object.
Public methodPrinterAlert(AlertCondition, AlertDestination, Boolean, Boolean, String, Int32, Boolean, String) Creates an instance of a PrinterAlert object, including the printer alert text.
Public methodPrinterAlert(AlertCondition, AlertDestination, String, Boolean, Boolean, String, Int32, Boolean) Creates an instance of a PrinterAlert object, including a Set-Get-Do name.
Public methodPrinterAlert(AlertCondition, AlertDestination, String, Boolean, Boolean, String, Int32, Boolean, String) Creates an instance of a PrinterAlert object, including a Set-Get-Do name and the printer alert text.
Top
Properties
 NameDescription
Public propertyAlertText Return the text received from the printer.
Public propertyCondition Gets the current alert condition.
Public propertyConditionName Return the AlertCondition of the alert.
Public propertyDestination Return the AlertDestination used by the alert.
Public propertyDestinationAddress Return the destination where the alert should be sent, for example, an IP Address or an email address, depending on the value of getDestinationAsSGDString.
Public propertyDestinationAsSgdString Return the string representation of the alert destination for Set-Get-Do.
Public propertyOnClear Return alert will be triggered on 'clear'.
Public propertyOnSet Return true if the alert is fired when 'set'.
Public propertyPort Return the destination port number where the alert should be sent.
Public propertyQuelling Return the quelling state of the alert.
Public propertySgdName Return the string representation of the Set-Get-Do Name.
Top
Methods
 NameDescription
Public methodEquals
(Inherited from Object)
Public methodGetHashCode
(Inherited from Object)
Public methodGetType
(Inherited from Object)
Public methodToString
(Inherited from Object)
Top
Remarks
Applicable only to ZPL printers.
Example
C#
using System;
using Zebra.Sdk.Printer;
using Zebra.Sdk.Settings;

public class PrinterAlertExample {

    public static void Main(string[] args) {
        PrinterAlert myPrinterAlert = new PrinterAlert(AlertCondition.PAPER_OUT, AlertDestination.TCP, true, false, "10.3.4.5", 9100, false);
        PrinterAlert myGenericAlert = myPrinterAlert;

        Console.WriteLine("Alert Info:");
        Console.WriteLine("  Condition = " + myGenericAlert.Condition);
        Console.WriteLine("  Destination = " + myGenericAlert.DestinationAsSgdString);
        Console.WriteLine("  Address = " + myGenericAlert.DestinationAddress);
        Console.WriteLine("  Port = " + myGenericAlert.Port);
        Console.WriteLine("  Fire when condition occurs? = " + myPrinterAlert.OnSet);
        Console.WriteLine("  Fire when condition clears? = " + myPrinterAlert.OnClear);
        Console.WriteLine("  Are alerts quelled? = " + myPrinterAlert.Quelling);
    }
}
See Also