BRPtouchPrinterStatus
BRPtouchPrinterStatus class contains the status information of the printer.
Properties
statusInfo
The raw status information retrieved from the printer.
Declaration
@property (nonatomic) PTSTATUSINFO statusInfo;
batteryResidualQuantityLevel
The remaining battery level.
Declaration
@property (nonatomic) int32_t batteryResidualQuantityLevel;
maxOfBatteryResidualQuantityLevel
The maximum battery level.
Declaration
@property (nonatomic) int32_t maxOfBatteryResidualQuantityLevel;
isACConnected
Indicates whether the AC adapter is connected. BRPtouchPrinterStatusBatteryTernaryUnknown is stored if unknown.
Declaration
@property (nonatomic) BRPtouchPrinterStatusBatteryTernary isACConnected;
isBatteryMounted
Indicates whether the battery adapter is mounted. BRPtouchPrinterStatusBatteryTernaryUnknown is stored if unknown.
Declaration
@property (nonatomic) BRPtouchPrinterStatusBatteryTernary isACConnected;
Types
PTSTATUSINFO
Refer to the raster command reference of each model for the detail.
Declaration
typedef struct _PTSTATUSINFO {
Byte byHead;
Byte bySize;
Byte byBrotherCode;
Byte bySeriesCode;
Byte byModelCode;
Byte byNationCode;
Byte byFiller;
Byte byFiller2;
Byte byErrorInf;
Byte byErrorInf2;
Byte byMediaWidth;
Byte byMediaType;
Byte byColorNum;
Byte byFont;
Byte byJapanesFont;
Byte byMode;
Byte byDensity;
Byte byMediaLength;
Byte byStatusType;
Byte byPhaseType;
Byte byPhaseNoHi;
Byte byPhaseNoLow;
Byte byNoticeNo;
Byte byExtByteNum;
Byte byLabelColor;
Byte byFontColor;
Byte byHardWareSetting[4];
Byte byNoUse[2];
} PTSTATUSINFO, *LPPTSTATUSINFO;
Info
byMediaWidth and byMediaLength are rounded to the nearest 1 mm. Some models cannot be obtained, in which case 0 is assigned.
BRPtouchPrinterStatusBatteryTernary
enum to indicate yes, no or unknown.
Declaration
typedef NS_ENUM(NSInteger, BRPtouchPrinterStatusBatteryTernary) {
BRPtouchPrinterStatusBatteryTernaryUnknown = -1,
BRPtouchPrinterStatusBatteryTernaryYes = 1,
BRPtouchPrinterStatusBatteryTernaryNo = 0,
};
Notes
Values of batteryLevel
MW-260, MW-260 Type A, MW-260MFi
| Value | Description |
|---|---|
| -1 | Failed to retrieve battery level |
| 0 - 100 | 0 (empty) - 100 (full) |
MW-145BT, MW-145MFi, MW-170, MW-270
| Value | Description |
|---|---|
| -1 | Failed to retrieve battery level |
| 1 | Battery weak |
| 2 | Battery medium |
| 3 | Battery full |
PJ series (except PJ-7xx)
| Value | Description |
|---|---|
| -1 | Failed to retrieve battery level |
| 0 | Connected to AC adapter or fully-charged lithium-ion battery |
| 1 | Battery weak |
| 2 | Battery medium |
| 3 | Battery full |
RJ series, PT series, TD-2xxx series, PJ-7xx series, QL-8xx series
| Value | Description |
|---|---|
| -1 | Failed to retrieve battery level |
| 4 | Connected to AC adapter |
| 3 | Battery needs charging |
| 2 | Battery weak |
| 1 | Battery medium |
| 0 | Battery full |
MW-140BT, No battery models
| Value | Description |
|---|---|
| -1 | Not supported |
Deprecates
Deprecated
batteryLevel
Please use maxOfBatteryResidualQuantityLevel, batteryResidualQuantityLevel, isACConnected, isBatteryMounted instead.