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: 2.14.1989
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
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks
Applicable only to ZPL printers.
Examples
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