|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcn.com.BTPaySDK.BTPay_SDK.Common
public class BTPay_SDK.Common
Class Common includes all methods for common function.
Constructor Summary | |
---|---|
BTPay_SDK.Common()
|
Method Summary | |
---|---|
void |
close()
Close and release the Bluetooth resource. |
int |
displayMessage(java.lang.String line1,
java.lang.String line2,
java.lang.String line3,
java.lang.String line4)
Display message. |
int |
getDateTime(java.lang.StringBuilder dateTime)
Get the date and time of device. |
int |
getFirmwareVersion(java.lang.StringBuilder version)
Get the firmware version of device. |
int |
getModelNumber(java.lang.StringBuilder modNumber)
Get the model number of device. |
int |
getSDKVersion(java.lang.StringBuilder sdkVersion)
Get the version of SDK. |
int |
GetSerialNumber(java.lang.StringBuilder serialNumber)
Get the serial number of device. |
boolean |
open(java.lang.String address)
Open device with the Bluetooth interface. |
int |
ploadJPEG(int pID,
int pType,
byte[] pData)
Store picture in the device. |
int |
rebootDevice()
Reboot device. |
int |
sendBeep(int frequency,
int duration)
Control the device's beeper. |
int |
setBluetoothAddress(java.lang.String strAddress)
Set Bluetooth address. |
int |
setDateTime(java.lang.String dateTime)
Set the date and time to device. |
int |
setIdleTimeForSleep(int idleTime)
Set the time before the device into sleep mode. |
int |
setSerialNumber(java.lang.String serNumber)
Set the serial number to device. |
int |
setSleepMode(boolean sleepMode)
Change device the state of sleep mode. |
int |
showJPEG(int pID,
int X0,
int Y0,
int X1,
int Y1)
Show stored picture on the LCD. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BTPay_SDK.Common()
Method Detail |
---|
public boolean open(java.lang.String address)
address
- the valid Bluetooth MAC address.
java.security.NoSuchAlgorithmException
public void close()
public int getFirmwareVersion(java.lang.StringBuilder version)
version
- for version string.
BTPay_ErrorCode
public int getSDKVersion(java.lang.StringBuilder sdkVersion)
sdkVersion
- for version string.
BTPay_ErrorCode
public int getModelNumber(java.lang.StringBuilder modNumber)
modNumber
- for Model Number.
BTPay_ErrorCode
public int GetSerialNumber(java.lang.StringBuilder serialNumber)
serialNumber
- for Serial Number.
BTPay_ErrorCode
public int setSerialNumber(java.lang.String serNumber)
serNumber
- for Serial Number string.
BTPay_ErrorCode
public int getDateTime(java.lang.StringBuilder dateTime)
dateTime
- the device's date and time, 20121123122459.
BTPay_ErrorCode
public int setDateTime(java.lang.String dateTime)
dateTime
- the date and time in hex string,12 characters.If date is: 2012/11/23 12:24:59, dateTime should be 121123122459.
BTPay_ErrorCode
public int sendBeep(int frequency, int duration)
frequency
- the Frequency of beeper;the range from 2000 to 4000.duration
- the duration of beeper; the range from 0 to 65536.
BTPay_ErrorCode
public int setSleepMode(boolean sleepMode)
sleepMode
- true:set the device to sleep mode;
false:exit sleep mode.
BTPay_ErrorCode
public int setIdleTimeForSleep(int idleTime)
idleTime
- the time(Second).BTPay_ErrorCode
public int rebootDevice()
BTPay_ErrorCode
public int setBluetoothAddress(java.lang.String strAddress)
strAddress
- Bluetooth address 12 characters.example "00:27:15:08:27:F7".
BTPay_ErrorCode
public int ploadJPEG(int pID, int pType, byte[] pData)
pID
- for the identifier for the picture.pType
- for the picture's type.pData
- for the data of JPEG format.
BTPay_ErrorCode
public int showJPEG(int pID, int X0, int Y0, int X1, int Y1)
pID
- for the identifier for the picture;X0
- for X-coordinate of top left point;Y0
- for Y-coordinate of top left point;X1
- for X-coordinate of bottom right point;Y1
- for Y-coordinate of bottom right point.
{X0}{Y0}{X1}{Y1} is scope of LCD, 0<="X0" < "X1"< 64, 0<="Y0" < "Y1" < 128.
BTPay_ErrorCode
public int displayMessage(java.lang.String line1, java.lang.String line2, java.lang.String line3, java.lang.String line4)
line1
- Display line 1, up to 12 characters.line2
- Display line 2, up to 16 characters.line3
- Display line 3, up to 16 characters.line4
- Display line 4, up to 16 characters.BTPay_ErrorCode
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |