datalayer
The datalayer library enables connecting to Testo bluetooth devices and reading out measurements on Android and iOS. Callback functions can be registered for different measurement types to receive measurement values from the devices.
API
The API provides following functionality:
the permissions requests for required for bluetooth communication and
the basic functionality for creating and using bluetooth probes
ProbeFactory
The ProbeFactory
is the interface to be used for the entire functionality with Testo probes.
The functionality contains:
get discovered Testo probes (
connectableDevices
)create a Testo probe (
create()
)
To get the discovered Testo probes a attribute connectableDevices
is provided, which gives BluetoothInfo
objects.
// initialize Probe Factory
val probeFactory: ProbeFactory = ProbeFactory(application)
// get discovered Testo probes
val devices: MutableMap<String, Probe> = probeFactory.connectableDevices
BluetoothInfo
With BluetoothInfo
several device specific data for probe creation is available.
device.serialNo
device.probeType
To create a Testo probe a create
function is provided on the ProbeFactory
, which needs to be called with a BluetoothInfo
object.
// create a Testo probe
val probe = probeFactory!!.create(device)
Probe
The Probe
object contains following functionality:
subscribe notification (
subscribeNotification()
)get properties ( e.g.
getDeviceId()
,getBatteryLevel()
)disconnect (
disconnect()
)
To receive measurements pushed from a Testo probe a notification is subscribed with a MeasType
and the according notification function on a created Probe
object.
probe.subscribeNotification(
MeasType.SURFACE_TEMPERATURE,
notifyMeasValueFunc
)
To either pull attributes get
functions are available in the Probe
object.
probe.getDeviceId()
probe.getBatteryLevel()
The Probe
object also provides the disconnect functionality.
probe.disconnect()
Supported measurement instruments
testo multifunctional handle
device | material number |
---|---|
testo multifunctional handle | 0560 1020 (XX) |
probe | material number |
---|---|
testo Saveris penetration temperature probe - robust | 0612 1010 |
testo Saveris penetration temperature probe - fine | 0612 1011 |
testo Saveris cooking oil probe | 0612 1012 |
testo Saveris surface temperature probe | 0612 1013 |
testo Saveris air temperature probe | 0612 1014 |
testo Saveris TC adapter (type K) | 0612 1015 |
testo 104-IR BT
device | material number |
---|---|
testo 104-IR BT | 0560 1045 (XX) |
testo 104-IR BT | 0560 1046 (XX) |
Prerequisites
Android
Required dependency on android:
implementation files('libs/datalayer-release.aar')
iOS
To run on iOS devices without ARC following linker flag is required:
"OTHER_LDFLAGS" => "-weak_library /usr/lib/libobjc.A.dylib"
The datalayer library enables connecting to Testo bluetooth devices and reading out measurements on Android and iOS. Callback functions can be registered for different measurement types to receive measurement values from the devices.
API
The API provides following functionality:
the permissions requests for required for bluetooth communication and
the basic functionality for creating and using bluetooth probes
ProbeFactory
The ProbeFactory
is the interface to be used for the entire functionality with Testo probes.
The functionality contains:
get discovered Testo probes (
connectableDevices
)create a Testo probe (
create()
)
To get the discovered Testo probes a attribute connectableDevices
is provided, which gives BluetoothInfo
objects.
// initialize Probe Factory
val probeFactory: ProbeFactory = ProbeFactory(application)
// get discovered Testo probes
val devices: MutableMap<String, Probe> = probeFactory.connectableDevices
BluetoothInfo
With BluetoothInfo
several device specific data for probe creation is available.
device.serialNo
device.probeType
To create a Testo probe a create
function is provided on the ProbeFactory
, which needs to be called with a BluetoothInfo
object.
// create a Testo probe
val probe = probeFactory!!.create(device)
Probe
The Probe
object contains following functionality:
subscribe notification (
subscribeNotification()
)get properties ( e.g.
getDeviceId()
,getBatteryLevel()
)disconnect (
disconnect()
)
To receive measurements pushed from a Testo probe a notification is subscribed with a MeasType
and the according notification function on a created Probe
object.
probe.subscribeNotification(
MeasType.SURFACE_TEMPERATURE,
notifyMeasValueFunc
)
To either pull attributes get
functions are available in the Probe
object.
probe.getDeviceId()
probe.getBatteryLevel()
The Probe
object also provides the disconnect functionality.
probe.disconnect()
Supported measurement instruments
testo multifunctional handle
device | material number |
---|---|
testo multifunctional handle | 0560 1020 (XX) |
probe | material number |
---|---|
testo Saveris penetration temperature probe - robust | 0612 1010 |
testo Saveris penetration temperature probe - fine | 0612 1011 |
testo Saveris cooking oil probe | 0612 1012 |
testo Saveris surface temperature probe | 0612 1013 |
testo Saveris air temperature probe | 0612 1014 |
testo Saveris TC adapter (type K) | 0612 1015 |
testo 104-IR BT
device | material number |
---|---|
testo 104-IR BT | 0560 1045 (XX) |
testo 104-IR BT | 0560 1046 (XX) |
Prerequisites
Android
Required dependency on android:
implementation files('libs/datalayer-release.aar')
iOS
To run on iOS devices without ARC following linker flag is required:
"OTHER_LDFLAGS" => "-weak_library /usr/lib/libobjc.A.dylib"
The datalayer library enables connecting to Testo bluetooth devices and reading out measurements on Android and iOS. Callback functions can be registered for different measurement types to receive measurement values from the devices.
API
The API provides following functionality:
the permissions requests for required for bluetooth communication and
the basic functionality for creating and using bluetooth probes
ProbeFactory
The ProbeFactory
is the interface to be used for the entire functionality with Testo probes.
The functionality contains:
get discovered Testo probes (
connectableDevices
)create a Testo probe (
create()
)
To get the discovered Testo probes a attribute connectableDevices
is provided, which gives BluetoothInfo
objects.
// initialize Probe Factory
val probeFactory: ProbeFactory = ProbeFactory(application)
// get discovered Testo probes
val devices: MutableMap<String, Probe> = probeFactory.connectableDevices
BluetoothInfo
With BluetoothInfo
several device specific data for probe creation is available.
device.serialNo
device.probeType
To create a Testo probe a create
function is provided on the ProbeFactory
, which needs to be called with a BluetoothInfo
object.
// create a Testo probe
val probe = probeFactory!!.create(device)
Probe
The Probe
object contains following functionality:
subscribe notification (
subscribeNotification()
)get properties ( e.g.
getDeviceId()
,getBatteryLevel()
)disconnect (
disconnect()
)
To receive measurements pushed from a Testo probe a notification is subscribed with a MeasType
and the according notification function on a created Probe
object.
probe.subscribeNotification(
MeasType.SURFACE_TEMPERATURE,
notifyMeasValueFunc
)
To either pull attributes get
functions are available in the Probe
object.
probe.getDeviceId()
probe.getBatteryLevel()
The Probe
object also provides the disconnect functionality.
probe.disconnect()
Supported measurement instruments
testo multifunctional handle
device | material number |
---|---|
testo multifunctional handle | 0560 1020 (XX) |
probe | material number |
---|---|
testo Saveris penetration temperature probe - robust | 0612 1010 |
testo Saveris penetration temperature probe - fine | 0612 1011 |
testo Saveris cooking oil probe | 0612 1012 |
testo Saveris surface temperature probe | 0612 1013 |
testo Saveris air temperature probe | 0612 1014 |
testo Saveris TC adapter (type K) | 0612 1015 |
testo 104-IR BT
device | material number |
---|---|
testo 104-IR BT | 0560 1045 (XX) |
testo 104-IR BT | 0560 1046 (XX) |
Prerequisites
Android
Required dependency on android:
implementation files('libs/datalayer-release.aar')
iOS
To run on iOS devices without ARC following linker flag is required:
"OTHER_LDFLAGS" => "-weak_library /usr/lib/libobjc.A.dylib"