0、开发者pdf、sdk等资料详见:

http://download.csdn.net/detail/kunyashaw/9376694

1、测试代码

包含文字打印、条形码打印、二维码打印

 package com.huofu.speechundecrypt;

 import android.content.Context;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button; import java.io.UnsupportedEncodingException; public class MainActivity extends AppCompatActivity { Context ctxt; @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); Button btn = new Button(getApplicationContext());
btn.setText("press me");
btn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
writeDeal();
}
}); setContentView(btn);
ctxt = getApplicationContext();
} public void writeDeal(){
TscWifiActivity TscEthernetDll = new TscWifiActivity();
TscEthernetDll.openport("192.168.1.200", 9100);//打开指定IP和端口号 //setup(int width, int height, int speed, int density, int sensor, int sensor_distance, int sensor_offset)
//宽度、高度、速度、浓度
//sensor为0:sensor_distance 垂直间距距离 sensor_offset垂直间距的偏移
//sensor为1:sensor_distance 定义黑标高度和额外送出长度 sensor_offset黑标偏移量
TscEthernetDll.setup(40, 30, 4, 4, 0, 5, 0); TscEthernetDll.clearbuffer(); /*--------------------------标签打印机初始化--------------------------*/
TscEthernetDll.sendcommand("SET TEAR ON\n");//是否将撕纸位置移动到撕纸处
//TscEthernetDll.sendcommand("SET COUNTER @1 1\n");//设定计时器及增量
TscEthernetDll.sendcommand("SHIFT 10\n"); /*--------------------------打印文字--------------------------*/
writeDelivery(TscEthernetDll, "", 1);//打印外送标签
writePackagedInfo(TscEthernetDll,"",1);//打印打包标签 /*--------------------------打印条形码--------------------------*/
//barcode(int x, int y, String type, int height, int human_readable, int rotation, int narrow, int wide, String string)
//x 水平坐标左上角起点 y垂直坐标左上角起点 type条形码类型 height条形码高度 human_readable(0 人眼不可识别 1人眼可识别) rotation条形码旋转角度
//narrow 窄bar宽度 wide宽bar宽度 string为要显示的内容
TscEthernetDll.barcode(100, 100, "128", 100, 1, 0, 3, 3, "123456789");
TscEthernetDll.printlabel(1, 1);//打印出缓冲区的数据,第一个参数是打印的分数,第二个是没份打印的张数
TscEthernetDll.clearbuffer(); /*--------------------------打印二维码--------------------------*/
String cmd = "QRCODE 100,10,H,7,M,0,M1,S1,\"hello world\"\n";
TscEthernetDll.sendcommand(cmd);
TscEthernetDll.printlabel(1, 1);
TscEthernetDll.clearbuffer(); TscEthernetDll.closeport();
} /**
* 打印外送信息
* @param TscEthernetDll
* @param msg
* @param font_size
*/
public void writeDelivery(TscWifiActivity TscEthernetDll, String msg, int font_size) {
try {
//String originalText = "TEXT 550,50,\"TSS24.BF2\",180," + font_size + "," + font_size + ",\"" + msg + "\"\n";
String originalText = "TEXT 260,210,\"TSS24.BF2\",180,1,1,\"万通中心店 午餐\"\n";
TscEthernetDll.sendcommand((originalText.getBytes("gb2312"))); originalText = "TEXT 220,185,\"TSS24.BF2\",180,1,1,\"300 外送\"\n";
TscEthernetDll.sendcommand((originalText.getBytes("gb2312"))); originalText = "TEXT 310,150,\"TSS24.BF2\",180,1,1,\"联系人:张**\"\n";
TscEthernetDll.sendcommand((originalText.getBytes("gb2312"))); originalText = "TEXT 310,110,\"TSS24.BF2\",180,1,1,\"电话: 185 1342 ****\"\n";
TscEthernetDll.sendcommand((originalText.getBytes("gb2312"))); String address = "北京市**区 ****D座 25层 **科技有限公司";//10个汉字换一行 if (address.length() <= 10) {
originalText = "TEXT 310,80,\"TSS24.BF2\",180,1,1,\"地址:\"\""+address+"\"\n";
TscEthernetDll.sendcommand((originalText.getBytes("gb2312"))); } else {
String tmpString = address.substring(0,9);
String tmpString2 = address.substring(9,address.length());
originalText = "TEXT 310,80,\"TSS24.BF2\",180,1,1,\"地址:\"\""+tmpString+"\"\n";
TscEthernetDll.sendcommand((originalText.getBytes("gb2312"))); String printText = "TEXT 310,50,\"TSS24.BF2\",180,1,1,\""+tmpString2+"\"\n";
TscEthernetDll.sendcommand((printText.getBytes("gb2312")));
} TscEthernetDll.printlabel(1, 1);//打印出缓冲区的数据,第一个参数是打印的分数,第二个是每份打印的张数
TscEthernetDll.clearbuffer();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
} public static void writePackagedInfo(TscWifiActivity TscEthernetDll, String msg, int font_size) {
try {
//String originalText = "TEXT 550,50,\"TSS24.BF2\",180," + font_size + "," + font_size + ",\"" + msg + "\"\n";
String originalText = "TEXT 260,210,\"TSS24.BF2\",180,1,1,\"万通中心店 午餐\"\n";
TscEthernetDll.sendcommand((originalText.getBytes("gb2312"))); originalText = "TEXT 220,170,\"TSS24.BF2\",180,1,1,\"300 打包\"\n";
TscEthernetDll.sendcommand((originalText.getBytes("gb2312"))); originalText = "TEXT 315,130,\"TSS24.BF2\",180,1,1,\"应收:20.5元\"\n";
TscEthernetDll.sendcommand((originalText.getBytes("gb2312"))); originalText = "TEXT 170,130,\"TSS24.BF2\",180,1,1,\"实收: 30.5元\"\n";
TscEthernetDll.sendcommand((originalText.getBytes("gb2312"))); originalText = "TEXT 315,90,\"TSS24.BF2\",180,1,1,\"优惠: 10元\"\n";
TscEthernetDll.sendcommand((originalText.getBytes("gb2312"))); TscEthernetDll.printlabel(1, 1);//打印出缓冲区的数据,第一个参数是打印的分数,第二个是每份打印的张数
TscEthernetDll.clearbuffer();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
}
}

