Вы находитесь на странице: 1из 30

Epson ePOS SDK for Universal Windows apps

Migration Guide
Migration Overview

Migration from ePOS-Print SDK

M00100000
Rev. A
Cautions
No part of this document may be reproduced, stored in a retrieval system, or transmitted in any form or by
any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permis-
sion of Seiko Epson Corporation.
The contents of this document are subject to change without notice. Please contact us for the latest informa-
tion.
While every precaution has been taken in the preparation of this document, Seiko Epson Corporation
assumes no responsibility for errors or omissions.
Neither is any liability assumed for damages resulting from the use of the information contained herein.
Neither Seiko Epson Corporation nor its affiliates shall be liable to the purchaser of this product or third
parties for damages, losses, costs, or expenses incurred by the purchaser or third parties as a result of:
accident, misuse, or abuse of this product or unauthorized modifications, repairs, or alterations to this
product, or (excluding the U.S.) failure to strictly comply with Seiko Epson Corporations operating and
maintenance instructions.
Seiko Epson Corporation shall not be liable against any damages or problems arising from the use of any
options or any consumable products other than those specified as Original Epson Products or Epson
Approved Products by Seiko Epson Corporation.

Trademarks
EPSON is a registered trademark of Seiko Epson Corporation.
Exceed Your Vision is registered trademark or trademark of Seiko Epson Corporation.
Microsoft, MSDN, Visual C++, Visual C#, Visual Basic, Visual Studio, and Windows are registered
trademarks or trademarks of Microsoft Corporation in the United States and other countries.
All other trademarks are the property of their respective owners and used for identification purpose only.

Seiko Epson Corporation 2016. All rights reserved.

2
Restriction of Use
When this product is used for applications requiring high reliability/safety, such as transportation devices
related to aviation, rail, marine, automotive, etc.; disaster prevention devices; various safety devices, etc.; or
functional/precision devices, etc., you should use this product only after giving consideration to including fail-
safes and redundancies into your design to maintain safety and total system reliability. Because this product was
not intended for use in applications requiring extremely high reliability/safety, such as aerospace equipment,
main communication equipment, nuclear power control equipment, or medical equipment related to direct
medical care, etc., please make your own judgment on this product's suitability after a full evaluation.

3
Contents
Restriction of Use ....................................................................................................................3
Contents....................................................................................................................................4

Migration Overview.........................................................................................5

Migration from ePOS-Print SDK .....................................................................6


Migration with the Epson ePOS SDK APIs ..........................................................................6
Migration procedure......................................................................................................................................................... 6
Migrating the application project to Universal Windows apps......................................................................... 8
Installing Epson ePOS SDK.............................................................................................................................................. 8
Changing library references........................................................................................................................................... 8
Changing namespace.....................................................................................................................................................10
Changing classes name .................................................................................................................................................10
Establishing and cutting the communication with the printer.......................................................................11
Printing ................................................................................................................................................................................13
Obtaining status ...............................................................................................................................................................15
Printer search.....................................................................................................................................................................18
Monitoring of the status................................................................................................................................................21
Changing event obtaining procedure......................................................................................................................24
Changing exceptions......................................................................................................................................................26
Changing API name.........................................................................................................................................................27
Changing API parameters .............................................................................................................................................28
Changing events ..............................................................................................................................................................29

4
Chapter 1 Migration Overview

