16 Commits

Author SHA1 Message Date
Jef Driesen
63f5a4d652 Remove the dc_parser_set_data function
The dc_parser_set_data() function allows to re-use a parser object for
multiple dives. The advantages of this feature are actually very limited
in practice. The reduction in memory consumption is almost negligible,
because the amount of internal state in the parser is typically very
small. But the implementation requires some additional complexity
because each backend needs code to reset its internal state. Therefore,
the function is removed and the data and size needs to be passed
directly to the dc_parser_new() and dc_parser_new2() functions instead.

Because keeping a reference to the data has also caused issues in the
past, especially for applications implemented in a garbage collected
language, the data will now also get copied internally.
2023-05-15 22:19:37 +02:00
Jef Driesen
ef2402eff5 Integrate the new I/O interface in the public api
Currently the dive computer backends are responsible for opening (and
closing) the underlying I/O stream internally. The consequence is that
each backend is hardwired to a specific transport type (e.g. serial,
irda or usbhid). In order to remove this dependency and support more
than one transport type in the same backend, the opening (and closing)
of the I/O stream is moved to the application.

The dc_device_open() function is modified to accept a pointer to the I/O
stream, instead of a string with the device node (which only makes sense
for serial communication). The dive computer backends only depend on the
common I/O interface.
2018-04-03 21:11:06 +02:00
Jef Driesen
468418193b Cleanup the extract dives functions
After being removed from the public api, these functions can be changed
into local, static functions. And in a few cases, they are no longer
necessary and can be removed completely.
2017-04-22 09:11:41 +02:00
Jef Driesen
d1a06e784c Remove deprecated functions from the public api
The vendor_product_parser_create() and vendor_product_device_open()
functions should be called indirectly, through the generic
dc_device_open() and dc_parser_new() functions. And the
vendor_product_extract_dives() functions are internal functions that
should never have been part of the public api in the first place.
2017-04-18 08:41:10 +02:00
Jef Driesen
e65025b501 Separate private and public headers.
The public header files are moved to a new subdirectory, to separate
the definition of the public interface from the actual implementation.
Using an identical directory layout as the final installation has the
advantage that the example code can be build outside the project tree
without any modifications to the #include statements.
2012-06-21 21:39:24 +02:00
Jef Driesen
098b229bc6 Rename the Suunto Spyder parser as the Eon parser.
Both devices have an almost identical data format. Renaming the parser
backend makes it more consistent with the corresponding device backend.
2010-02-01 13:34:52 +00:00
Jef Driesen
094b70aa03 Use the memory buffer class for downloading individual dives. 2009-11-16 08:17:30 +00:00
Jef Driesen
3885e69079 Add fingerprint support for the Suunto Vyper, Spyder and Eon. 2009-02-23 13:04:26 +00:00
Jef Driesen
1c736835eb Autodetect the difference between a Vyper and a Spyder. 2009-02-20 12:26:15 +00:00
Jef Driesen
774c8ea2c0 Added a parser for the Suunto Spyder. 2008-10-31 14:04:28 +00:00
Jef Driesen
0395a8e542 Added a parser for the Suunto Vyper. 2008-10-31 14:04:13 +00:00
Jef Driesen
596af5a17b Add LGPL license headers. 2008-10-05 20:14:18 +00:00
Jef Driesen
ce2f9359cb Removed the interface detection code since it is no longer required. 2008-10-03 14:56:41 +00:00
Jef Driesen
b031d8dc2c Stop abusing status codes to return size information to the application.
When necessary, an output parameter is added to provide the size 
information. Status codes are strictly reserved for providing status 
information only.
2008-08-28 09:07:09 +00:00
Jef Driesen
a5fb93d199 Port the Suunto Vyper to the new api. 2008-07-04 13:35:57 +00:00
Jef Driesen
0312351bac Reorganization to separate the library and the test applications. 2008-06-04 13:30:55 +00:00