libdivecomputer.c: Add support for raw data buffer parse using libdc

Add function libdc_buffer_parser() intended to parse raw data buffers
prepared for libdivecomputer. We have to commit elsewhere the necesary
assembly tasks to achieve consistent data.

Actually only OSTCTools import makes use of this feature. Uwatec families
have been included as I expect to make use of this function for sample
parsing in datatrak import (and, may be in a far future, smartrak).

Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Salvador Cuñat 2015-04-04 00:51:38 +02:00 committed by Dirk Hohndel
parent 0fe21637ad
commit 094d0d9699
2 changed files with 64 additions and 0 deletions

View file

@ -44,6 +44,7 @@ typedef struct device_data_t
const char *errmsg (dc_status_t rc);
const char *do_libdivecomputer_import(device_data_t *data);
const char *do_uemis_import(device_data_t *data);
dc_status_t libdc_buffer_parser(struct dive *dive, device_data_t *data, unsigned char *buffer, int size);
extern int import_thread_cancelled;
extern const char *progress_bar_text;