Skip to content

BRLMPrinterBatteryStatus

A class for battery status.

Overview

You use this object to know about battery in your printer.

Properties

batteryMounted

Whether a battery is mounted or not.

Declaration

@property (nonatomic, readonly) BRLMPrinterBatteryStatusTernary batteryMounted;

Return Value See BRLMPrinterBatteryStatusTernary.

charging

Whether a battery is charging or not.

Declaration

@property (nonatomic, readonly) BRLMPrinterBatteryStatusTernary charging;

Return Value

See BRLMPrinterBatteryStatusTernary.

chargeLevel

Get battery remaining.

Declaration

@property (nonatomic, readonly) BRLMPrinterBatteryStatusFraction chargeLevel;

Return Value

See BRLMPrinterBatteryStatusFraction.

Types

BRLMPrinterBatteryStatusTernary

Declaration

typedef NS_ENUM(NSInteger, BRLMPrinterBatteryStatusTernary) {
    BRLMPrinterBatteryStatusTernaryYes,
    BRLMPrinterBatteryStatusTernaryNo,
    BRLMPrinterBatteryStatusTernaryUnknown,
};

BRLMPrinterBatteryStatusFraction

A Structure representing a fraction. For example, if max is 3, current can be 0, 1, 2, or 3.

Declaration

typedef struct {
    // min is 0
    int max;
    int current;
} BRLMPrinterBatteryStatusFraction;