10 Commits

Author SHA1 Message Date
Jef Driesen
fe9b47f4bd Document the device descriptor functions 2023-08-24 17:18:24 +02:00
Jef Driesen
ed871137b1 Export the filter function in the public api
The functionality provided by the filter function is not only useful for
the built-in transports, but also for the applications. For example in
combination with a custom transport.
2023-08-24 17:18:24 +02:00
Jef Driesen
30ea13b36b Remove the obsolete transport function
With the support for multiple transports per device, the
dc_descriptor_get_transport() function became obsolete because it does
support only a single transport type. Applications should use the new
dc_descriptor_get_transports() function instead.
2018-04-03 21:11:06 +02:00
Jef Driesen
eed993fd16 Add support for multiple transports per device
Several dive computers support multiple transports. For example the
Suunto Eon Steel supports both USB HID and BLE. All devices using
bluetooth classic communication support both the native bluetooth
transport and the legacy serial port emulation.

To support this feature, the values of the dc_transport_t type are
changed into bitmasks, and the dc_descriptor_t struct is extended with a
bitfield with all the supported transports.
2018-04-03 21:11:06 +02:00
Jef Driesen
3230387fff Add the transport type to the I/O stream
Add a function to query the underlying transport type. This allows the
dive computer backends to implement transport specific behaviour where
necessary.

For the built-in I/O implementations, the transport type is obviously
always hardcoded, but for a custom I/O implementation the application
needs to provide the correct type. Hence the transport type can't be
hardcoded in the vtable and needs to be passed as a parameter.
2018-04-03 21:11:06 +02:00
Jef Driesen
37392a03f2 Add a separate transport type for USB HID 2017-06-02 12:11:39 +02:00
Jef Driesen
58eebf4ece Add a bluetooth transport type 2017-06-02 12:11:39 +02:00
Jef Driesen
d4a8f2eb40 Add support for retrieving the transport type.
With the new interface, an application can easily retrieve the
underlying transport type from the device descriptors and present a
custom user interface element to the end-user for supplying transport
specific parameters. For example the serial port for devices using
serial communcication.

For devices using a usb-serial chipset or the bluetooth Serial Port
Profile (SPP/rfcomm), the transport type is DC_TRANSPORT_SERIAL, because
internally the serial emulation layer is used for the communication.
2013-04-16 20:54:25 +02:00
Jef Driesen
79eade6e06 Add the device enumeration support.
Applications can now enumerate all the supported devices at runtime,
and don't have to maintain their own list anymore. The internal list
does include only those devices that have been confirmed to work at
least once without any major problems.
2012-06-21 21:42:37 +02:00
Jef Driesen
a78cf2f939 Add a new device descriptor object.
As the name already indicates, a device descriptor is lightweight
object which describes a single device. Currently, the api supports
getting the device name (vendor and product) and model number. But
this can extended with other features when necessary.
2012-06-21 21:42:37 +02:00