Chapter 4 Software Utilities
PA-3211 SERIES USER MANUAL
Page: 4-71
SendCommand
Public Boolean SendCommand (
byte[] data
);
Purpose
Send Command toSerialPort.
Value
Byte array data.
Return
True (1) on success, False (0) on failure False (0)
Example
SerialPort– Send Command to SerialPort
//Initialize a VFD class instance
SP SerialPortcontrol=
new
SP();
SerialPortcontrol
.
OpenSerialPort(19200);
byte
[] data =
newbyte
[1];
data[0] = 0x0C;
SerialPortcontrol.SendCommand(data);
Receiver Data - Attach
Public Boolean Attach();
Purpose
When class need to receiver serialport data need to use.
Return
True (1) on success, False (0) on failure False (0)
Example
Receive Data from serial port.
Before use this function need to implements Observer Interface.
Observer = Current class.
SP
SerialPortcontrol
=
new
SP();
SerialPortcontrol
.OpenSerialPort(19200);
SerialPortcontrol
.Atta
ch(
this
);
@Override
publicvoid
Update(
finalbyte
[] buffer,
finalint
size)
{runOnUiThread(
new
Runnable() {
publicvoid
run() {
if
(
mReception
!=
null
) {
mReception
.append(
new
String(buffer, 0, size));
When Close:
SerialPortcontrol.CloseSerialPort();SerialPortcontrol.Detach(
this
);
Summary of Contents for PA-3211
Page 1: ...USER MANUAL PA 3211 10 1 POS Terminal Powered by ARM Cortex A 9 Processor PA 3211 M1...
Page 15: ...Chapter 2 Getting Started PA 3211 SERIES USER MANUAL Page 2 4 2 2 3 Top View...
Page 17: ...Chapter 2 Getting Started PA 3211 SERIES USER MANUAL Page 2 6 2 2 6 Side View Unit mm 147 75...
Page 19: ...Chapter 2 Getting Started PA 3211 SERIES USER MANUAL Page 2 8 2 3 3 Top View...
Page 21: ...Chapter 2 Getting Started PA 3211 SERIES USER MANUAL Page 2 10 2 3 6 Side View 147 75...
Page 155: ...Chapter 4 Software Utilities PA 3211 SERIES USER MANUAL Page 4 86...