Migration Overview
This manual explains how to use the ePOS-Print SDK for Windows store app (hereinafter referred to as "ePOS-
Print SDK") to modify developed applications so that they operate on Epson ePOS SDK for Universal Windows
apps (hereinafter referred to as "Epson ePOS SDK").
Modifying a program so that it operates on the Epson ePOS SDK APIs enables you to migrate to an application
that supports a universal Windows platform.
This can also support new products and new functions for Epson TM printers and peripherals.
For Epson ePOS SDK, use Visual Studio 2015 Update 1 or later.

5
Chapter 2 Migration from ePOS-Print SDK

Migration from ePOS-Print SDK


This chapter explains the method to perform migration of the applications that use ePOS-Print SDK to the
applications that are compatible with Epson ePOS SDK.

Migration with the Epson ePOS SDK APIs


You can perform migration to an Epson ePOS SDK-compatible application by modifying the existing applica-
tion program.

Migration procedure
The migration procedure is described below.

1
Procedure
Migrating the application
Description
Migrating the application project to Universal Windows apps while referencing
2
project to Universal Win- Microsoft's website
dows apps Refer to " Migrating the application project to Universal Windows apps".
2 Installing SDK Installing Epson ePOS SDK in the application project
Refer to " Installing Epson ePOS SDK".
3 Changing library references Changing the library references from ePOS-Print SDK to Epson ePOS SDK
Refer to " Changing library references".
4 Changing namespace Changing the namespace set in the application to the Epson ePOS SDK namespace
Refer to " Changing namespace".
5 Changing classes Changing the ePOS-Print SDK classes to the Epson ePOS SDK classes
Refer to " Changing classes name".

6
Chapter 2 Migration from ePOS-Print SDK

6 Changing APIs Modifying the program or changing the ePOS-Print SDK APIs that have different
specifications from those of Epson ePOS SDK
The changes are described below.
Modifying the program to enable specific functions
Modify the functions listed below.
Establishing and cutting the communication with the printer
Refer to " Establishing and cutting the communication with the printer".
Printing
Refer to " Printing".
Obtaining status
Refer to " Obtaining status".
Printer search
Refer to " Printer search".
Status monitoring
Refer to " Monitoring of the status".
Changing event obtaining procedure
Refer to " Changing event obtaining procedure".
Changing exceptions
Refer to " Changing exceptions". 2
Changing API name
API names to be changed (You may need to change parameters too)
Refer to " Changing API name".
Changing API parameters
API names do not change, but parameter changes are necessary.
Refer to " Changing API parameters".
Changing events
Refer to " Changing events".
7 Application building Building a project for the modified application.

This completes the migration with the Epson ePOS SDK API.

7
Chapter 2 Migration from ePOS-Print SDK

Migrating the application project to Universal Windows apps


Migrate the files of the Visual C# or Visual Basic application project so that they can use the Universal Windows
Platform.
The migration method is described on Microsoft's website. Refer to the following link and carry out the migra-
tion.
https://msdn.microsoft.com/library/mt148501.aspx

Installing Epson ePOS SDK


Install Epson ePOS SDK in the application project. For the installation procedure, refer to the environment con-
struction procedure in "Epson ePOS SDK for Universal Windows apps User's Manual".

Changing library references


2
Change the references in the application from the ePOS-Print SDK library to the Epson ePOS SDK library.
The change procedure is described below.

1 Open the applications project.

2 Select [References] on the solution explorer.

3 Right click [References], then select [Add Reference].

Reference Manager appears.

4 Select [Universal Windows] - [Extensions].


A list of installed SDKs appears.

8
Chapter 2 Migration from ePOS-Print SDK

5 Unselect [Epson ePOS-Print SDK] and [Microsoft Visual C++ 2013 Runtime Package
for Windows], then select [Epson ePOS SDK for Universal Windows apps] and [Visual
C++ 2015 Runtime for Universal Windows Platform Apps].

6 Click [OK].

9
Chapter 2 Migration from ePOS-Print SDK

Changing namespace
Change the namespace set in the application to the Epson ePOS SDK namespace.

Namespace to be added
Epson ePOS SDK Description
Epson.Epos.Epos2 Namespace for using general functions of Epson ePOS SDK.

Namespace to be changed
Type ePOS-Print SDK Epson ePOS SDK
Print class LibEposPrint Epson.Epos.Epos2.Printer
Builder class
Finder class Epson.Epos.Epos2.Discovery

Changing classes name 2


Change the ePOS-Print SDK classes used in the application project to Epson ePOS SDK classes.
Type ePOS-Print SDK Epson ePOS SDK
Printing functions Builder class Printer class
Print class
Printer search Finder class Discovery class
Exception EpoHResult class ErrorStatus class

10
Chapter 2 Migration from ePOS-Print SDK

Establishing and cutting the communication with the printer


ePOS-Print SDK and Epson ePOS SDK have different APIs for connecting and disconnecting communication
with the printer. Use the following as a reference when modifying your program.

Execution procedure differences

ePOS-Print SDK Epson ePOS SDK


Connection

Print.OpenPrinterAsync() Printer.ConnectAsync()

2
Disconnection

Print.ClosePrinterAsync() Printer.DisconnectAsync()

11
Chapter 2 Migration from ePOS-Print SDK

Program differences
ePOS-Print SDK

try
{
Print printer = new Print();

/*connection*/
await printer.OpenPrinterAsync(DevType.DEVTYPE_TCP, "192.168.192.168",
Monitoring.MONITORING_TRUE, Print.PARAM_DEFAULT, Print.PARAM_DEFAULT);
//...processing...

/*disconnection*/
await printer.ClosePrinterAsync();
}
catch (Exception ex)
{
//...processing...
}

Epson ePOS SDK


2
Printer printer = new Printer(Series.TM_T88, ModelLang.Ank);
try
{
/*connection*/
await printer.ConnectAsync("TCP:192.168.192.168", Printer.PARAM_DEFAULT);

//...processing...

/*disconnection*/
await printer.DisconnectAsync();
}
catch(Exception e)
{
//...processing...
}

12
Chapter 2 Migration from ePOS-Print SDK

Printing
ePOS-Print and Epson ePOS SDK have different procedures for executing the printing function. The print
result is not the return of SendDataAsync, but now is notified to the registered event handler. Use the following
as a reference when modifying your program.

Execution procedure differences

ePOS-Print SDK Epson ePOS SDK


Prerequisite

Create Print object Create Printer object

Create Builder object Register the event handler for the


print completion event 2
Print Data Creation

Builder.AddTextAlign(); Printer.AddAlign();

Builder.AddText() Printer.AddText()

Builder.Add****() Printer.Add****()

Connect to printer Connect to printer


Transmission

with Print object

Print.SendDataAsync(builder, 10000) Printer.SendDataAsync(10000)


Result Acquisition

Acquire with return of SendDataAsync Print result is notified to the


registered event handler

Callback:

13
Chapter 2 Migration from ePOS-Print SDK

Program differences
ePOS-Print SDK

Print printer = new Print();


PrinterStatus status;
status.printerStatus = 0;
status.batteryStatus = 0;

try
{
/*Prerequisite*/
Builder builder = new Builder("TM-T88V", ModelLang.MODEL_LANG_ANK);

/*Create print data*/


builder.AddText("ABCDE\n");

/*Send*/
await printer.OpenPrinterAsync(DevType.DEVTYPE_TCP,"192.168.192.168",
Monitoring.MONITORING_TRUE, Print.PARAM_DEFAULT, Print.PARAM_DEFAULT);

}
status = await printer.SendDataAsync(builder, 10000);
await printer.ClosePrinterAsync();
2
catch(Exception ex)
{
//...processing...
}

Epson ePOS SDK

private async void XXX()


{
try
{
/*Prerequisite*/
Printer printer = new Printer(Series.TM_T88, ModelLang.Ank);
printer.Received += Printer_Received;

/*Create print data*/


printer.AddText("ABCDE\n");

/*Send*/
//...Connecting...
await printer.SendDataAsync(Printer.PARAM_DEFAULT);
}
catch(Exception e)
{
//...processing...
}
}

private void Printer_Received(Printer sender, ReceivedEventArgs args)


{
/*Get result*/
//...processing...
}

14
Chapter 2 Migration from ePOS-Print SDK

Obtaining status
ePOS-Print and Epson ePOS SDK have different procedures for executing the status obtaining function. Use the
following as a reference when modifying your program.

Execution procedure differences

ePOS-Print SDK Epson ePOS SDK


Prerequisite

Connect to device Connect to device

PrinterStatus status =
Print.GetPrinterStatus()
PrinterStatusInfo status =
await Printer.GetStatusAsync()
2
status.Connection
Status Acquisition

[status.printerStatus & ST_NO_RESPONSE] [Connection.False]

Communication disabled Communication disabled

status.Online

[status.printerStatus & ST_OFF_LINE] [Online.False]

Offline Offline

status.BatteryLevel

[(status.batteryStatus & 0x00FF ) == 0x0036] [BatteryLevel.Level6]

Battery level 6 Battery level 6

15
Chapter 2 Migration from ePOS-Print SDK

Program differences
ePOS-Print SDK

PrinterStatus status;
status.printerStatus = 0;
status.batteryStatus = 0;

try
{
/*Prerequisite*/
Print printer = new Print();

/*Connect to device*/
await printer.OpenPrinterAsync(DevType.DEVTYPE_TCP, "192.168.192.168",
Monitoring.MONITORING_TRUE, Print.PARAM_DEFAULT, Print.PARAM_DEFAULT);

/*Obtaining status*/
status = await printer.GetStatusAsync();

//...processing...
if ((printerStatus & Print.ST_NO_RESPONSE) == Print.ST_NO_RESPONSE)
{
2
//no response
}

if ((printerStatus & Print.ST_OFF_LINE) == Print.ST_OFF_LINE)


{
//status offline
}

if ((batteryStatus & 0x00FF) == 0x0036)


{
//battery level6
}
await printer.ClosePrinterAsync();
}
catch (Exception ex)
{
//...processing...
}

16
Chapter 2 Migration from ePOS-Print SDK

Epson ePOS SDK

Printer printer = null;


PrinterStatusInfo status = null;

try
{
/*Prerequisite*/
//...connecting...

/*Obtaining status*/
status = await printer.GetStatusAsync();

if (status.Connection == Connection.False)
{
// no response
}

if (status.Online == Online.False)
{

}
// status offline
2
if (status.BatteryLevel == BatteryLevel.Level6)
{
// battery level 6
}
}
catch(Exception e)
{
//...processing...
}

17
Chapter 2 Migration from ePOS-Print SDK

Printer search
ePOS-Print and Epson ePOS SDK have different procedures for executing the printer search function. Use the
following as a reference when modifying your program.

Execution procedure differences

ePOS-Print SDK Epson ePOS SDK

FilterOption option = new FilterOption()


Search Start

Finder.StartAsync() Register the event handler for the

2
device detection event

Discovery.StartAsync(option)
Result Acquisition

Detected device is notified

Finder.GetDeviceInfoList()
When a device detection event occurs,
notification is sent to the event handler
Search End

Finder.StopAsync() Discovery.StopAsync()

Callback:

18
Chapter 2 Migration from ePOS-Print SDK

Program differences
ePOS-Print SDK

DeviceInfo[] list = null;

try
{
/*Search start*/
await Finder.StartAsync(IoDevType.TCP, "255.255.255.255");

/*Result acquisition*/
list = Finder.GetDeviceInfoList(IoFilterOption.DEFAULT);
string deviceName = "";
string ipAddress = "";
for(int index = 0; index < list.length; index++)
{
deviceName = list[index].DeviceName;
ipAddress = list[index].IpAddress;
}

/*Search end*/
await Finder.StopAsync();
2
}
catch (Exception ex)
{
//...processing...
}

19
Chapter 2 Migration from ePOS-Print SDK

Epson ePOS SDK

private async void StartDiscovery()


{
FilterOption option = new FilterOption();
Discovery.Discovered += Discovery_Discovered;

try
{
//Search start
await Discovery.StartAsync(option);
}
catch(Exception e)
{
//...processing...
}
}

private void Discovery_Discovered(DiscoveredEventArgs args)


{

}
/*Result acquisition*/
string target = args.DeviceInfo.Target; 2
private async void StopDiscovery()
{
try
{
//Stop search
await Discovery.StopAsync();

//Release
Discovery.Discovered -= Discovery_Discovered;
}
catch(Exception e)
{
//...processing...
}
}

20
Chapter 2 Migration from ePOS-Print SDK

Monitoring of the status


ePOS-Print and Epson ePOS SDK have different procedures for executing the status monitoring function. Use
the following as a reference when modifying your program.

Execution procedure differences

ePOS-Print SDK Epson ePOS SDK


Prerequisite

Create Printer object and start


Create Print object
communication with printer

Register the callback function to


be acquired
Register the event handler for the
status change event 2
Status Monitoring Start

Printer.Interval = 1000

Print.OpenPrinterAsync(1000)

Printer.StartMonitor()
Callback Notification

When a status changed When a status changed


event occurs, notification is sent to event occurs, notification is sent to
the registered callback function the registered event handler
Status Monitoring End

Print.ClosePrinterAsync() Printer.StopMonitor()

Callback:

21
Chapter 2 Migration from ePOS-Print SDK

Program differences
ePOS-Print SDK

private async void XXX()


{
/*Prerequisite*/
Print printer = new Print();

StatusChangeEvent statusChangeEvent = new StatusChangeEvent(Status_Change_Event);


printer.SetStatusChangeEventCallback(statusChangeEvent);

try
{
/*Status monitor start*/
await printer.OpenPrinterAsync(DevType.DEVTYPE_TCP,"192.168.192.168",
Monitoring.MONITORING_TRUE, Print.PARAM_DEFAULT, Print.PARAM_DEFAULT);

//...processing...

2
/*Status monitor end*/
await printer.ClosePrinterAsync();
}
catch(Exception ex)
{
//...processing...
}
}

private void Status_Change_Event(string deviceName, int status)


{
/*Status change event*/
}

22
Chapter 2 Migration from ePOS-Print SDK

Epson ePOS SDK

private Printer printer = null;

private async void XXX()


{
try
{
/*Prerequisite*/
printer = new Printer(Series.TM_T88, ModelLang.Ank);
printer.StatusChanged += _printer_StatusChanged;

//...connecting...

/*Status monitor start*/


printer.StartMonitor();

//...processing...

/*Status monitor end*/

}
printer.StopMonitor();

catch(Exception e)
2
{
//...processing...
}
}

private void _printer_StatusChanged(Printer sender, StatusChangedEventArgs args)


{
/*Status change event*/
}

23
Chapter 2 Migration from ePOS-Print SDK

Changing event obtaining procedure

Execution procedure differences

ePOS-Print SDK Epson ePOS SDK


Register the Callback Function

Create the SetStatusChangeEvent Class Object

Printer.StatusChanged +=
Event-handler-name

SetStatusChangeEventCallback
(StatusChangeEvent target)

2
Callback Function

void method-name void event-handler-name


(string deviceName, int status) (Printer sender, StatusChangedEventArgs args)

Callback:

24
Chapter 2 Migration from ePOS-Print SDK

Program differences
ePOS-Print SDK

private async void XXX()


{
Print printer = new Print();

/*Register the callback function*/


StatusChangeEvent statusChangeEvent = new StatusChangeEvent(Status_Change_Event);
printer.SetStatusChangeEventCallback(statusChangeEvent);
}

private void Status_Change_Event(string deviceName, int status)


{
/*Status change event*/
}

Epson ePOS SDK

private async void XXX()


2
{
try
{
printer = new Printer(Series.TM_T88, ModelLang.Ank);

/*Register the event handler*/


printer.StatusChanged += _printer_StatusChanged;
//...processing...
}
catch(Exception e)
{
//...processing...
{
}

private void _printer_StatusChanged(Printer sender, StatusChangedEventArgs args)


{
/*Status change event*/
}

25
Chapter 2 Migration from ePOS-Print SDK

Changing exceptions
In Epson ePOS SDK, the definition names for error statuses returned as exceptions were changed. The error statuses which
were renamed are listed in the table below.
In Epson ePOS SDK, exceptions only occur during errors. If an error is not occurring, an exception is not returned.
For detail of error statuses, refer to ePOS-Print SDK for Windows Store apps Users Manual or Epson ePOS SDK for
Universal Windows apps Users Manual.

A list of error status names to be changed


Function ePOS-Print SDK Epson ePOS SDK
Succeeded HR_S_OK -
An invalid parameter was passed HR_E_INVALIDARG ERR_PARAM
The process was timed out HR_E_ABORT ERR_TIMEOUT
Failed to communicate with the printer HR_E_ACCESSDENIED ERR_CONNECT
Could not secure the memory required for the process HR_E_OUTOFMEMORY ERR_MEMORY
Used in an illegal manner
Failed to execute the process.
HR_E_FAIL
HR_E_PENDING
ERR_ILLEGAL
ERR_PROCESSING
2
An unsupported model or language of use has been specified HR_E_INVALIDARG ERR_UNSUPPORTED
Another error occurred HR_E_FAIL ERR_FAILURE

26
Chapter 2 Migration from ePOS-Print SDK

Changing API name


During the migration from ePOS-Print SDK to Epson ePOS SDK, the APIs that need to renamed are listed in
the table below. In some cases, multiple APIs are bundled in one API, or one API is divided into several APIs.
Among the APIs in the table below, there are APIs where specifications other than the name have changed.
To see what has changed, compare APIs in the "ePOS-Print SDK for Windows Store apps User's Manual" and
"Epson ePOS SDK for Universal Windows apps User's Manual".

A list of API names to be changed


Function ePOS-Print SDK Epson ePOS SDK
Class initialization Print Printer
Builder
Adding the text line space settings to the AddTextLineSpace AddLineSpace
instruction buffer
Adding the character size settings to the AddTextDouble AddTextSize
instruction buffer
Adding the text printing position settings AddTextPosition AddHPosition
2
to the instruction buffer
Starting communication OpenPrinterAsync ConnectAsync
Starting status monitoring StartMonitor
Terminating communication ClosePrinterAsync DisconnectAsync
Terminating status monitoring StopMonitor
Registering the notification destination of SetStatusChangeEventCallback StatusChanged
printer statuses
Registering the notification destination of SetOnlineEventCallback
online events
Registering the notification destination of SetOfflineEventCallback
offline events
Registering the notification destination of SetPowerOffEventCallback
power-off events
Registering the notification destination of SetCoverOkEventCallback
cover-closed events
Registering the notification destination of SetCoverOpenEventCallback
cover-open events
Registering the notification destination of SetPaperOkEventCallback
paper OK events
Registering the notification destination of SetPaperNearEndEventCallback
paper near-end events
Registering the notification destination of SetPaperEndEventCallback
paper end events
Registering the notification destination of SetDrawerClosedEventCallback
drawer-closed events
Registering the notification destination of SetDrawerOpenEventCallback
drawer-open events
Registering the notification destination of SetBatteryLowEventCallback
battery-low events
Registering the notification destination of SetBatteryOkEventCallback
battery level OK events

27
Chapter 2 Migration from ePOS-Print SDK

Function ePOS-Print SDK Epson ePOS SDK


Registering the notification destination of SetBatteryStatusChangeEventCall- StatusChanged
battery statuses back
Obtaining printer search results GetDeviceInfoList Discovered
GetResult

Changing API parameters


The APIs where the parameters need to be changed when migrating from ePOS-Print SDK to Epson ePOS SDK
are listed in the table below.
To see what has changed, compare APIs in the ePOS-Print SDK for Windows Store apps Users Manual and
Epson ePOS SDK for Universal Windows apps Users Manual.
API Parameter change
AddTextAlign Change from Builder class to Printer class
AddTextRotate
AddTextLang
Change from Builder class to Printer class
Change from Builder class to Printer class
2
AddTextFont Change from Builder class to Printer class
AddTextSmooth Change from Builder class to Printer class
AddTextSize Change from Builder class to Printer class
AddTextStyle Change from Builder class to Printer class
AddImageAsync Change from Builder class to Printer class
AddBarcode Change from Builder class to Printer class
AddSymbol Change from Builder class to Printer class
AddPageDirection Change from Builder class to Printer class
AddPagePosition Change from Builder class to Printer class
AddPageLine Change from Builder class to Printer class
AddPageRectangle Change from Builder class to Printer class
AddCut Change from Builder class to Printer class
AddSound Change from Builder class to Printer class
AddLayout Change from Builder class to Printer class
SendDataAsync Change to time out only
GetStatusAsync Remove parameters and change to unsynchronized function

28
Chapter 2 Migration from ePOS-Print SDK

Changing events
The events that need to be changed or deleted when migrating from ePOS-Print SDK to Epson ePOS SDK are
listed in the tables below.
To see what has changed, compare the APIs that register event notification methods in "ePOS-Print SDK for
Windows Store apps User's Manual" and "Epson ePOS SDK for Universal Windows apps User's Manual".

Events to be changed
ePOS-Print SDK Epson ePOS SDK
Function How to register event notifications
Notification Method
Printer status notification public void SetStatusChangeEventCall- public event Windows.Founda-
back(LibEposPrint.StatusChangeEvent tar- tion.TypedEvent Handler<Printer,
get); Printer.StatusChangedEventArgs > Status-
Changed
void method-name (string deviceName, int
status);
void method-name (Printer sender,
Printer.StatusChangeEventArgs args);
2
Events to be deleted
How to register event notifications
Function
Notification Method
Notification of online public void SetOnlineEventCallback(LibEposPrint.OnlineEvent target);
event void method-name (string deviceName);
Notification of offline public void SetOfflineEventCallback(LibEposPrint.OfflineEvent target);
event void method-name (string deviceName);
Notification of power-off public void SetPowerOffEventCallback(LibEposPrint.PowerOffEvent target);
event void method-name (string deviceName);
Notification of cover public void SetCoverEventCallback(LibEposPrint.CoverOpenEvent target);
closed void method-name (string deviceName);
Notification of cover open public void SetCoverOpenEventCallback(LibEposPrint.CoverOpenEvent target);
void method-name (string deviceName);
Notification of paper OK public void SetPaperOkEventCallback(LibEposPrint.PaperOkEvent target);
void method-name (string deviceName);
Notification of paper near- public void SetPaperNearEndEventCallback(LibEposPrint.PaperNearEndEvent target);
end void method-name (string deviceName);
Notification of paper end public void SetPaperEndEventCallback(LibEposPrint.PaperEndEvent target);
void method-name (string deviceName);
Notification of drawer public void SetDrawerClosedEventCallback(LibEposPrint.DrawerClosedEvent target);
closed void method-name (string deviceName);
Notification of drawer public void SetDrawerOpenEventCallback(LibEposPrint.DrawerOpenEvent target);
open void method-name (string deviceName);
Notification of battery low public void SetBatteryLowEventCallback(LibEposPrint.BatteryLowEvent target);
void method-name (string deviceName);
Notification of battery public void SetBatteryOkEventCallback(LibEposPrint.BatteryOkEvent target);
level OK void method-name (string deviceName);

29
Chapter 2 Migration from ePOS-Print SDK

Notification of battery sta- public void SetBatteryStatusChangeEventCallback(LibEposPrint.BatteryStatusChangeEvent


tus target);
void method-name (string deviceName, int battery);

30

Вам также может понравиться