2、库

 package com.huofu.speechundecrypt;

 import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.os.StrictMode;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.TextView; import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket; /**
* author: Created by zzl on 15/12/25.
*/ public class TscWifiActivity extends Activity {
private static final String TAG = "THINBTCLIENT";
private static final boolean D = true;
private InputStream InStream = null;
private OutputStream OutStream = null;
private Socket socket = null;
private String printerstatus = "";
private int last_bytes = 0;
private byte[] buffer = new byte[1024];
private byte[] readBuf = new byte[1024];
private Button connect = null;
private Button closeport = null;
private Button sendfile = null;
private Button status = null;
private TextView tv1 = null; public TscWifiActivity() {
} public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.setContentView(2130903040);
this.tv1 = (TextView) this.findViewById(2131165187);
this.connect = (Button) this.findViewById(2131165184);
this.connect.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
TscWifiActivity.this.openport("192.168.1.40", 9100);
TscWifiActivity.this.sendcommand("SIZE 3,1\n");
TscWifiActivity.this.sendcommand("PRINT 5\n");
}
});
this.closeport = (Button) this.findViewById(2131165185);
this.closeport.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
TscWifiActivity.this.closeport();
}
});
this.sendfile = (Button) this.findViewById(2131165186);
this.sendfile.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
TscWifiActivity.this.openport("192.168.1.58", 9100);
TscWifiActivity.this.downloadpcx("UL.PCX");
TscWifiActivity.this.downloadbmp("Triangle.bmp");
TscWifiActivity.this.downloadttf("ARIAL.TTF");
TscWifiActivity.this.setup(70, 110, 4, 4, 0, 0, 0);
TscWifiActivity.this.clearbuffer();
TscWifiActivity.this.sendcommand("SET TEAR ON\n");
TscWifiActivity.this.sendcommand("SET COUNTER @1 1\n");
TscWifiActivity.this.sendcommand("@1 = \"0001\"\n");
TscWifiActivity.this.sendcommand("TEXT 100,300,\"3\",0,1,1,@1\n");
TscWifiActivity.this.sendcommand("PUTPCX 100,300,\"UL.PCX\"\n");
TscWifiActivity.this.sendcommand("PUTBMP 100,520,\"Triangle.bmp\"\n");
TscWifiActivity.this.sendcommand("TEXT 100,760,\"ARIAL.TTF\",0,15,15,\"THIS IS ARIAL FONT\"\n");
TscWifiActivity.this.barcode(100, 100, "128", 100, 1, 0, 3, 3, "123456789");
TscWifiActivity.this.printerfont(100, 250, "3", 0, 1, 1, "987654321");
TscWifiActivity.this.printlabel(10, 1);
TscWifiActivity.this.sendfile("zpl.txt");
TscWifiActivity.this.closeport();
}
});
this.status = (Button) this.findViewById(2131165188);
this.status.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
String QQ = TscWifiActivity.this.batch();
TscWifiActivity.this.tv1.setText(QQ);
}
});
} public void onStart() {
super.onStart();
Log.e("THINBTCLIENT", "++ ON START ++");
} public void onResume() {
super.onResume();
Log.e("THINBTCLIENT", "+ ON RESUME +");
Log.e("THINBTCLIENT", "+ ABOUT TO ATTEMPT CLIENT CONNECT +");
} public void onPause() {
super.onPause();
Log.e("THINBTCLIENT", "- ON PAUSE -");
if (this.OutStream != null) {
try {
this.OutStream.flush();
} catch (IOException var3) {
Log.e("THINBTCLIENT", "ON PAUSE: Couldn\'t flush output stream.", var3);
}
} try {
this.socket.close();
} catch (IOException var2) {
Log.e("THINBTCLIENT", "ON PAUSE: Unable to close socket.", var2);
} } public void onStop() {
super.onStop();
Log.e("THINBTCLIENT", "-- ON STOP --");
} public void onDestroy() {
super.onDestroy();
Log.e("THINBTCLIENT", "--- ON DESTROY ---");
} public boolean onCreateOptionsMenu(Menu menu) {
this.getMenuInflater().inflate(2131099648, menu);
return true;
} public void openport(String ipaddress, int portnumber) {
StrictMode.setThreadPolicy((new StrictMode.ThreadPolicy.Builder()).detectDiskReads().detectDiskWrites().detectNetwork().penaltyLog().build());
StrictMode.setVmPolicy((new android.os.StrictMode.VmPolicy.Builder()).detectLeakedSqlLiteObjects().detectLeakedClosableObjects().penaltyLog().penaltyDeath().build()); try {
this.socket = new Socket(ipaddress, portnumber);
this.InStream = this.socket.getInputStream();
this.OutStream = this.socket.getOutputStream();
} catch (Exception var4) {
;
} } public void sendcommand(String message) {
byte[] msgBuffer = message.getBytes(); try {
this.OutStream.write(msgBuffer);
} catch (IOException var4) {
var4.printStackTrace();
} } public void sendcommand(byte[] message) {
try {
this.OutStream.write(message);
} catch (IOException var3) {
var3.printStackTrace();
} } public String status() {
byte[] message = new byte[]{(byte) 27, (byte) 33, (byte) 63}; try {
this.OutStream.write(message);
} catch (IOException var4) {
Log.e("THINBTCLIENT", "ON RESUME: Exception during write.", var4);
} try {
Thread.sleep(1000L);
} catch (InterruptedException var3) {
var3.printStackTrace();
} int tim;
try {
while (this.InStream.available() > 0) {
this.readBuf = new byte[1024];
tim = this.InStream.read(this.readBuf);
Log.e("","tim is "+tim);
}
} catch (IOException var5) {
var5.printStackTrace();
} if (this.readBuf[0] == 2 && this.readBuf[5] == 3) {
for (tim = 0; tim <= 7; ++tim) {
if (this.readBuf[tim] == 2 && this.readBuf[tim + 1] == 64 && this.readBuf[tim + 2] == 64 && this.readBuf[tim + 3] == 64 && this.readBuf[tim + 4] == 64 && this.readBuf[tim + 5] == 3) {
this.printerstatus = "Ready";
this.readBuf = new byte[1024];
break;
} if (this.readBuf[tim] == 2 && this.readBuf[tim + 1] == 69 && this.readBuf[tim + 2] == 64 && this.readBuf[tim + 3] == 64 && this.readBuf[tim + 4] == 96 && this.readBuf[tim + 5] == 3) {
this.printerstatus = "Head Open";
this.readBuf = new byte[1024];
break;
} if (this.readBuf[tim] == 2 && this.readBuf[tim + 1] == 64 && this.readBuf[tim + 2] == 64 && this.readBuf[tim + 3] == 64 && this.readBuf[tim + 4] == 96 && this.readBuf[tim + 5] == 3) {
this.printerstatus = "Head Open";
this.readBuf = new byte[1024];
break;
} if (this.readBuf[tim] == 2 && this.readBuf[tim + 1] == 69 && this.readBuf[tim + 2] == 64 && this.readBuf[tim + 3] == 64 && this.readBuf[tim + 4] == 72 && this.readBuf[tim + 5] == 3) {
this.printerstatus = "Ribbon Jam";
this.readBuf = new byte[1024];
break;
} if (this.readBuf[tim] == 2 && this.readBuf[tim + 1] == 69 && this.readBuf[tim + 2] == 64 && this.readBuf[tim + 3] == 64 && this.readBuf[tim + 4] == 68 && this.readBuf[tim + 5] == 3) {
this.printerstatus = "Ribbon Empty";
this.readBuf = new byte[1024];
break;
} if (this.readBuf[tim] == 2 && this.readBuf[tim + 1] == 69 && this.readBuf[tim + 2] == 64 && this.readBuf[tim + 3] == 64 && this.readBuf[tim + 4] == 65 && this.readBuf[tim + 5] == 3) {
this.printerstatus = "No Paper";
this.readBuf = new byte[1024];
break;
} if (this.readBuf[tim] == 2 && this.readBuf[tim + 1] == 69 && this.readBuf[tim + 2] == 64 && this.readBuf[tim + 3] == 64 && this.readBuf[tim + 4] == 66 && this.readBuf[tim + 5] == 3) {
this.printerstatus = "Paper Jam";
this.readBuf = new byte[1024];
break;
} if (this.readBuf[tim] == 2 && this.readBuf[tim + 1] == 69 && this.readBuf[tim + 2] == 64 && this.readBuf[tim + 3] == 64 && this.readBuf[tim + 4] == 65 && this.readBuf[tim + 5] == 3) {
this.printerstatus = "Paper Empty";
this.readBuf = new byte[1024];
break;
} if (this.readBuf[tim] == 2 && this.readBuf[tim + 1] == 67 && this.readBuf[tim + 2] == 64 && this.readBuf[tim + 3] == 64 && this.readBuf[tim + 4] == 64 && this.readBuf[tim + 5] == 3) {
this.printerstatus = "Cutting";
this.readBuf = new byte[1024];
break;
} if (this.readBuf[tim] == 2 && this.readBuf[tim + 1] == 75 && this.readBuf[tim + 2] == 64 && this.readBuf[tim + 3] == 64 && this.readBuf[tim + 4] == 64 && this.readBuf[tim + 5] == 3) {
this.printerstatus = "Waiting to Press Print Key";
this.readBuf = new byte[1024];
break;
} if (this.readBuf[tim] == 2 && this.readBuf[tim + 1] == 76 && this.readBuf[tim + 2] == 64 && this.readBuf[tim + 3] == 64 && this.readBuf[tim + 4] == 64 && this.readBuf[tim + 5] == 3) {
this.printerstatus = "Waiting to Take Label";
this.readBuf = new byte[1024];
break;
} if (this.readBuf[tim] == 2 && this.readBuf[tim + 1] == 80 && this.readBuf[tim + 2] == 64 && this.readBuf[tim + 3] == 64 && this.readBuf[tim + 4] == 64 && this.readBuf[tim + 5] == 3) {
this.printerstatus = "Printing Batch";
this.readBuf = new byte[1024];
break;
} if (this.readBuf[tim] == 2 && this.readBuf[tim + 1] == 96 && this.readBuf[tim + 2] == 64 && this.readBuf[tim + 3] == 64 && this.readBuf[tim + 4] == 64 && this.readBuf[tim + 5] == 3) {
this.printerstatus = "Pause";
this.readBuf = new byte[1024];
break;
} if (this.readBuf[tim] == 2 && this.readBuf[tim + 1] == 69 && this.readBuf[tim + 2] == 64 && this.readBuf[tim + 3] == 64 && this.readBuf[tim + 4] == 64 && this.readBuf[tim + 5] == 3) {
this.printerstatus = "Pause";
this.readBuf = new byte[1024];
break;
}
}
} return this.printerstatus;
} public String batch() {
boolean printvalue = false;
String printbatch = "";
String stringbatch = "0";
String message = "~HS";
this.readBuf = new byte[1024];
byte[] batcharray = new byte[]{(byte) 48, (byte) 48, (byte) 48, (byte) 48, (byte) 48, (byte) 48, (byte) 48, (byte) 48};
byte[] msgBuffer = message.getBytes(); try {
this.OutStream.write(msgBuffer);
} catch (IOException var9) {
Log.e("THINBTCLIENT", "ON RESUME: Exception during write.", var9);
} try {
Thread.sleep(1000L);
} catch (InterruptedException var8) {
var8.printStackTrace();
} int i;
try {
while (this.InStream.available() > 50) {
this.readBuf = new byte[1024];
i = this.InStream.read(this.readBuf);
}
} catch (IOException var10) {
var10.printStackTrace();
} if (this.readBuf[0] == 2) {
System.arraycopy(this.readBuf, 55, batcharray, 0, 8); for (i = 0; i <= 7; ++i) {
if (batcharray[i] == 44) {
batcharray = new byte[]{(byte) 57, (byte) 57, (byte) 57, (byte) 57, (byte) 57, (byte) 57, (byte) 57, (byte) 57};
}
} stringbatch = new String(batcharray);
int var11 = Integer.parseInt(stringbatch);
printbatch = Integer.toString(var11);
if (printbatch == "99999999") {
printbatch = "";
}
} return printbatch;
} public void closeport() {
try {
this.socket.close();
} catch (IOException var2) {
var2.printStackTrace();
} } public void setup(int width, int height, int speed, int density, int sensor, int sensor_distance, int sensor_offset) {
String message = "";
String size = "SIZE " + width + " mm" + ", " + height + " mm";
String speed_value = "SPEED " + speed;
String density_value = "DENSITY " + density;
String sensor_value = "";
if (sensor == 0) {
sensor_value = "GAP " + sensor_distance + " mm" + ", " + sensor_offset + " mm";
} else if (sensor == 1) {
sensor_value = "BLINE " + sensor_distance + " mm" + ", " + sensor_offset + " mm";
} message = size + "\n" + speed_value + "\n" + density_value + "\n" + sensor_value + "\n";
byte[] msgBuffer = message.getBytes(); try {
this.OutStream.write(msgBuffer);
} catch (IOException var15) {
var15.printStackTrace();
} } public void clearbuffer() {
String message = "CLS\n";
byte[] msgBuffer = message.getBytes(); try {
this.OutStream.write(msgBuffer);
} catch (IOException var4) {
var4.printStackTrace();
} } public void barcode(int x, int y, String type, int height, int human_readable, int rotation, int narrow, int wide, String string) {
String message = "";
String barcode = "BARCODE ";
String position = x + "," + y;
String mode = "\"" + type + "\"";
String height_value = "" + height;
String human_value = "" + human_readable;
String rota = "" + rotation;
String narrow_value = "" + narrow;
String wide_value = "" + wide;
String string_value = "\"" + string + "\"";
message = barcode + position + " ," + mode + " ," + height_value + " ," + human_value + " ," + rota + " ," + narrow_value + " ," + wide_value + " ," + string_value + "\n";
byte[] msgBuffer = message.getBytes(); try {
this.OutStream.write(msgBuffer);
} catch (IOException var22) {
var22.printStackTrace();
} } public void printerfont(int x, int y, String size, int rotation, int x_multiplication, int y_multiplication, String string) {
String message = "";
String text = "TEXT ";
String position = x + "," + y;
String size_value = "\"" + size + "\"";
String rota = "" + rotation;
String x_value = "" + x_multiplication;
String y_value = "" + y_multiplication;
String string_value = "\"" + string + "\"";
message = text + position + " ," + size_value + " ," + rota + " ," + x_value + " ," + y_value + " ," + string_value + "\n";
byte[] msgBuffer = message.getBytes(); try {
this.OutStream.write(msgBuffer);
} catch (IOException var18) {
var18.printStackTrace();
} } public void printlabel(int quantity, int copy) {
String message = "";
message = "PRINT " + quantity + ", " + copy + "\n";
byte[] msgBuffer = message.getBytes(); try {
this.OutStream.write(msgBuffer);
} catch (IOException var6) {
var6.printStackTrace();
} } public void formfeed() {
String message = "";
message = "FORMFEED\n";
byte[] msgBuffer = message.getBytes(); try {
this.OutStream.write(msgBuffer);
} catch (IOException var4) {
var4.printStackTrace();
} } public void nobackfeed() {
String message = "";
message = "SET TEAR OFF\n";
byte[] msgBuffer = message.getBytes(); try {
this.OutStream.write(msgBuffer);
} catch (IOException var4) {
var4.printStackTrace();
} } public void sendfile(String filename) {
try {
FileInputStream fis = new FileInputStream("/sdcard/Download/" + filename);
byte[] data = new byte[fis.available()]; while (fis.read(data) != -1) {
;
} this.OutStream.write(data);
fis.close();
} catch (Exception var4) {
;
} } public void downloadpcx(String filename) {
try {
FileInputStream fis = new FileInputStream("/sdcard/Download/" + filename);
byte[] data = new byte[fis.available()];
String download = "DOWNLOAD F,\"" + filename + "\"," + data.length + ",";
byte[] download_head = download.getBytes(); while (fis.read(data) != -1) {
;
} this.OutStream.write(download_head);
this.OutStream.write(data);
fis.close();
} catch (Exception var6) {
;
} } public void downloadbmp(String filename,Context ctxt) {
try {
//String name = android.os.Environment.getExternalStorageState()+File.separator+filename;
//FileInputStream fis = new FileInputStream(name);//("/sdcard/Download/" + filename);
byte[] data = new FileUtils(ctxt).readSDFile(filename).getBytes("gb2312");//new byte[fis.available()];
String download = "DOWNLOAD F,\"" + filename + "\"," + data.length + ",";
byte[] download_head = download.getBytes(); this.OutStream.write(download_head);
this.OutStream.write(data);
} catch (Exception var6) {
Log.e("",""+var6.getMessage());
} } public void downloadbmp(String filename) {
try {
//String name = android.os.Environment.getExternalStorageState()+File.separator+filename;
//FileInputStream fis = new FileInputStream(name);//("/sdcard/Download/" + filename);
byte[] data = new FileUtils(getApplicationContext()).readSDFile(filename).getBytes("gb2312");//new byte[fis.available()];
String download = "DOWNLOAD F,\"" + filename + "\"," + data.length + ",";
byte[] download_head = download.getBytes(); this.OutStream.write(download_head);
this.OutStream.write(data);
} catch (Exception var6) {
Log.e("",""+var6.getMessage());
} } public void downloadttf(String filename) {
try {
FileInputStream fis = new FileInputStream("/sdcard/Download/" + filename);
byte[] data = new byte[fis.available()];
String download = "DOWNLOAD F,\"" + filename + "\"," + data.length + ",";
byte[] download_head = download.getBytes(); while (fis.read(data) != -1) {
;
} this.OutStream.write(download_head);
this.OutStream.write(data);
fis.close();
} catch (Exception var6) {
;
} }
}

