public class Lib
extends java.lang.Object
Constructor and Description |
---|
Lib(Context context)
For all status updates, the inteface OnUpdate will call "onStateChange".
|
Modifier and Type | Method and Description |
---|---|
boolean |
connect(BluetoothDevice device)
This function is used to connect your device with a bluetooth device(IN2 ROUTER).
|
boolean |
disconnect()
This function is used to disconnect your device from bluetooth device.
|
boolean |
resetFilter()
This function is used to reset filters of IN2ROUTER.
|
boolean |
scan()
This function is used to start scan of bluetooth devices.
|
boolean |
send(byte[] Buffer,
boolean isMultiple)
This function is used to send message can.
|
boolean |
setBitrate(int Bitrate)
This function is used to set bitrate of can-bun line.
|
boolean |
setFilter(byte Mailbox,
byte Type,
byte[] Id,
byte[] Mask)
This function is used to set filters of IN2ROUTER
Endianness: LITTLE ENDIAN Example: I want receive only messages with id standard 0x111. |
boolean |
startGTW()
This function is used to start user comunication from your device to a bluetooth device.
|
boolean |
stopGTW()
This function is used to end user comunication from your device to bluetooth device.
|
boolean |
stopScan()
This function is used to stop scan of bluetooth devices.
|
public Lib(Context context)
context
- Is used to set delegate of self. context will receive all updates through interface OnUpdate.OnUpdate
public boolean scan()
public boolean stopScan()
public boolean connect(BluetoothDevice device)
device
- The device that you want to connect.public boolean disconnect()
public boolean stopGTW()
public boolean startGTW()
public boolean setBitrate(int Bitrate)
Bitrate
- Allowed parameters: 50, 100, 125, 250, 500, 1000public boolean resetFilter()
public boolean setFilter(byte Mailbox, byte Type, byte[] Id, byte[] Mask)
Mailbox
- Is number of filter that you want set. Allowed parameter from 0 to 19Type
- Define type of id that you want set. Allowed parameter 0 = Standard, 1 = ExtendedId
- Byte array with capacity 4Mask
- Byte array with capacity 4public boolean send(byte[] Buffer, boolean isMultiple)