68、TSPL指令集(标签打印机)
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指令集(标签打印机)的更多相关文章
- 小票打印机指令集封装(支持EPSON指令)
最近写了一些关于小票打印机的程序,不难,但是记录下来,作为足迹吧. 现在市场上的小票机基本都支持EPSON指令.指令集文档 对指令集进行了自己的封装,方便以后调用: package aheiziUti ...
- 004-JVM指令集(指令码、助记符、功能描述)
一.JVM指令助记符 1)操作数栈 变量到操作数栈:iload,iload_,lload,lload_,fload,fload_,dload,dload_,aload,aload_ 操作数栈到变量:i ...
- [转载]Dalvik指令集
这篇文章是转载的,为了便于查找一些指令,贴在这里. 转自:http://blog.csdn.net/canfengxiliu/article/details/20144119 ------------ ...
- 【转+存】JVM指令集
jvm指令集: 转载地址:https://www.cnblogs.com/yaoyinglong/p/4300447.html 一.未归类系列A 此系列暂未归类. 指令码 助记符 ...
- OpenHarmony LiteOS C-SKY指令集移植指北
摘要:本文介绍在OpenHarmony社区LiteOS-M项目中新增C-SKY指令集的开发流程,以及适配相应qemu工程的方法和步骤,供LiteOS内核相关开发者学习交流. 本文分享自华为云社区< ...
- SSE指令集学习:Compiler Intrinsic
大多数的函数是在库中,Intrinsic Function却内嵌在编译器中(built in to the compiler). 1. Intrinsic Function Intrinsic Fun ...
- ARM-汇编指令集(总结)
ARM汇编指令集 指令.伪指令 (汇编)指令: 是机器码的助记符,经过汇编器编译后,由CPU执行. (汇编)伪指令:用来指导指令执行,是汇编器的产物,最终不会生成机器码. 有两种不同风格的ARM指 ...
- P87LPC760/61/62/64/67/68/69/78/79芯片解密单片机破解价格
NXP恩智浦P87LPC760/61/62/64/67/68/69/78/79芯片解密单片机破解 NXP LPC700系列单片机解密型号: P87LPC759.P87LPC760.P87LPC761. ...
- iOS------苹果设备处理器指令集(iPhone初代到iPhone5s)
(via 雅香小筑) Arm处理器,因为其低功耗和小尺寸而闻名,几乎所有的手机处理器都基于arm,其在嵌入式系统中的应用非常广泛,它的性能在同等功耗产品中也很出色. Armv6.armv7.armv7 ...
随机推荐
- form表单上传域(type="file")的使用----上传文件
一,单个文件的上传 1.html/jsp页面 <%@ page language="java" contentType="text/html; charset=UT ...
- linux nginx 404错误页面设置
配置nginx 实现404错误 返回一个页面 1.配置nginx.conf 在http代码块 添加 fastcgi_intercept_errors on; 2.在网站的sever代码块 添加 err ...
- WPF样式学习:ToolBar的使用
隐藏拖动把手: 设置ToolBar属性 ToolBarTray.IsLocked="True",可以达到隐藏拖动把手的目的 private void ToolBar_Loaded( ...
- Pixel XL 刷机及Root详细方法
需要准备的文件: 获取 Google USB 驱动程序并安装 https://developer.android.com/studio/run/win-usb 下载Google官方镜像文件 [8.1. ...
- uvm_dpi——DPI在UVM中的实现(一)
文件: src/dpi/uvm_dpi.svh 类: 无 SystemVerilog DPI,全称SystemVerilog直接编程接口 (英语:SystemVerilog Direct Pro ...
- Java反序列化漏洞详解
Java反序列化漏洞从爆出到现在快2个月了,已有白帽子实现了jenkins,weblogic,jboss等的代码执行利用工具.本文对于Java反序列化的漏洞简述后,并对于Java反序列化的Poc进 ...
- python 之 BeautifulSoup 常用提取
一.bs4信息提取后返回的数据类型 soup.find('tbody') ---> 返回结构是一个bs4.element.Tag soup.find('tbody').children ---& ...
- 在eclipse上搭建springBoot
1,具体步骤网上有,需要注意的是,如果是maven项目,需要先下载maven,配置环境变量,再在eclipse-windows -- preference -- maven,选择usersetting ...
- LeetCode 4Sum 4个数之和
题意:这是继2sum和3sum之后的4sum,同理,也是找到所有4个元素序列,满足他们之和为target.以vector<vector<int>>来返回,也就是二维的,列长为4 ...
- [Rails学习之路]Rails路由配置
如果是使用Rails的默认约定,那么几乎是零配置. 但有些时候,我们可能不得不(或者更喜欢)进行一些特殊的配置. 其实Rails在路由功能中也有很丰富的配置选项. routes.rb文件中靠前的规则优 ...