3、打印效果

68、TSPL指令集(标签打印机)的更多相关文章

  1. 小票打印机指令集封装(支持EPSON指令)

    最近写了一些关于小票打印机的程序,不难,但是记录下来,作为足迹吧. 现在市场上的小票机基本都支持EPSON指令.指令集文档 对指令集进行了自己的封装,方便以后调用: package aheiziUti ...

  2. 004-JVM指令集(指令码、助记符、功能描述)

    一.JVM指令助记符 1)操作数栈 变量到操作数栈:iload,iload_,lload,lload_,fload,fload_,dload,dload_,aload,aload_ 操作数栈到变量:i ...

  3. [转载]Dalvik指令集

    这篇文章是转载的,为了便于查找一些指令,贴在这里. 转自:http://blog.csdn.net/canfengxiliu/article/details/20144119 ------------ ...

  4. 【转+存】JVM指令集

    jvm指令集: 转载地址:https://www.cnblogs.com/yaoyinglong/p/4300447.html 一.未归类系列A 此系列暂未归类. 指令码    助记符         ...

  5. OpenHarmony LiteOS C-SKY指令集移植指北

    摘要:本文介绍在OpenHarmony社区LiteOS-M项目中新增C-SKY指令集的开发流程,以及适配相应qemu工程的方法和步骤,供LiteOS内核相关开发者学习交流. 本文分享自华为云社区< ...

  6. SSE指令集学习:Compiler Intrinsic

    大多数的函数是在库中,Intrinsic Function却内嵌在编译器中(built in to the compiler). 1. Intrinsic Function Intrinsic Fun ...

  7. ARM-汇编指令集(总结)

    ARM汇编指令集 指令.伪指令 (汇编)指令:   是机器码的助记符,经过汇编器编译后,由CPU执行. (汇编)伪指令:用来指导指令执行,是汇编器的产物,最终不会生成机器码. 有两种不同风格的ARM指 ...

  8. P87LPC760/61/62/64/67/68/69/78/79芯片解密单片机破解价格

    NXP恩智浦P87LPC760/61/62/64/67/68/69/78/79芯片解密单片机破解 NXP LPC700系列单片机解密型号: P87LPC759.P87LPC760.P87LPC761. ...

  9. iOS------苹果设备处理器指令集(iPhone初代到iPhone5s)

    (via 雅香小筑) Arm处理器,因为其低功耗和小尺寸而闻名,几乎所有的手机处理器都基于arm,其在嵌入式系统中的应用非常广泛,它的性能在同等功耗产品中也很出色. Armv6.armv7.armv7 ...

