ESC SDK 完整索引
本索引按语言收录固定版本中该模块的全部命令参数源文件和枚举。EMAPI 收录命令工厂、载荷、会话和编解码入口;C 收录兼容接口。展开查看参数声明摘录,通过固定版本源码链接核对完整默认值、条件分支和序列化。标题中的命令头预览来自源码字面量,不是完整的指令格式。
声明保留实现中已有的差异。收录表示存在对应实现,不表示所有打印机都支持。发送前请查阅兼容性与验证。
源文件数: 322.
ebacklinedot.dart — 10 FF 81
class EBackLineDot extends BasicESCArg<EBackLineDot> { late int _dot; EBackLineDot({ required int dot, }) {ebackpapera.dart — 1F 11 10 00 20
class EBackPaperA extends OnlyBinaryHeaderArg<EBackPaperA> {ebatteryvolume.dart — 10 FF 50 F1
class EBatteryVolume extends OnlyBinaryHeaderArg<EBatteryVolume> {echangespeeda.dart — 1F 60 02 02
class EChangeSpeedA extends OnlyBinaryHeaderArg<EChangeSpeedA> {eenablegray.dart — 10 FF BD 02
class EEnableGray extends OnlyBinaryHeaderArg<EEnableGray> {eenablemode.dart — 10 FF BD
class EEnableMode extends BasicESCArg<EEnableMode> { late int _mode; EEnableMode({ required int mode, }) {egapsensor.dart — 10 FF 05
class EGapSensor extends BasicESCArg<EGapSensor> { late int _guangqiang; EGapSensor({required int guangqiang}) {egetpapertypeq3.dart — 10 FF 85
class EGetPaperTypeQ3 extends OnlyBinaryHeaderArg<EGetPaperTypeQ3> {egetshutdowntime.dart — 10 FF 13
class EGetShutdownTime extends OnlyBinaryHeaderArg<EGetShutdownTime> {egetsystemlanguage.dart — 10 FF 31 0B 03
class EGetSystemLanguage extends OnlyBinaryHeaderArg<EGetSystemLanguage> {egetwifiname.dart — 10 FF 31 03
class EGetWifiName extends OnlyBinaryHeaderArg<EGetWifiName> {egetwifista.dart — 10 FF 31 01
class EGetWifiSta extends OnlyBinaryHeaderArg<EGetWifiSta> {eimage.dart — 1F 00 1D 76 30
class EImage extends BasicESCArg<EImage> { late Uint8List _image; late Mode _mode; late int? _threshold; late bool _compress; late bool _reverse; late int _smoothWeight; late ThresholdEdgeDitherMode? _edgeDitherMode; late ThresholdEdgeDitherDepth _edgeDitherDepth; EImage({ required Uint8List image, bool compress = false, bool reverse = false, Mode mode = Mode.normal, int? threshold, int smoothWeight = 0, ThresholdEdgeDitherMode? edgeDitherMode, ThresholdEdgeDitherDepth edgeDitherDepth = ThresholdEdgeDitherDepth.shallow, }) {eimagea.dart — 1F 10 1D 76 30
class EImageA extends BasicESCArg<EImageA> { late Uint8List _image; late Mode _mode; late int? _threshold; late bool _compress; late bool _reverse; late int _smoothWeight; late ThresholdEdgeDitherMode? _edgeDitherMode; late ThresholdEdgeDitherDepth _edgeDitherDepth; EImageA({ required Uint8List image, bool compress = false, bool reverse = false, Mode mode = Mode.normal, int? threshold, int smoothWeight = 0, ThresholdEdgeDitherMode? edgeDitherMode, ThresholdEdgeDitherDepth edgeDitherDepth = ThresholdEdgeDitherDepth.shallow, }) {eimagegray.dart — 1D 76 30 00
class EImageGray extends BasicESCArg<EImageGray> { late Uint8List _image; late bool _compress; late bool _reverse; EImageGray({ required Uint8List image, bool compress = false, bool reverse = false, }) {elearnlabelgap.dart — 10 FF 03
class ELearnLabelGap extends OnlyBinaryHeaderArg<ELearnLabelGap> {eline.dart — 00 01
class ELine extends BasicESCArg<ELine> { late int _x; late int _y; ELine({ required int x, required int y, }) {elinedot.dart — 1B 4A
class ELineDot extends BasicESCArg<ELineDot> { late int _dot; ELineDot({ required int dot, }) {elinedotcut.dart — 1D 56 42 01
class ELineDotCut extends OnlyBinaryHeaderArg<ELineDotCut> {elinerow.dart — 1B 64
class ELineRow extends BasicESCArg<ELineRow> { late int _row; ELineRow({ required int row, }) {elocation.dart — 1B 61
class ELocation extends BasicESCArg<ELocation> { late int _location; ELocation({ required int location, }) {enfcrestlength.dart — 10 FF 35 23
class ENfcRestLength extends OnlyBinaryHeaderArg<ENfcRestLength> {enfcusedlength.dart — 10 FF 35 22
class ENfcUsedLength extends OnlyBinaryHeaderArg<ENfcUsedLength> {epapertype.dart — 10 FF 10 03
class EPaperType extends BasicESCArg<EPaperType> { late Type _type; EPaperType({ Type type = Type.foldedBlackLabelPaper, }) {enum Type { int getType() {epapertypeq3.dart — 10 FF 84
class EPaperTypeQ3 extends BasicESCArg<EPaperTypeQ3> { late TypeQ3 _type; EPaperTypeQ3({ TypeQ3 type = TypeQ3.continuousReelPaper, }) {enum TypeQ3 { int getType() {eprinterversion.dart — 10 FF 20 F1
class EPrinterVersion extends OnlyBinaryHeaderArg<EPrinterVersion> {eresetnetworkinfo.dart — 10 FF 33 05
class EResetNetworkInfo extends OnlyBinaryHeaderArg<EResetNetworkInfo> {esetcalendarmode.dart — 10 FF 31 0B
class ESetCalendarMode extends BasicESCArg<ESetCalendarMode> { late int _mode; ESetCalendarMode({ required int mode, }) {esetcmd.dart — 10 FF 79
class ESetCmd extends BasicESCArg<ESetCmd> { late int _cmd; ESetCmd({ required int cmd, }) {esetcurrenttime.dart — 10 FF 14 02
class ESetCurrentTime extends BasicESCArg<ESetCurrentTime> { late int _second; late int _minute; late int _hour; late int _day; late int _week; late int _month; late int _year; ESetCurrentTime({ required int second, required int minute, required int hour, required int day, required int week, required int month, required int year, }) {esetgapdac.dart — 10 FF 06
class ESetGapDac extends BasicESCArg<ESetGapDac> { late int _guangqiang; ESetGapDac({required int guangqiang}) {esethost.dart — 10 FF 31 06
class ESetHost extends BasicESCArg<ESetHost> { late List<String> _hosts; ESetHost({required List<String> hosts}) { final joined = _hosts.join('|');esetkey.dart — 10 FF 31 07
class ESetKey extends BasicESCArg<ESetKey> { late String _key; ESetKey({required String key}) {esetshutdowntime.dart — 10 FF 12
class ESetShutdownTime extends BasicESCArg<ESetShutdownTime> { late int _time; ESetShutdownTime({ required int time, }) {esetstandbyimage.dart
class ESetStandbyImage { static final Uint8List _hdrStart = static final Uint8List _hdrData = static final Uint8List _hdrEnd = static const int _srcSend = 0x01; static const int _endMarker = 0x5A; static const int _defaultFragmentSize = 1024; static const int _defaultTimeoutMs = 5000; final ConnectedDevice _device; final Uint8List _imageData; final int _fragmentSize; final int _timeoutMs; ESetStandbyImage({ required ConnectedDevice device, required Uint8List imageData, int fragmentSize = _defaultFragmentSize, int timeoutMs = _defaultTimeoutMs, }) : _device = device, _imageData = imageData, _fragmentSize = fragmentSize, _timeoutMs = timeoutMs { if (imageData.isEmpty) { Future<void> send() async { final startReply = await _sendStartPacket(); final totalFragments = final offset = seq * _fragmentSize; final len = (offset + _fragmentSize <= _imageData.length) ? _fragmentSize : _imageData.length - offset; final fragment = Uint8List.sublistView(_imageData, offset, offset + len); final dataReply = await _sendDataPacket(seq, fragment); final endReply = await _sendEndPacket(true); Future<Uint8List> _sendStartPacket() async { final dataField = _toUint32LE(_imageData.length); final frame = _buildFrame(_hdrStart, _srcSend, dataField); Future<Uint8List> _sendDataPacket(int seq, Uint8List fragment) async { final seqLE = _toUint16LE(seq); final fragLenLE = _toUint16LE(fragment.length); final dataField = _concat([seqLE, fragLenLE, fragment]); final frame = _buildFrame(_hdrData, _srcSend, dataField); Future<Uint8List> _sendEndPacket(bool normalEnd) async { final status = normalEnd ? 0 : 1; final fieldLE = _toUint16LE(1); // 字段长度 = 1(状态字节) final dataField = _concat([ fieldLE, Uint8List.fromList([status]) ]); final frame = _buildFrame(_hdrEnd, _srcSend, dataField); final dataLenLE = _toUint16LE(dataField.length); final preChecksum = _concat([ header, Uint8List.fromList([srcType]), dataLenLE, dataField, ]); final checksum = _calcChecksum(dataField); void _validateReply(Uint8List reply, Uint8List header, String context) { final statusIdx = header.length + 1 + 2; final status = reply[statusIdx]; Future<Uint8List> _writeAndRead(Uint8List data) async { await _device.write(data); final totalLen = arrays.fold<int>(0, (sum, a) => sum + a.length); final result = Uint8List(totalLen);class ESetStandbyImageException implements Exception { final String message; ESetStandbyImageException(this.message); String toString() => 'ESetStandbyImageException: $message';esetstandbymode.dart — 10 FF 31 0B
class ESetStandbyMode extends BasicESCArg<ESetStandbyMode> { late int _mode; ESetStandbyMode({required int mode}) {esetsystemlanguage.dart — 10 FF 31 0B
class ESetSystemLanguage extends BasicESCArg<ESetSystemLanguage> { late int _language; ESetSystemLanguage({required int language}) {esetwifi.dart — 10 FF 31 02
class ESetWifi extends BasicESCArg<ESetWifi> { late String _ssid; late String _password; ESetWifi({ required String ssid, required String password, int mode = 0, }) { final List<int> ssidByte = utf8.encode(_ssid); final List<int> passwordByte = utf8.encode(_password); final List<int> ssidCmd = [0x01, ssidByte.length, 0x00]; final List<int> pwdCmd = [0x02, passwordByte.length, 0x00]; final List<int> modeCmd = [0x03, 0x01, 0x00, _mode]; final int totalLength = ssidCmd.length + final List<int> cmdLength = [totalLength, 0x00];ethickness.dart — 10 FF 10 00
class EThickness extends BasicESCArg<EThickness> { late int _thickness; EThickness({ required int thickness, }) {ewakeup.dart — 00 00 00 00 00 00 00 00 00 00 00 00
class EWakeup extends OnlyBinaryHeaderArg<EWakeup> {advanced.go — 10 FF BD 02
type EEnableGray struct { BaseESCArg Enable bool // 是否启用灰度}func NewEEnableGray() *EEnableGray {func (e *EEnableGray) SetEnable(enable bool) *EEnableGray {func (e *EEnableGray) Header() []byte {func (e *EEnableGray) Clause() *command.Clause {type EStopJob struct { BaseESCArg}func NewEStopJob() *EStopJob {func (e *EStopJob) Header() []byte {func (e *EStopJob) Clause() *command.Clause {type ELineDotCut struct { BaseESCArg Dot int // 进纸点数}func NewELineDotCut() *ELineDotCut {func (e *ELineDotCut) SetDot(dot int) *ELineDotCut {func (e *ELineDotCut) Header() []byte {func (e *ELineDotCut) Clause() *command.Clause {type EBTType struct { BaseESCArg BTType int // 蓝牙类型}func NewEBTType() *EBTType {func (e *EBTType) SetBTType(btType int) *EBTType {func (e *EBTType) Header() []byte {func (e *EBTType) Clause() *command.Clause {type ENN struct { BaseESCArg Value int // NN值}func NewENN() *ENN {func (e *ENN) SetValue(value int) *ENN {func (e *ENN) Header() []byte {func (e *ENN) Clause() *command.Clause {control.go — 10 FF 10 00
type EThickness struct { BaseESCArg Thickness int // 线条粗细 1-8}func NewEThickness() *EThickness {func (e *EThickness) SetThickness(thickness int) *EThickness {func (e *EThickness) Header() []byte {func (e *EThickness) Clause() *command.Clause {type EEnable struct { BaseESCArg}func NewEEnable() *EEnable {func (e *EEnable) Header() []byte {func (e *EEnable) Clause() *command.Clause {func (e *EEnable) Newline() bool {type EFooter struct { BaseESCArg}func NewEFooter() *EFooter {func (e *EFooter) Header() []byte {func (e *EFooter) Clause() *command.Clause {func (e *EFooter) Newline() bool {type ECut struct { BaseESCArg}func NewECut() *ECut {func (e *ECut) Header() []byte {func (e *ECut) Clause() *command.Clause {image.go — 1F 00 1D 76 30
type ImageMode intconst (func (m ImageMode) GetMode() int {type EImage struct { BaseESCArg ImageData []byte // 图片数据 Mode ImageMode // 图片模式 Compress bool // 图片是否压缩(默认不压缩) Reverse bool // 图片是否反色(默认不反色) GrayThreshold int // 二值化0-255(默认190) Width int // 图片宽度 Height int // 图片高度}func NewEImage() *EImage {func (e *EImage) SetImageData(data []byte) *EImage {func (e *EImage) SetMode(mode ImageMode) *EImage {func (e *EImage) SetCompress(compress bool) *EImage {func (e *EImage) SetReverse(reverse bool) *EImage {func (e *EImage) SetGrayThreshold(threshold int) *EImage {func (e *EImage) SetSize(width, height int) *EImage {func (e *EImage) Header() []byte {func (e *EImage) Clause() *command.Clause {type EImageGray struct { BaseESCArg ImageData []byte // 图片数据 Width int // 图片宽度 Height int // 图片高度}func NewEImageGray() *EImageGray {func (e *EImageGray) SetImageData(data []byte) *EImageGray {func (e *EImageGray) SetSize(width, height int) *EImageGray {func (e *EImageGray) Header() []byte {func (e *EImageGray) Clause() *command.Clause {info.go — 10 FF 70
type EInfo struct { BaseESCArg}func NewEInfo() *EInfo {func (e *EInfo) Header() []byte {func (e *EInfo) Clause() *command.Clause {func (e *EInfo) Newline() bool {type EMac struct { BaseESCArg}func NewEMac() *EMac {func (e *EMac) Header() []byte {func (e *EMac) Clause() *command.Clause {func (e *EMac) Newline() bool {type EName struct { BaseESCArg}func NewEName() *EName {func (e *EName) Header() []byte {func (e *EName) Clause() *command.Clause {func (e *EName) Newline() bool {type EModel struct { BaseESCArg}func NewEModel() *EModel {func (e *EModel) Header() []byte {func (e *EModel) Clause() *command.Clause {func (e *EModel) Newline() bool {type EPrinterVersion struct { BaseESCArg}func NewEPrinterVersion() *EPrinterVersion {func (e *EPrinterVersion) Header() []byte {func (e *EPrinterVersion) Clause() *command.Clause {func (e *EPrinterVersion) Newline() bool {line.go — 00 01
type ELine struct { BaseESCArg X int // 线条x坐标 Y int // 线条y坐标}func NewELine() *ELine {func (e *ELine) SetPosition(x, y int) *ELine {func (e *ELine) Header() []byte {func (e *ELine) Clause() *command.Clause {type ELineDot struct { BaseESCArg Dot int // 进纸点数}func NewELineDot() *ELineDot {func (e *ELineDot) SetDot(dot int) *ELineDot {func (e *ELineDot) Header() []byte {func (e *ELineDot) Clause() *command.Clause {type EBackLineDot struct { BaseESCArg Dot int // 回纸点数}func NewEBackLineDot() *EBackLineDot {func (e *EBackLineDot) SetDot(dot int) *EBackLineDot {func (e *EBackLineDot) Header() []byte {func (e *EBackLineDot) Clause() *command.Clause {location.go — 1B 61
type Location intconst (func (l Location) GetLocation() byte {type ELocation struct { BaseESCArg Location Location // 打印位置(默认居中)}func NewELocation() *ELocation {func (e *ELocation) SetLocation(location Location) *ELocation {func (e *ELocation) Header() []byte {func (e *ELocation) Clause() *command.Clause {type EPosition struct { BaseESCArg X int // X坐标 Y int // Y坐标}func NewEPosition() *EPosition {func (e *EPosition) SetPosition(x, y int) *EPosition {func (e *EPosition) Header() []byte {func (e *EPosition) Clause() *command.Clause {nfc.go — 10 FF 35 21
type ENfcUID struct { BaseESCArg}func NewENfcUID() *ENfcUID {func (e *ENfcUID) Header() []byte {func (e *ENfcUID) Clause() *command.Clause {func (e *ENfcUID) Newline() bool {type ENfcPaper struct { BaseESCArg}func NewENfcPaper() *ENfcPaper {func (e *ENfcPaper) Header() []byte {func (e *ENfcPaper) Clause() *command.Clause {func (e *ENfcPaper) Newline() bool {type ENfcUsedLength struct { BaseESCArg}func NewENfcUsedLength() *ENfcUsedLength {func (e *ENfcUsedLength) Header() []byte {func (e *ENfcUsedLength) Clause() *command.Clause {func (e *ENfcUsedLength) Newline() bool {type ENfcRestLength struct { BaseESCArg}func NewENfcRestLength() *ENfcRestLength {func (e *ENfcRestLength) Header() []byte {func (e *ENfcRestLength) Clause() *command.Clause {func (e *ENfcRestLength) Newline() bool {paper.go — 10 FF 10 03
type PaperType intconst (type EPaperType struct { BaseESCArg PaperType PaperType // 纸张类型}func NewEPaperType() *EPaperType {func (e *EPaperType) SetPaperType(paperType PaperType) *EPaperType {func (e *EPaperType) Header() []byte {func (e *EPaperType) Clause() *command.Clause {func (e *EPaperType) Newline() bool {type EPaperTypeQ3 struct { BaseESCArg}func NewEPaperTypeQ3() *EPaperTypeQ3 {func (e *EPaperTypeQ3) Header() []byte {func (e *EPaperTypeQ3) Clause() *command.Clause {func (e *EPaperTypeQ3) Newline() bool {type EGetPaperTypeQ3 struct { BaseESCArg}func NewEGetPaperTypeQ3() *EGetPaperTypeQ3 {func (e *EGetPaperTypeQ3) Header() []byte {func (e *EGetPaperTypeQ3) Clause() *command.Clause {func (e *EGetPaperTypeQ3) Newline() bool {type ELearnLabelGap struct { BaseESCArg}func NewELearnLabelGap() *ELearnLabelGap {func (e *ELearnLabelGap) Header() []byte {func (e *ELearnLabelGap) Clause() *command.Clause {status.go — 10 FF 50 F1
type EBatteryVolume struct { BaseESCArg}func NewEBatteryVolume() *EBatteryVolume {func (e *EBatteryVolume) Header() []byte {func (e *EBatteryVolume) Clause() *command.Clause {func (e *EBatteryVolume) Newline() bool {type EState struct { BaseESCArg}func NewEState() *EState {func (e *EState) Header() []byte {func (e *EState) Clause() *command.Clause {func (e *EState) Newline() bool {type ESN struct { BaseESCArg}func NewESN() *ESN {func (e *ESN) Header() []byte {func (e *ESN) Clause() *command.Clause {func (e *ESN) Newline() bool {type EVersion struct { BaseESCArg}func NewEVersion() *EVersion {func (e *EVersion) Header() []byte {func (e *EVersion) Clause() *command.Clause {func (e *EVersion) Newline() bool {time.go — 10 FF B0 01 01
type ESetCurrentTime struct { BaseESCArg Time time.Time // 设置的时间}func NewESetCurrentTime() *ESetCurrentTime {func (e *ESetCurrentTime) SetTime(t time.Time) *ESetCurrentTime {func (e *ESetCurrentTime) Header() []byte {func (e *ESetCurrentTime) Clause() *command.Clause {type ESetShutdownTime struct { BaseESCArg Minutes int // 关机延迟分钟数}func NewESetShutdownTime() *ESetShutdownTime {func (e *ESetShutdownTime) SetMinutes(minutes int) *ESetShutdownTime {func (e *ESetShutdownTime) Header() []byte {func (e *ESetShutdownTime) Clause() *command.Clause {type EGetShutdownTime struct { BaseESCArg}func NewEGetShutdownTime() *EGetShutdownTime {func (e *EGetShutdownTime) Header() []byte {func (e *EGetShutdownTime) Clause() *command.Clause {func (e *EGetShutdownTime) Newline() bool {type EWakeup struct { BaseESCArg}func NewEWakeup() *EWakeup {func (e *EWakeup) Header() []byte {func (e *EWakeup) Clause() *command.Clause {EBTType.java — 1F B2 10
public class EBTType extends OnlyBinaryHeaderArg<EBTType> { public byte[] header() {EBackLineDot.java — 10 FF 81
public class EBackLineDot extends BasicESCArg<EBackLineDot> { private int dot; public byte[] header() { public CommandClause clause() {EBatteryVolume.java — 10 FF 50 F1
public class EBatteryVolume extends OnlyBinaryHeaderArg<EBatteryVolume> implements BasicBatteryVolumeArg<byte[]> { public byte[] header() {EBindDevice.java — 10 FF 33 01
public class EBindDevice extends BasicESCArg<EBindDevice> { private String onceCode; private String serverBaseUrl; private String bindExpireTime; public byte[] header() { public CommandClause clause() {ECut.java — 1D 56 00
public class ECut extends OnlyBinaryHeaderArg<ECut> implements BasicBatteryVolumeArg<byte[]> { public byte[] header() {EEnable.java — 10 FF FE 01
public class EEnable extends OnlyBinaryHeaderArg<EEnable> { public byte[] header() {EEnableGray.java — 10 FF BD 02
public class EEnableGray extends OnlyBinaryHeaderArg<EEnableGray> { public byte[] header() {EEnableMode.java — 10 FF BD
public class EEnableMode extends BasicESCArg<EEnableMode> { private int mode; public byte[] header() { public CommandClause clause() {EGetCmd.java — 10 FF 74
public class EGetCmd extends OnlyBinaryHeaderArg<EGetCmd> { public byte[] header() {EGetDeviceInfo.java — 10 FF 33 00
public class EGetDeviceInfo extends OnlyBinaryHeaderArg<EGetDeviceInfo> { public byte[] header() {EGetKey.java — 10 FF 20 00
public class EGetKey extends OnlyBinaryHeaderArg<EGetKey> { public byte[] header() {EGetPaperTypeQ3.java — 10 FF 85
public class EGetPaperTypeQ3 extends OnlyBinaryHeaderArg<EGetPaperTypeQ3> { public byte[] header() {EGetShutdownTime.java — 10 FF 13
public class EGetShutdownTime extends OnlyBinaryHeaderArg<EGetShutdownTime> { public byte[] header() {EGetSystemLanguage.java — 10 FF 31 0B 03
public class EGetSystemLanguage extends OnlyBinaryHeaderArg<EGetSystemLanguage> { public byte[] header() {EGetWifiName.java — 10 FF 31 03
public class EGetWifiName extends OnlyBinaryHeaderArg<EGetWifiName> { public byte[] header() {EGetWifiSta.java — 10 FF 31 01
public class EGetWifiSta extends OnlyBinaryHeaderArg<EGetWifiSta> { public byte[] header() {EImage.java — 1F 00 1D 76 30
public class EImage<T extends ISourceImage> extends BasicESCArg<EImage<T>> { private T image; private Mode mode = Mode.NORMAL; private boolean compress; private boolean reverse; private int grayThreshold = 190; public byte[] header() { public CommandClause clause() { public enum Mode { private final int mode; public int getMode() {EImageGray.java — 1D 76 30 00
public class EImageGray<T extends ISourceImage> extends BasicESCArg<EImageGray<T>> { private T image; private boolean compress; private boolean reverse; public byte[] header() { public CommandClause clause() {EInfo.java — 10 FF 70
public class EInfo extends OnlyBinaryHeaderArg<EInfo> implements BasicBatteryVolumeArg<byte[]> { public byte[] header() {ELearnLabelGap.java — 10 FF 03
public class ELearnLabelGap extends OnlyBinaryHeaderArg<ELearnLabelGap> { public byte[] header() {ELine.java — 00 01
public class ELine extends BasicESCArg<ELine> implements BasicLineArg<byte[]> { private int x; private int y; public byte[] header() { public CommandClause clause() {ELineDot.java — 1B 4A
public class ELineDot extends BasicESCArg<ELineDot> { private int dot; public byte[] header() { public CommandClause clause() {ELineDotCut.java — 1D 56 42 01
public class ELineDotCut extends OnlyBinaryHeaderArg<ELineDotCut> implements BasicBatteryVolumeArg<byte[]> { public byte[] header() {ELocation.java — 1B 61
public class ELocation extends BasicESCArg<ELocation> { private Location location = Location.CENTER; public byte[] header() { public CommandClause clause() {EMac.java — 10 FF 30 12
public class EMac extends OnlyBinaryHeaderArg<EMac> { public byte[] header() {EModel.java — 10 FF 20 F0
public class EModel extends OnlyBinaryHeaderArg<EModel> { public byte[] header() {ENN.java — 10 FF 20 F9
public class ENN extends OnlyBinaryHeaderArg<ENN> { public byte[] header() {EName.java — 10 FF 30 11
public class EName extends OnlyBinaryHeaderArg<EName> { public byte[] header() {ENfcPaper.java — 10 FF 35 12
public class ENfcPaper extends OnlyBinaryHeaderArg<ENfcPaper> { public byte[] header() {ENfcRestLength.java — 10 FF 35 23
public class ENfcRestLength extends OnlyBinaryHeaderArg<ENfcRestLength> { public byte[] header() {ENfcUID.java — 10 FF 35 21
public class ENfcUID extends OnlyBinaryHeaderArg<ENfcUID> { public byte[] header() {ENfcUsedLength.java — 10 FF 35 22
public class ENfcUsedLength extends OnlyBinaryHeaderArg<ENfcUsedLength> { public byte[] header() {EPaperType.java — 10 FF 10 03
public class EPaperType extends BasicESCArg<EPaperType> { private Type type = Type.FOLDED_BLACK_LABEL_PAPER; public enum Type { private final int type; public int getType() { public byte[] header() { public CommandClause clause() {EPaperTypeQ3.java — 10 FF 84
public class EPaperTypeQ3 extends BasicESCArg<EPaperTypeQ3> { private TypeQ3 type = TypeQ3.CONTINUOUS_REEL_PAPER; public enum TypeQ3 { private final int type; public int getType() { public byte[] header() { public CommandClause clause() {EPosition.java — 1D 0C
public class EPosition extends OnlyBinaryHeaderArg<EPosition> { public byte[] header() {EPrinterVersion.java — 10 FF 20 F1
public class EPrinterVersion extends OnlyBinaryHeaderArg<EPrinterVersion> { public byte[] header() {EResetNetworkInfo.java — 10 FF 33 05
public class EResetNetworkInfo extends OnlyBinaryHeaderArg<EResetNetworkInfo> { public byte[] header() {ESN.java — 10 FF 20 F2
public class ESN extends OnlyBinaryHeaderArg<ESN> { public byte[] header() {ESetCalendarMode.java — 10 FF 31 0B
public class ESetCalendarMode extends BasicESCArg<ESetCalendarMode> { private int mode; public byte[] header() { public CommandClause clause() {ESetCmd.java — 10 FF 79
public class ESetCmd extends BasicESCArg<ESetCmd> { private int cmd; public byte[] header() { public CommandClause clause() {ESetCurrentTime.java — 10 FF 14 02
public class ESetCurrentTime extends BasicESCArg<ESetCurrentTime> { private int second; private int minute; private int hour; private int day; private int week; private int month; private int year; public byte[] header() { public CommandClause clause() {ESetHost.java — 10 FF 31 06
public class ESetHost extends BasicESCArg<ESetHost> { private List<String> hosts; public byte[] header() { public CommandClause clause() {ESetKey.java — 10 FF 31 07
public class ESetKey extends BasicESCArg<ESetKey> { private String key; public byte[] header() { public CommandClause clause() {ESetShutdownTime.java — 10 FF 12
public class ESetShutdownTime extends BasicESCArg<ESetShutdownTime> { private int time; public byte[] header() { public CommandClause clause() {ESetStandbyImage.java
public class ESetStandbyImage { private static final byte SRC_SEND = 0x01; private static final byte SRC_REPLY = 0x02; private static final int DEFAULT_FRAGMENT_SIZE = 1024; private static final int DEFAULT_TIMEOUT_MS = 5000; private final ConnectedDevice device; private final byte[] imageData; private final int fragmentSize; private final int timeoutMs; public ESetStandbyImage(ConnectedDevice device, byte[] imageData) { public ESetStandbyImage(ConnectedDevice device, byte[] imageData, int fragmentSize, int timeoutMs) { public void send() throws IOException, ESetStandbyImageException { byte[] startReply = sendStartPacket(); public static class ESetStandbyImageException extends Exception { public ESetStandbyImageException(String message) { public ESetStandbyImageException(String message, Throwable cause) {ESetStandbyMode.java — 10 FF 31 0B
public class ESetStandbyMode extends BasicESCArg<ESetStandbyMode> { private int mode; public byte[] header() { public CommandClause clause() {ESetSystemLanguage.java — 10 FF 31 0B
public class ESetSystemLanguage extends BasicESCArg<ESetSystemLanguage> { private int language; public byte[] header() { public CommandClause clause() {ESetWifi.java — 10 FF 31 02
public class ESetWifi extends BasicESCArg<ESetWifi> { private String ssid; private String password; private int mode = 0; public byte[] header() { public CommandClause clause() {EState.java — 10 FF 40
public class EState extends OnlyBinaryHeaderArg<EState> { public byte[] header() {EStopJob.java — 10 FF FE 45
public class EStopJob extends OnlyBinaryHeaderArg<EStopJob> { public byte[] header() {EThickness.java — 10 FF 10 00
public class EThickness extends BasicESCArg<EThickness> { private int thickness; public byte[] header() { public CommandClause clause() {EVersion.java — 10 FF 30 10
public class EVersion extends OnlyBinaryHeaderArg<EVersion> { public byte[] header() {EWakeup.java — 00 00 00 00 00 00 00 00 00 00 00 00
public class EWakeup extends OnlyBinaryHeaderArg<EWakeup> { public byte[] header() {Location.java
public enum Location { private final int location; public int getLocation() {JavaScript
Section titled “JavaScript”backlinedot.ts — 10 FF 81
export class EBackLineDot extends BasicESCArg<EBackLineDot> { private dot: number; constructor(options: { dot?: number, }) {batteryvolume.ts — 10 FF 50 F1
export class EBatteryVolume extends OnlyBinaryHeaderArg<EBatteryVolume> {enablegray.ts — 10 FF BD 02
export class EEnableGray extends OnlyBinaryHeaderArg<EEnableGray> {enablemode.ts — 10 FF BD
export class EEnableMode extends BasicESCArg<EEnableMode> { private readonly mode: number; constructor(options: { mode: number, }) {getpapertypeq3.ts — 10 FF 85
export class EGetPaperTypeQ3 extends OnlyBinaryHeaderArg<EGetPaperTypeQ3> {getshutdowntime.ts — 10 FF 13
export class EGetShutdownTime extends OnlyBinaryHeaderArg<EGetShutdownTime> {image.ts — 1F 00 1D 76 30
export class EImage extends BasicESCArg<EImage> { private readonly compress: boolean; private readonly mode: EImageMode; private readonly image: InputImage; private readonly reverse: boolean; private readonly threshold: number; constructor(options: { compress?: boolean, reverse?: boolean, threshold?: number, mode?: EImageMode, image: InputImage, }) { const processer = new Pbita({ command:'esc', threshold: this.threshold, compress: this.compress, reverse: this.reverse, } ); const info = processer.process(this.image); const fimage = info.result.data; const fbytes = info.result.bytes; const eWidth = Math.floor((width % 8 === 0) ? (width / 8) : (width / 8 + 1));imagegray.ts — 1D 76 30 00
export class EImageGray extends BasicESCArg<EImageGray> { private readonly compress: boolean; private readonly image: InputImage; private readonly reverse: boolean; constructor(options: { compress?: boolean, reverse?: boolean, image: InputImage, }) { const processer = new Pbita({ command: 'esc', compress: this.compress, reverse: this.reverse, gray: true, }); const info = processer.process(this.image); const fimage = info.result?.data; const fbytes = info.result?.bytes;learnlabelgap.ts — 10 FF 03
export class ELearnLabelGap extends OnlyBinaryHeaderArg<ELearnLabelGap> {line.ts — 00 01
export class ELine extends BasicESCArg<ELine> { private x: number; private y: number; constructor(options: { x?: number, y?: number, }) {linedot.ts — 1B 4A
export class ELineDot extends BasicESCArg<ELineDot> { private dot: number; constructor(options: { dot?: number, }) {linedotcut.ts — 1D 56 42 01
export class ELineDotCut extends OnlyBinaryHeaderArg<ELineDotCut> {location.ts — 1B 61
export class ELocation extends BasicESCArg<ELocation> { private location: number; constructor(options: { location?: number, }) {papertype.ts — 10 FF 10 03
export class EPaperType extends BasicESCArg<EPaperType> { private readonly paperType: PaperType; constructor(options: { paperType?: PaperType, }) {papertypeq3.ts — 10 FF 84
export class EPaperTypeQ3 extends BasicESCArg<EPaperTypeQ3> { private readonly paperType: PaperTypeQ3; constructor(options: { paperType?: PaperTypeQ3, }) {printerversion.ts — 10 FF 20 F1
export class EPrinterVersion extends OnlyBinaryHeaderArg<EPrinterVersion> {resetnetworkinfo.ts — 10 FF 33 05
export class EResetNetworkInfo extends OnlyBinaryHeaderArg<EResetNetworkInfo> {setcurrenttime.ts — 10 FF 14 02
export class ESetCurrentTime extends BasicESCArg<ESetCurrentTime> { private second: number; private minute: number; private hour: number; private day: number; private week: number; private month: number; private year: number; constructor(options: { second?: number, minute?: number, hour?: number, day?: number, week?: number, mouth?: number, year?: number, }) {setshutdowntime.ts — 10 FF 12
export class ESetShutdownTime extends BasicESCArg<ESetShutdownTime> { private time: number; constructor(options: { time?: number, }) {thickness.ts — 10 FF 10 00
export class EThickness extends BasicESCArg<EThickness> { private thickness: number; constructor(options: { thickness?: number, }) {wakeup.ts — 00 00 00 00 00 00 00 00 00 00 00 00
export class EWakeup extends OnlyBinaryHeaderArg<EWakeup> {index.ts
Objective-C
Section titled “Objective-C”EBackLineDot.h
@interface EBackLineDot : BasicESCArg@property (nonatomic, readonly)EBackLineDot *(^dot)(int d);@endEBackLineDot.m — 10 FF 81
@interface EBackLineDot()@property (nonatomic , assign) int d;@end@endEImage.h
@interface EImage : BasicESCArg@property (nonatomic , readonly) EImage *(^image)(UIImage *img);@property (nonatomic , readonly) EImage *(^width)(int imageWidth);@property (nonatomic , readonly) EImage *(^height)(int imageHeight);@property (nonatomic , readonly) EImage *(^mode)(Mode imageMode);@property (nonatomic , readonly) EImage *(^compress)(BOOL isCompress);@property (nonatomic , readonly) EImage *(^reverse)(BOOL isReverse);@endEImage.m — 1D 76 30
@interface EImage()@property (nonatomic , strong) UIImage *img;@property (nonatomic , assign) int imageWidth;@property (nonatomic , assign) int imageHeight;@property (nonatomic , assign) Mode imageMode;@property (nonatomic , assign) BOOL isCompress;@property (nonatomic , assign) BOOL isReverse;@end@endELine.h
@interface ELine : BasicESCArg<BasicLineArg>@property (nonatomic , readonly) ELine *(^x)(int lx);@property (nonatomic , readonly) ELine *(^y)(int ly);@endELine.m — 00 01
@interface ELine()@property(nonatomic , assign) int lx;@property(nonatomic , assign) int ly;@end@endELineDot.h
@interface ELineDot : BasicESCArg@property(nonatomic , readonly) ELineDot *(^dot)(int d);@endELocation.h
@interface ELocation : BasicESCArg@property(nonatomic , readonly) ELocation *(^location)(int loc);@endELocation.m — 1B 61
@interface ELocation()@property (nonatomic , assign) int loc;@end@endEPaperType.h
@interface EPaperType : BasicESCArg@property (nonatomic , readonly) EPaperType *(^type)(PaperType paperType);@endEPaperType.m — 10 FF 10 03
@interface EPaperType()@property (nonatomic, assign) PaperType paperType;@end@endESetShutdownTime.h
@interface ESetShutdownTime : BasicESCArg@property (nonatomic , readonly) ESetShutdownTime *(^time)(int shuttime);@endESetShutdownTime.m — 10 FF 12
@interface ESetShutdownTime()@property (nonatomic, assign) int shutDownTime;@end@endEThickness.h
@interface EThickness : BasicESCArg@property (nonatomic , readonly) EThickness *(^thickness)(Thickness thick);@endEThickness.m — 10 FF 10 00
@interface EThickness()@property (nonatomic, assign) Thickness thick;@end@endOpenScreenArg.h
@interface OpenScreenArg : OnlyBinaryHeaderArg@property (nonatomic, assign) BOOL isOpen;@endPrintLinedotsArg.h
@interface PrintLinedotsArg : OnlyBinaryHeaderArg@property (nonatomic, assign) int linedots;@endCodeRotation.h
@interface CodeRotation : NSObject@property (nonatomic , assign)CODEROTATION rotation;-(NSString *)getRotation;@endCodeType.h
@interface CodeType : NSObject@property (nonatomic , readonly) CodeType *(^codeType)(CODETYPE type);-(NSString *)getCodeType;@endCorrectLevel.h
@interface CorrectLevel : NSObject@property(nonatomic , assign)CORRECTLEVEL level;-(NSString *)getLevel;@endFont.h
@interface Font : NSObject@property(nonatomic , readonly)Font *(^font)(FONT fnt);- (int) getEx;- (int) getEy;- (int) getFamily;- (int) getSize;- (int) getHeight;@endFont.m
@interface Font()@property (nonatomic , strong)NSString *fnt;@property (nonatomic , assign)int ex;@property (nonatomic , assign)int ey;@property (nonatomic , assign)int family;@property (nonatomic , assign)int size;@property (nonatomic , assign)int height;@end@endImageMode.h
@interface ImageMode : NSObject@property (nonatomic , readonly) ImageMode *(^mode)(IMAGEMODE imagemode);-(int)getMode;@endImageMode.m
@interface ImageMode()@property (nonatomic , assign) IMAGEMODE imageMode;@end@endLine.h
@interface Line : NSObject@property(nonatomic , readonly) Line *(^line)(LINE l);-(int) getLine;@endLineM.h
@interface LineM : NSObject@property (nonatomic , readonly) LineM *(^line)(LINEM linem);-(NSString *)getLine;@endRotation.h
@interface Rotation : NSObject@property(nonatomic , readonly) Rotation *(^rotation)(ROTATION rot);-(int)getRotation;@endShowType.h
@interface ShowType : NSObject@property(nonatomic , readonly) ShowType *(^showType)(SHOWTYPE stypevoid);;-(int)getShowType;@endback_line_dot.rs — 10 FF 81
pub struct EBackLineDotOptions { pub dot: i32,pub struct EBackLineDot { pub fn new(options: EBackLineDotOptions) -> Self { Self { options, ctx: Default::default(), } }}impl From<i32> for EBackLineDot { fn from(dot: i32) -> Self {back_paper_a.rs — 1F 11 10 00 20
pub struct EBackPaperA { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<Vec<u8>> for EBackPaperA { fn context(&self) -> Arc<Mutex<ArgContext>> {battery_volume.rs — 10 FF 50 F1
pub struct EBatteryVolume { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<Vec<u8>> for EBatteryVolume { fn context(&self) -> Arc<Mutex<ArgContext>> {bt_type.rs — 1F B2 10
pub struct EBTType { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<Vec<u8>> for EBTType { fn context(&self) -> Arc<Mutex<ArgContext>> {change_speed_a.rs — 1F 60 02 02
pub struct EChangeSpeedA { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<Vec<u8>> for EChangeSpeedA { fn context(&self) -> Arc<Mutex<ArgContext>> {cut.rs — 1D 56 00
pub struct ECut { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<Vec<u8>> for ECut { fn context(&self) -> Arc<Mutex<ArgContext>> {enable.rs — 10 FF FE 01
pub struct EEnable { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<Vec<u8>> for EEnable { fn context(&self) -> Arc<Mutex<ArgContext>> {enable_gray.rs — 10 FF BD 02
pub struct EEnableGray { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<Vec<u8>> for EEnableGray { fn context(&self) -> Arc<Mutex<ArgContext>> {enable_mode.rs — 10 FF BD
pub struct EEnableModeOptions { pub mode: i32,pub struct EEnableMode { pub fn new(options: EEnableModeOptions) -> Self { Self { options, ctx: Default::default(), } }}impl From<i32> for EEnableMode { fn from(mode: i32) -> Self {get_cmd.rs — 10 FF 74
pub struct EGetCmd { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<Vec<u8>> for EGetCmd { fn context(&self) -> Arc<Mutex<ArgContext>> {get_key.rs — 10 FF 20 00
pub struct EGetKey { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<Vec<u8>> for EGetKey { fn context(&self) -> Arc<Mutex<ArgContext>> {get_paper_type_q3.rs — 10 FF 85
pub struct EGetPaperTypeQ3 { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<Vec<u8>> for EGetPaperTypeQ3 { fn context(&self) -> Arc<Mutex<ArgContext>> {get_shutdown_time.rs — 10 FF 13
pub struct EGetShutdownTime { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<Vec<u8>> for EGetShutdownTime { fn context(&self) -> Arc<Mutex<ArgContext>> {get_wifi_sta.rs — 10 FF 31 01
pub struct EGetWifiSta { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<Vec<u8>> for EGetWifiSta { fn context(&self) -> Arc<Mutex<ArgContext>> {image_a.rs — 1F 10 1D 76 30
pub struct EImageAOptions { pub pixels: Vec<u8>, pub mode: Option<Mode>, pub compress: bool, pub reverse: bool, pub gray_threshold: Option<i32>, pub smooth_weight: i32, pub edge_dither_mode: Option<ThresholdEdgeDitherMode>, pub edge_dither_depth: ThresholdEdgeDitherDepth, pub width: u32, pub height: u32,pub struct EImageA { pub fn new(options: EImageAOptions) -> Self { Self { options, ctx: Default::default(), } }}impl From<(Vec<u8>, u32, u32)> for EImageA { fn from((pixels, width, height): (Vec<u8>, u32, u32)) -> Self {image_a_bytes.rs
pub struct EImageABytesOptions { pub bytes: Vec<u8>, pub mode: Option<Mode>, pub compress: bool, pub reverse: bool, pub gray_threshold: Option<i32>, pub smooth_weight: i32, pub edge_dither_mode: Option<ThresholdEdgeDitherMode>, pub edge_dither_depth: ThresholdEdgeDitherDepth,pub struct EImageABytes { pub fn new(options: EImageABytesOptions) -> PsdkFatherResult<Self> { let pixmap = Pixmap::decode_png(&options.bytes).map_err(|e| PsdkFatherError::Image(format!("{:?}", e)))?; let width = pixmap.width();image_bytes.rs
pub struct EImageBytesOptions { pub bytes: Vec<u8>, pub mode: Option<Mode>, pub compress: bool, pub reverse: bool, pub gray_threshold: Option<i32>, pub smooth_weight: i32, pub edge_dither_mode: Option<ThresholdEdgeDitherMode>, pub edge_dither_depth: ThresholdEdgeDitherDepth,pub struct EImageBytes { pub fn new(options: EImageBytesOptions) -> PsdkFatherResult<Self> { let pixmap = Pixmap::decode_png(&options.bytes).map_err(|e| PsdkFatherError::Image(format!("{:?}", e)))?; let width = pixmap.width();image_gray.rs — 1D 76 30 00
pub struct EImageGrayOptions { pub pixels: Vec<u8>, pub compress: bool, pub reverse: bool, pub width: u32, pub height: u32,pub struct EImageGray { pub fn new(options: EImageGrayOptions) -> Self { Self { options, ctx: Default::default(), } }}impl From<(Vec<u8>, u32, u32)> for EImageGray { fn from((pixels, width, height): (Vec<u8>, u32, u32)) -> Self {image_gray_bytes.rs
pub struct EImageGrayBytesOptions { pub bytes: Vec<u8>, pub compress: bool, pub reverse: bool,pub struct EImageGrayBytes { pub fn new(options: EImageGrayBytesOptions) -> PsdkFatherResult<Self> { let pixmap = Pixmap::decode_png(&options.bytes).map_err(|e| PsdkFatherError::Image(format!("{:?}", e)))?; let width = pixmap.width();image_pixel.rs — 1F 00 1D 76 30
pub struct EImagePixelsOptions { pub pixels: Vec<u8>, pub mode: Option<Mode>, pub compress: bool, pub reverse: bool, pub gray_threshold: Option<i32>, pub smooth_weight: i32, pub edge_dither_mode: Option<ThresholdEdgeDitherMode>, pub edge_dither_depth: ThresholdEdgeDitherDepth, pub width: u32, pub height: u32,pub struct EImagePixels { pub fn new(options: EImagePixelsOptions) -> Self { Self { options, ctx: Default::default(), } }}impl From<(Vec<u8>, u32, u32)> for EImagePixels { fn from((pixels, width, height): (Vec<u8>, u32, u32)) -> Self {info.rs — 10 FF 70
pub struct EInfo { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<Vec<u8>> for EInfo { fn context(&self) -> Arc<Mutex<ArgContext>> {learn_label_gap.rs — 10 FF 03
pub struct ELearnLabelGap { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<Vec<u8>> for ELearnLabelGap { fn context(&self) -> Arc<Mutex<ArgContext>> {line.rs — 00 01
pub struct ELineOptions { pub x: i32, pub y: i32,pub struct ELine { pub fn new(options: ELineOptions) -> Self { Self { options, ctx: Default::default(), } }}impl From<(i32, i32)> for ELine { fn from((x, y): (i32, i32)) -> Self {line_dot.rs — 1B 4A
pub struct ELineDotOptions { pub dot: Option<i32>,pub struct ELineDot { pub fn new(options: ELineDotOptions) -> Self { Self { options, ctx: Default::default(), } }}impl From<i32> for ELineDot { fn from(dot: i32) -> Self {line_dot_cut.rs — 1D 56 42 01
pub struct ELineDotCut { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<Vec<u8>> for ELineDotCut { fn context(&self) -> Arc<Mutex<ArgContext>> {line_row.rs — 1B 64
pub struct ELineRowOptions { pub row: i32,pub struct ELineRow { pub fn new(options: ELineRowOptions) -> Self { Self { options, ctx: Default::default(), } }}impl From<i32> for ELineRow { fn from(row: i32) -> Self {location.rs — 1B 61
pub struct ELocationOptions { pub location: Option<i32>,pub struct ELocation { pub fn new(options: ELocationOptions) -> Self { Self { options, ctx: Default::default(), } }}impl From<i32> for ELocation { fn from(location: i32) -> Self {mac.rs — 10 FF 30 12
pub struct EMac { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<Vec<u8>> for EMac { fn context(&self) -> Arc<Mutex<ArgContext>> {model.rs — 10 FF 20 F0
pub struct EModel { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<Vec<u8>> for EModel { fn context(&self) -> Arc<Mutex<ArgContext>> {name.rs — 10 FF 30 11
pub struct EName { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<Vec<u8>> for EName { fn context(&self) -> Arc<Mutex<ArgContext>> {nfc_paper.rs — 10 FF 35 12
pub struct ENfcPaper { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<Vec<u8>> for ENfcPaper { fn context(&self) -> Arc<Mutex<ArgContext>> {nfc_rest_length.rs — 10 FF 35 23
pub struct ENfcRestLength { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<Vec<u8>> for ENfcRestLength { fn context(&self) -> Arc<Mutex<ArgContext>> {nfc_uid.rs — 10 FF 35 21
pub struct ENfcUID { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<Vec<u8>> for ENfcUID { fn context(&self) -> Arc<Mutex<ArgContext>> {nfc_used_length.rs — 10 FF 35 22
pub struct ENfcUsedLength { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<Vec<u8>> for ENfcUsedLength { fn context(&self) -> Arc<Mutex<ArgContext>> {nn.rs — 10 FF 20 F9
pub struct ENN { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<Vec<u8>> for ENN { fn context(&self) -> Arc<Mutex<ArgContext>> {paper_type.rs — 10 FF 10 03
pub struct EPaperTypeOptions { pub paper_type: Option<PaperType>,pub struct EPaperType { pub fn new(options: EPaperTypeOptions) -> Self { Self { options, ctx: Default::default(), } }}impl Default for EPaperType { fn default() -> Self {paper_type_q3.rs — 10 FF 84
pub struct EPaperTypeQ3Options { pub paper_type_q3: Option<PaperTypeQ3>,pub struct EPaperTypeQ3 { pub fn new(options: EPaperTypeQ3Options) -> Self { Self { options, ctx: Default::default(), } }}impl Default for EPaperTypeQ3 { fn default() -> Self {position.rs — 1D 0C
pub struct EPosition { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<Vec<u8>> for EPosition { fn context(&self) -> Arc<Mutex<ArgContext>> {printer_version.rs — 10 FF 20 F1
pub struct EPrinterVersion { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<Vec<u8>> for EPrinterVersion { fn context(&self) -> Arc<Mutex<ArgContext>> {reset_a.rs — 1B 40
pub struct EReSetA { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<Vec<u8>> for EReSetA { fn context(&self) -> Arc<Mutex<ArgContext>> {set_cmd.rs — 10 FF 79
pub struct ESetCmdOptions { pub cmd: i32,pub struct ESetCmd { pub fn new(options: ESetCmdOptions) -> Self { Self { options, ctx: Default::default(), } }}impl From<i32> for ESetCmd { fn from(cmd: i32) -> Self {set_current_time.rs — 10 FF 14 02
pub struct ESetCurrentTimeOptions { pub second: i32, pub minute: i32, pub hour: i32, pub day: i32, pub week: i32, pub month: i32, pub year: i32,pub struct ESetCurrentTime { pub fn new(options: ESetCurrentTimeOptions) -> Self { Self { options, ctx: Default::default(), } }}impl From<(i32, i32, i32, i32, i32, i32, i32)> for ESetCurrentTime { fn from( (second, minute, hour, day, week, month, year): (i32, i32, i32, i32, i32, i32, i32), ) -> Self {set_host.rs — 10 FF 31 06
pub struct ESetHostOptions { pub hosts: Vec<String>,pub struct ESetHost { pub fn new(options: ESetHostOptions) -> Self { Self { options, ctx: Default::default(), } }}impl<T: AsRef<str>> From<Vec<T>> for ESetHost { fn from(hosts: Vec<T>) -> Self {set_key.rs — 10 FF 31 07
pub struct ESetKeyOptions { pub key: String,pub struct ESetKey { pub fn new(options: ESetKeyOptions) -> Self { Self { options, ctx: Default::default(), } }}impl From<String> for ESetKey { fn from(key: String) -> Self {set_shutdown_time.rs — 10 FF 12
pub struct ESetShutdownTimeOptions { pub time: i32,pub struct ESetShutdownTime { pub fn new(options: ESetShutdownTimeOptions) -> Self { Self { options, ctx: Default::default(), } }}impl From<i32> for ESetShutdownTime { fn from(time: i32) -> Self {set_wifi.rs — 10 FF 31 02
pub struct ESetWifiOptions { pub ssid: String, pub password: String, pub mode: i32,pub struct ESetWifi { pub fn new(options: ESetWifiOptions) -> Self { Self { options, ctx: Default::default(), } }}impl From<(String, String)> for ESetWifi { fn from((ssid, password): (String, String)) -> Self {sn.rs — 10 FF 20 F2
pub struct ESN { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<Vec<u8>> for ESN { fn context(&self) -> Arc<Mutex<ArgContext>> {state.rs — 10 FF 40
pub struct EState { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<Vec<u8>> for EState { fn context(&self) -> Arc<Mutex<ArgContext>> {stop_job.rs — 10 FF FE 45
pub struct EStopJob { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<Vec<u8>> for EStopJob { fn context(&self) -> Arc<Mutex<ArgContext>> {thickness.rs — 10 FF 10 00
pub struct EThicknessOptions { pub thickness: i32,pub struct EThickness { pub fn new(options: EThicknessOptions) -> Self { Self { options, ctx: Default::default(), } }}impl From<i32> for EThickness { fn from(thickness: i32) -> Self {version.rs — 10 FF 30 10
pub struct EVersion { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<Vec<u8>> for EVersion { fn context(&self) -> Arc<Mutex<ArgContext>> {wakeup.rs — 00 00 00 00 00 00 00 00 00 00 00 00
pub struct EWakeup { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<Vec<u8>> for EWakeup { fn context(&self) -> Arc<Mutex<ArgContext>> {marks.rs
pub enum Location { pub fn command_value(&self) -> u32 { match self { Location::Left => 0, Location::Center => 1, Location::Right => 2, } }}#[derive(Clone, Debug)]pub enum PaperType { pub fn command_value(&self) -> u32 { match self { PaperType::FoldedBlackLabelPaper => 0, PaperType::ContinuousReelPaper => 1, PaperType::NoDryAdhesivePaper => 2, PaperType::HolePaper => 3, PaperType::TattooPaper => 4, PaperType::TattooWrinklesPaper => 5, PaperType::TransparentBlackLabelPaper => 6, } }}#[derive(Clone, Debug)]pub enum PaperTypeQ3 { pub fn command_value(&self) -> u32 { match self { PaperTypeQ3::NoDryAdhesivePaper => 0, PaperTypeQ3::TransparentBlackLabelPaper => 1, PaperTypeQ3::ContinuousReelPaper => 2, } }}#[derive(Clone, Debug)]pub enum Mode { pub fn command_value(&self) -> u32 { match self { Mode::Normal => 0, Mode::DoubleWidth => 1, Mode::DoubleHeight => 2, Mode::DoubleWidthHeight => 3, } }}EBackLineDot.swift — 10 FF 81
public class EBackLineDot: EasyArg<Data> { public required init(_ raw: ERealBackLineDot) { public static func build(block: () -> ERealBackLineDot) -> Self { Self.init(block()) }}public class ERealBackLineDot: IEasyBinaryArg { public var linedot: Int public init(linedot: Int) { public func clause() -> CommandClause { let data = DataPlus.with(data: header()) .append(linedot) .raw() return .binary(data) } public func header() -> Data { Data([0x10, 0xFF, 0x81]) } public func derived() -> DeriveArg<Data>? { nil }}EBatteryVolume.swift — 10 FF 50 F1
public class EBatteryVolume: OnlyBinaryHeaderArg { public required init() { public static func build() -> Self { Self.init() }}class ERealBatteryVolume: IEasyOnlyBinaryHeaderArg {EEnable.swift — 10 FF FE 01
public class EEnable: OnlyBinaryHeaderArg { public required init() { public static func build() -> Self { Self.init() }}class ERealEnable: IEasyOnlyBinaryHeaderArg {EGetShutdownTime.swift — 10 FF 13
public class EGetShutdownTime:OnlyBinaryHeaderArg { public required init() { public static func build() -> Self { return self.init() }}public class ERealGetShutdownTime: IEasyOnlyBinaryHeaderArg { public func header() -> Data { Data([0x10, 0xff, 0x13]) } public func derived() -> DeriveArg<Data>? { nil }}EImage.swift — 1D 76 30
public class EImage: EasyArg<Data> { public required init(_ raw: ERealImage) { public static func build(_ block: () -> ERealImage) -> Self { Self.init(block()) }}public class ERealImage: IEasyBinaryArg { public var image: UIImage public var width: Int public var height: Int public var mode: Mode = .NORMAL public var compress: Bool public init( image: UIImage, width: Int, height: Int, compress: Bool ) { public func header() -> Data { Data([0x1D, 0x76, 0x30]) } public func clause() -> CommandClause { var byteWidth: Int let width = self.width; let height = self.height; if (width % 8 != 0) { public func derived() -> DeriveArg<Data>? { nil }}public enum Mode: Int {ELearnLabelGap.swift — 10 FF 03
public class ELearnLabelGap: OnlyBinaryHeaderArg { public required init() { public static func build() -> Self { Self.init() }}class ERealLearnLabelGap: IEasyOnlyBinaryHeaderArg {ELine.swift — 00 01
public class ELine: EasyArg<Data> { public required init(_ raw: ERealLine) { public static func build(_ block: () -> ERealLine) -> Self { Self.init(block()) }}public class ERealLine: IEasyBinaryArg { public var x: Int public var y: Int public init(x: Int, y: Int) { public func clause() -> CommandClause { let data = DataPlus.with(data: header()) .append(x) .append(y) .raw() return .binary(data) } public func header() -> CommandDataType { Data([0x00, 0x01]) } public func derived() -> DeriveArg<Data>? { nil }}ELineDot.swift — 1B 4A
public class ELineDot: EasyArg<Data> { public required init(_ raw: ERealLineDot) { public static func build(_ block: () -> ERealLineDot) -> Self { Self.init(block()) }}public class ERealLineDot: IEasyBinaryArg { public var linedot: Int public init(linedot: Int) { public func clause() -> CommandClause { let data = DataPlus.with(data: header()) .append(linedot) .raw() return .binary(data) } public func header() -> Data { Data([0x1b, 0x4a]) } public func derived() -> DeriveArg<Data>? { nil }}ELocation.swift — 1B 61
public class ELocation: EasyArg<Data> { public required init(_ raw: ERealLocation) { public static func build(_ block: () -> ERealLocation) -> Self { Self.init(block()) }}public class ERealLocation: IEasyBinaryArg { public var location: Int public init(location: Int) { public func clause() -> CommandClause { let data = DataPlus.with(data: header()) .append(location) .raw() return.binary(data) } public func header() -> Data { Data([0x1b, 0x61]) } public func derived() -> DeriveArg<Data>? { nil }}EMac.swift — 10 FF 30 12
public class EMac: OnlyBinaryHeaderArg { public required init() { public static func build() -> Self { Self.init() }}class ERealMac: IEasyOnlyBinaryHeaderArg {EModel.swift — 10 FF 20 F0
public class EModel: OnlyBinaryHeaderArg { public required init() { public static func build() -> Self { Self.init() }}class ERealModel: IEasyOnlyBinaryHeaderArg {EName.swift — 10 FF 30 11
public class EName: OnlyBinaryHeaderArg { public required init() { public static func build() -> Self { Self.init() }}public class ERealName: IEasyOnlyBinaryHeaderArg { public func header() -> Data { Data([0x10, 0xff, 0x30, 0x11]) } public func derived() -> DeriveArg<Data>? { nil }}EPaperType.swift — 10 FF 10 03
public class EPaperType: EasyArg<Data> { public required init(_ raw: ERealPaperType) { public static func build(_ block: () -> ERealPaperType) -> Self { Self.init(block()) }}public class ERealPaperType: IEasyBinaryArg { public enum PaperType: Int { public var type: PaperType public init(type: PaperType) { public func header() -> Data { Data([0x10, 0xff, 0x10, 0x03]) } public func clause() -> CommandClause { let data = DataPlus.with(data: header()) .append(type.rawValue) .raw() return .binary(data) } public func derived() -> DeriveArg<Data>? { nil }}EPosition.swift — 1D 0C
public class EPosition: OnlyBinaryHeaderArg { public required init() { public static func build() -> Self { Self.init() }}class ERealPosition: IEasyOnlyBinaryHeaderArg {EPrinterVersion.swift — 10 FF 20 F1
public class EPrinterVersion: OnlyBinaryHeaderArg { public required init() { public static func build() -> Self { Self.init() }}class ERealPrinterVersion: IEasyOnlyBinaryHeaderArg {ESN.swift — 10 FF 20 F2
public class ESN: OnlyBinaryHeaderArg { public required init() { public static func build() -> Self { Self.init() }}class ERealSN: IEasyOnlyBinaryHeaderArg {ESetShutdownTime.swift — 10 FF 12
public class ESetShutdownTime: EasyArg<Data> { public required init(_ raw: ERealSetShutdownTime) { public static func build(_ block: () -> ERealSetShutdownTime) -> Self { Self.init(block()) }}public class ERealSetShutdownTime: IEasyBinaryArg { public var time: Int public init(time: Int) { public func clause() -> CommandClause { let data = DataPlus.with(data: header()) .append(time / 256) .append(time % 256) .raw() return .binary(data) } public func header() -> Data { Data([0x10, 0xff, 0x12]) } public func derived() -> DeriveArg<Data>? { nil }}EStatus.swift — 10 FF 40
public class EStatus: OnlyBinaryHeaderArg { public required init() { public static func build() -> Self { Self.init() }}class ERealStatus: IEasyOnlyBinaryHeaderArg {EStopJob.swift — 10 FF FE 45
public class EStopJob: OnlyBinaryHeaderArg { public required init() { public static func build() -> Self { Self.init() }}public class ERealStopJob: IEasyOnlyBinaryHeaderArg { public func header() -> CommandDataType { Data([0x10, 0xff, 0xfe, 0x45]) } public func derived() -> DeriveArg<Data>? { nil }}EThickness.swift — 10 FF 10 00
public class EThickness: EasyArg<Data> { public required init(_ raw: ERealThickness) { public static func build(_ block: () -> ERealThickness) -> Self { self.init(block()) }}public class ERealThickness: IEasyBinaryArg { public var thickness: Int public init(thickness: Int) { public func clause() -> CommandClause { let data = DataPlus.with(data: header()) .append(thickness) .raw() return .binary(data) } public func header() -> Data { Data([0x10, 0xff, 0x10, 0x00]) } public func derived() -> DeriveArg<Data>? { nil }}EVersion.swift — 10 FF 30 10
public class EVersion: OnlyBinaryHeaderArg { public required init() { public static func build() -> Self { Self.init() }}public class ERealVersion: IEasyOnlyBinaryHeaderArg { public func header() -> Data { Data([0x10, 0xff, 0x30, 0x10]) } public func derived() -> DeriveArg<Data>? { nil }}EWakeup.swift — 00 00 00 00 00 00 00 00 00 00 00 00
public class EWakeup: OnlyBinaryHeaderArg { public required init() { public static func build() -> Self { Self.init() }}class ERealWakeup: IEasyOnlyBinaryHeaderArg {