Chapter 4 Software Utilities
PA-3211 SERIES USER MANUAL
Page: 4-58
Receiver Data - Attach
Public Boolean Attach();
Purpose
Receive Ibutton Data
Return
True (1) on success, False (0) on failure False (0)
Example
Receive Data from Ibutton.
Before use this function need to implements ObserverInterface.
Observer = Current class.
Public class
IbuttonActivity
extends
Activity
implements
android.Ibutton.Observer {
EditText
mReception
;
Ibutton Ibtncontrol ;
@Override
Protected void
onCreate(Bundle savedInstanceState) {
super
.onCreate(savedInstanceState);
setContentView(R.layout.
activity_ibutton
);
mReception
= (EditText)
findViewById(R.id.
EditTextReception
);
Ibtncontrol
=
new
Ibutton();
Ibtncontrol
.OpenIbtn(115200);
Ibtncontrol
.Attach(
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:
Ibtncontrol
.CloseIbtn();
Ibtncontrol
.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...