随机推荐

  1. js绑定事件方法:addEventListener的兼容问题

    js的事件绑定方法中,ie只支持attachEvent,而FF和Chrome只支持addEventListener;严格来说:addEventListener只有IE9以上版本的IE浏览器上能够兼容, ...

  2. centOS7虚拟机连接大网

    1.启动vm服务 如果遇到无法启动时,需要还原vm默认配置解决 2.更改vm设置为NAT模式 3.centOS开启DHCP

  3. SHOW SLAVE STATUS 详解

    MySQL同步功能由3个线程(master上1个,slave上2个)来实现.执行 DE>START SLAVEDE> 语句后,slave就创建一个I/O线程.I/O线程连接到master上 ...

  4. php使用GD库实现图片水印和缩略图——封装成类

    学完了如何使用GD库来实现对图片的各种处理,那么我们可以发现,不管哪种方法,都有相似之处,如果我们把这些相似的地方和不相似的地方都封装成类,这样就可以提升代码的速度,而且节省了很多时间,废话不多说,来 ...

  5. 无法通过CTRL+空格及SHIFT+CTRL调出输入法的解决方案

    打开任务管理器: 运行:CTFMON.EXE

  6. HDU3874 线段树 + 离线处理

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3874 , 线段树(或树状数组) + 离线处理 下午做了第一道离线处理的题目(HDU4417),多少有点 ...

  7. 2018.2.6 JS-判断用户浏览器

    JS-判断用户浏览器 在判断用户使用的浏览器是否为PC还是移动设备,有时候项目中需要用到.可在需要的项目中当全局方法来使用. 判断代码 function getMoblieDevice(window) ...

  8. MAC之tar解压与压缩gz打包命令

    tar [-cxtzjvfpPN] 文件与目录 ....参数:-c :建立一个压缩文件的参数指令(create 的意思):-x :解开一个压缩文件的参数指令!-t :查看 tarfile 里面的文件! ...

  9. WP Mail SMTP插件解决Contact Form 7表单提交失败问题

    WP Mail SMTP插件解决Contact Form 7表单提交失败问题 WP Mail SMTP是一款非常优秀的解决WordPress主机因为不支持或者是禁用了mail()函数,导致无法实现在线 ...

  10. Servlet 学习小结

    一.是什么 是用java编写的服务器端程序.从狭义来讲,servlet是java语言实现的一个接口:广义的servlet是指任何实现了这个servlet接口的类.一般情况下,人们将servlet理解为 ...