Select your printer model

Parameters are refined by the selected printer.

resetMaintenanceCounter


Resets the value of the printer's maintenance counter.

The value acquired by this API is notified to the listener method specified in the listener parameter.

Syntax

 
public void resetMaintenanceCounter(int timeout, int type, MaintenanceCounterListener listener) throws Epos2Exception

Parameter

timeout

Specifies the timeout period before completion of printing in milliseconds.

Value

Description

Integer from 5000 to 600000

Timeout period (in milliseconds)

Printer.PARAM_DEFAULT

Specifies the default value (10000).

type

Specifies the type of maintenance counter to be reset.

Value

Description

Printer.MaintenanceCounter.PaperFeed

Number of paper feed lines

Printer.MaintenanceCounter.AutoCutter

Number of times auto cutter is operated

listener

Registers the listener method that returns the processing result of this API.

 
- (void) onResetMaintenanceCounter(int code, int type);
  • code
    The processing result is stored.
  • Error status

    Description

    CODE_SUCCESS

    Processed successfully.

    CODE_ERR_AUTORECOVER

    Automatic recovery error occurred.

    CODE_ERR_COVER_OPEN

    Cover open error occurred.

    CODE_ERR_CUTTER

    Auto cutter error occurred.

    CODE_ERR_MECHANICAL

    Mechanical error occurred.

    CODE_ERR_EMPTY

    No paper is left in the roll paper end detector.

    CODE_ERR_PARAM

    An invalid parameter was passed.

    CODE_ERR_MEMORY

    Memory necessary for processing could not be allocated.

    CODE_ERR_TIMEOUT

    Failed to communicate with the devices within the specified time.

    CODE_ERR_PROCESSING

    Could not run the process.

    CODE_ERR_ILLEGAL

    This API was called while no communication had been started.

    CODE_ERR_FAILURE

    An unknown error occurred.

  • type
    The type of maintenance counter reset is stored.

Exception

When the process fails, Epos2Exception with one of the following error status occurs.

Error status

Description

ERR_PARAM

An invalid parameter was passed.

ERR_FAILURE

An unknown error occurred.

Supplementary explanation

  • This API cannot be used simultaneously with other APIs.
    After executing this API, do not execute any other API until the callback is returned.
  • Do not turn off the power supply to the printer while executing this API.
  • Do not execute this API more than 10 times per day. If executed more than this number of times, the printer may become unable to operate.
  • This API can be used in the system configuration of the TM printer model and customer display model.
    With the system configuration of the TM Printer + DM-D + barcode scanner model, this API can be used when connecting via Bluetooth or USB.
  • This API cannot be used with SSL/TLS communication.
 

Quick Access

  • [Name]
  • [Format]
  • [Range]
  • [Description]
  • [Notes]

Epson ePOS SDK includes patented or patent pending functions. The contents must not be disclosed to third parties.


Epson ePOS SDK for Android

Jump to the top