Properly store the context pointer internally.
I forgot to update the device and parser initialization functions to store the context pointer into the objects. As a result, the internal context pointers were always NULL.
This commit is contained in:
parent
4251f1e522
commit
cd31ff9dff
@ -100,7 +100,7 @@ atomics_cobalt_device_open (dc_device_t **out, dc_context_t *context)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
device_init (&device->base, &atomics_cobalt_device_backend);
|
device_init (&device->base, context, &atomics_cobalt_device_backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
device->context = NULL;
|
device->context = NULL;
|
||||||
|
|||||||
@ -82,7 +82,7 @@ atomics_cobalt_parser_create (dc_parser_t **out, dc_context_t *context)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
parser_init (&parser->base, &atomics_cobalt_parser_backend);
|
parser_init (&parser->base, context, &atomics_cobalt_parser_backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
parser->atmospheric = 0.0;
|
parser->atmospheric = 0.0;
|
||||||
|
|||||||
@ -186,7 +186,7 @@ cressi_edy_device_open (dc_device_t **out, dc_context_t *context, const char *na
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
device_init (&device->base, &cressi_edy_device_backend);
|
device_init (&device->base, context, &cressi_edy_device_backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
device->port = NULL;
|
device->port = NULL;
|
||||||
|
|||||||
@ -74,7 +74,7 @@ cressi_edy_parser_create (dc_parser_t **out, dc_context_t *context, unsigned int
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
parser_init (&parser->base, &cressi_edy_parser_backend);
|
parser_init (&parser->base, context, &cressi_edy_parser_backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
parser->model = model;
|
parser->model = model;
|
||||||
|
|||||||
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
|
#include <libdivecomputer/context.h>
|
||||||
#include <libdivecomputer/device.h>
|
#include <libdivecomputer/device.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
@ -72,7 +73,7 @@ struct device_backend_t {
|
|||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
device_init (dc_device_t *device, const device_backend_t *backend);
|
device_init (dc_device_t *device, dc_context_t *context, const device_backend_t *backend);
|
||||||
|
|
||||||
void
|
void
|
||||||
device_event_emit (dc_device_t *device, dc_event_type_t event, const void *data);
|
device_event_emit (dc_device_t *device, dc_event_type_t event, const void *data);
|
||||||
|
|||||||
@ -38,11 +38,11 @@
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
device_init (dc_device_t *device, const device_backend_t *backend)
|
device_init (dc_device_t *device, dc_context_t *context, const device_backend_t *backend)
|
||||||
{
|
{
|
||||||
device->backend = backend;
|
device->backend = backend;
|
||||||
|
|
||||||
device->context = NULL;
|
device->context = context;
|
||||||
|
|
||||||
device->event_mask = 0;
|
device->event_mask = 0;
|
||||||
device->event_callback = NULL;
|
device->event_callback = NULL;
|
||||||
|
|||||||
@ -200,7 +200,7 @@ hw_frog_device_open (dc_device_t **out, dc_context_t *context, const char *name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
device_init (&device->base, &hw_frog_device_backend);
|
device_init (&device->base, context, &hw_frog_device_backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
device->port = NULL;
|
device->port = NULL;
|
||||||
|
|||||||
@ -128,7 +128,7 @@ hw_ostc_device_open (dc_device_t **out, dc_context_t *context, const char *name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
device_init (&device->base, &hw_ostc_device_backend);
|
device_init (&device->base, context, &hw_ostc_device_backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
device->port = NULL;
|
device->port = NULL;
|
||||||
|
|||||||
@ -81,7 +81,7 @@ hw_ostc_parser_create (dc_parser_t **out, dc_context_t *context, unsigned int fr
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
parser_init (&parser->base, &hw_ostc_parser_backend);
|
parser_init (&parser->base, context, &hw_ostc_parser_backend);
|
||||||
|
|
||||||
parser->frog = frog;
|
parser->frog = frog;
|
||||||
|
|
||||||
|
|||||||
@ -39,12 +39,12 @@
|
|||||||
#define FP_SIZE 5
|
#define FP_SIZE 5
|
||||||
|
|
||||||
void
|
void
|
||||||
mares_common_device_init (mares_common_device_t *device, const device_backend_t *backend)
|
mares_common_device_init (mares_common_device_t *device, dc_context_t *context, const device_backend_t *backend)
|
||||||
{
|
{
|
||||||
assert (device != NULL);
|
assert (device != NULL);
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
device_init (&device->base, backend);
|
device_init (&device->base, context, backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
device->port = NULL;
|
device->port = NULL;
|
||||||
|
|||||||
@ -47,7 +47,7 @@ typedef struct mares_common_device_t {
|
|||||||
} mares_common_device_t;
|
} mares_common_device_t;
|
||||||
|
|
||||||
void
|
void
|
||||||
mares_common_device_init (mares_common_device_t *device, const device_backend_t *backend);
|
mares_common_device_init (mares_common_device_t *device, dc_context_t *context, const device_backend_t *backend);
|
||||||
|
|
||||||
dc_status_t
|
dc_status_t
|
||||||
mares_common_device_read (dc_device_t *abstract, unsigned int address, unsigned char data[], unsigned int size);
|
mares_common_device_read (dc_device_t *abstract, unsigned int address, unsigned char data[], unsigned int size);
|
||||||
|
|||||||
@ -114,7 +114,7 @@ mares_darwin_device_open (dc_device_t **out, dc_context_t *context, const char *
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
mares_common_device_init (&device->base, &mares_darwin_device_backend);
|
mares_common_device_init (&device->base, context, &mares_darwin_device_backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
memset (device->fingerprint, 0, sizeof (device->fingerprint));
|
memset (device->fingerprint, 0, sizeof (device->fingerprint));
|
||||||
|
|||||||
@ -80,7 +80,7 @@ mares_darwin_parser_create (dc_parser_t **out, dc_context_t *context, unsigned i
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
parser_init (&parser->base, &mares_darwin_parser_backend);
|
parser_init (&parser->base, context, &mares_darwin_parser_backend);
|
||||||
|
|
||||||
if (model == DARWINAIR) {
|
if (model == DARWINAIR) {
|
||||||
parser->headersize = 60;
|
parser->headersize = 60;
|
||||||
|
|||||||
@ -221,7 +221,7 @@ mares_iconhd_device_open (dc_device_t **out, dc_context_t *context, const char *
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
device_init (&device->base, &mares_iconhd_device_backend);
|
device_init (&device->base, context, &mares_iconhd_device_backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
device->port = NULL;
|
device->port = NULL;
|
||||||
|
|||||||
@ -77,7 +77,7 @@ mares_iconhd_parser_create (dc_parser_t **out, dc_context_t *context, unsigned i
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
parser_init (&parser->base, &mares_iconhd_parser_backend);
|
parser_init (&parser->base, context, &mares_iconhd_parser_backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
parser->model = model;
|
parser->model = model;
|
||||||
|
|||||||
@ -109,7 +109,7 @@ mares_nemo_device_open (dc_device_t **out, dc_context_t *context, const char *na
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
device_init (&device->base, &mares_nemo_device_backend);
|
device_init (&device->base, context, &mares_nemo_device_backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
device->port = NULL;
|
device->port = NULL;
|
||||||
|
|||||||
@ -92,7 +92,7 @@ mares_nemo_parser_create (dc_parser_t **out, dc_context_t *context, unsigned int
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
parser_init (&parser->base, &mares_nemo_parser_backend);
|
parser_init (&parser->base, context, &mares_nemo_parser_backend);
|
||||||
|
|
||||||
// Get the freedive mode for this model.
|
// Get the freedive mode for this model.
|
||||||
unsigned int freedive = 2;
|
unsigned int freedive = 2;
|
||||||
|
|||||||
@ -107,7 +107,7 @@ mares_puck_device_open (dc_device_t **out, dc_context_t *context, const char *na
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
mares_common_device_init (&device->base, &mares_puck_device_backend);
|
mares_common_device_init (&device->base, context, &mares_puck_device_backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
device->layout = NULL;
|
device->layout = NULL;
|
||||||
|
|||||||
@ -322,7 +322,7 @@ oceanic_atom2_device_open (dc_device_t **out, dc_context_t *context, const char
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
oceanic_common_device_init (&device->base, &oceanic_atom2_device_backend);
|
oceanic_common_device_init (&device->base, context, &oceanic_atom2_device_backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
device->port = NULL;
|
device->port = NULL;
|
||||||
|
|||||||
@ -101,7 +101,7 @@ oceanic_atom2_parser_create (dc_parser_t **out, dc_context_t *context, unsigned
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
parser_init (&parser->base, &oceanic_atom2_parser_backend);
|
parser_init (&parser->base, context, &oceanic_atom2_parser_backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
parser->model = model;
|
parser->model = model;
|
||||||
|
|||||||
@ -105,12 +105,12 @@ oceanic_common_match (const unsigned char *pattern, const unsigned char *string,
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
oceanic_common_device_init (oceanic_common_device_t *device, const device_backend_t *backend)
|
oceanic_common_device_init (oceanic_common_device_t *device, dc_context_t *context, const device_backend_t *backend)
|
||||||
{
|
{
|
||||||
assert (device != NULL);
|
assert (device != NULL);
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
device_init (&device->base, backend);
|
device_init (&device->base, context, backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
memset (device->fingerprint, 0, sizeof (device->fingerprint));
|
memset (device->fingerprint, 0, sizeof (device->fingerprint));
|
||||||
|
|||||||
@ -64,7 +64,7 @@ int
|
|||||||
oceanic_common_match (const unsigned char *pattern, const unsigned char *string, unsigned int n);
|
oceanic_common_match (const unsigned char *pattern, const unsigned char *string, unsigned int n);
|
||||||
|
|
||||||
void
|
void
|
||||||
oceanic_common_device_init (oceanic_common_device_t *device, const device_backend_t *backend);
|
oceanic_common_device_init (oceanic_common_device_t *device, dc_context_t *context, const device_backend_t *backend);
|
||||||
|
|
||||||
dc_status_t
|
dc_status_t
|
||||||
oceanic_common_device_set_fingerprint (dc_device_t *device, const unsigned char data[], unsigned int size);
|
oceanic_common_device_set_fingerprint (dc_device_t *device, const unsigned char data[], unsigned int size);
|
||||||
|
|||||||
@ -233,7 +233,7 @@ oceanic_veo250_device_open (dc_device_t **out, dc_context_t *context, const char
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
oceanic_common_device_init (&device->base, &oceanic_veo250_device_backend);
|
oceanic_common_device_init (&device->base, context, &oceanic_veo250_device_backend);
|
||||||
|
|
||||||
// Override the base class values.
|
// Override the base class values.
|
||||||
device->base.layout = &oceanic_veo250_layout;
|
device->base.layout = &oceanic_veo250_layout;
|
||||||
|
|||||||
@ -80,7 +80,7 @@ oceanic_veo250_parser_create (dc_parser_t **out, dc_context_t *context, unsigned
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
parser_init (&parser->base, &oceanic_veo250_parser_backend);
|
parser_init (&parser->base, context, &oceanic_veo250_parser_backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
parser->model = model;
|
parser->model = model;
|
||||||
|
|||||||
@ -265,7 +265,7 @@ oceanic_vtpro_device_open (dc_device_t **out, dc_context_t *context, const char
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
oceanic_common_device_init (&device->base, &oceanic_vtpro_device_backend);
|
oceanic_common_device_init (&device->base, context, &oceanic_vtpro_device_backend);
|
||||||
|
|
||||||
// Override the base class values.
|
// Override the base class values.
|
||||||
device->base.multipage = MULTIPAGE;
|
device->base.multipage = MULTIPAGE;
|
||||||
|
|||||||
@ -79,7 +79,7 @@ oceanic_vtpro_parser_create (dc_parser_t **out, dc_context_t *context)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
parser_init (&parser->base, &oceanic_vtpro_parser_backend);
|
parser_init (&parser->base, context, &oceanic_vtpro_parser_backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
parser->cached = 0;
|
parser->cached = 0;
|
||||||
|
|||||||
@ -56,7 +56,7 @@ struct parser_backend_t {
|
|||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
parser_init (dc_parser_t *parser, const parser_backend_t *backend);
|
parser_init (dc_parser_t *parser, dc_context_t *context, const parser_backend_t *backend);
|
||||||
|
|
||||||
typedef struct sample_statistics_t {
|
typedef struct sample_statistics_t {
|
||||||
unsigned int divetime;
|
unsigned int divetime;
|
||||||
|
|||||||
@ -121,10 +121,10 @@ dc_parser_new (dc_parser_t **out, dc_device_t *device)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
parser_init (dc_parser_t *parser, const parser_backend_t *backend)
|
parser_init (dc_parser_t *parser, dc_context_t *context, const parser_backend_t *backend)
|
||||||
{
|
{
|
||||||
parser->backend = backend;
|
parser->backend = backend;
|
||||||
parser->context = NULL;
|
parser->context = context;
|
||||||
parser->data = NULL;
|
parser->data = NULL;
|
||||||
parser->size = 0;
|
parser->size = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -105,7 +105,7 @@ reefnet_sensus_device_open (dc_device_t **out, dc_context_t *context, const char
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
device_init (&device->base, &reefnet_sensus_device_backend);
|
device_init (&device->base, context, &reefnet_sensus_device_backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
device->port = NULL;
|
device->port = NULL;
|
||||||
|
|||||||
@ -86,7 +86,7 @@ reefnet_sensus_parser_create (dc_parser_t **out, dc_context_t *context, unsigned
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
parser_init (&parser->base, &reefnet_sensus_parser_backend);
|
parser_init (&parser->base, context, &reefnet_sensus_parser_backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
parser->atmospheric = ATM;
|
parser->atmospheric = ATM;
|
||||||
|
|||||||
@ -84,7 +84,7 @@ reefnet_sensuspro_device_open (dc_device_t **out, dc_context_t *context, const c
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
device_init (&device->base, &reefnet_sensuspro_device_backend);
|
device_init (&device->base, context, &reefnet_sensuspro_device_backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
device->port = NULL;
|
device->port = NULL;
|
||||||
|
|||||||
@ -85,7 +85,7 @@ reefnet_sensuspro_parser_create (dc_parser_t **out, dc_context_t *context, unsig
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
parser_init (&parser->base, &reefnet_sensuspro_parser_backend);
|
parser_init (&parser->base, context, &reefnet_sensuspro_parser_backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
parser->atmospheric = ATM;
|
parser->atmospheric = ATM;
|
||||||
|
|||||||
@ -90,7 +90,7 @@ reefnet_sensusultra_device_open (dc_device_t **out, dc_context_t *context, const
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
device_init (&device->base, &reefnet_sensusultra_device_backend);
|
device_init (&device->base, context, &reefnet_sensusultra_device_backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
device->port = NULL;
|
device->port = NULL;
|
||||||
|
|||||||
@ -85,7 +85,7 @@ reefnet_sensusultra_parser_create (dc_parser_t **out, dc_context_t *context, uns
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
parser_init (&parser->base, &reefnet_sensusultra_parser_backend);
|
parser_init (&parser->base, context, &reefnet_sensusultra_parser_backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
parser->atmospheric = ATM;
|
parser->atmospheric = ATM;
|
||||||
|
|||||||
@ -31,12 +31,12 @@
|
|||||||
#define RB_PROFILE_PEEK(a,l) ringbuffer_decrement (a, l->peek, l->rb_profile_begin, l->rb_profile_end)
|
#define RB_PROFILE_PEEK(a,l) ringbuffer_decrement (a, l->peek, l->rb_profile_begin, l->rb_profile_end)
|
||||||
|
|
||||||
void
|
void
|
||||||
suunto_common_device_init (suunto_common_device_t *device, const device_backend_t *backend)
|
suunto_common_device_init (suunto_common_device_t *device, dc_context_t *context, const device_backend_t *backend)
|
||||||
{
|
{
|
||||||
assert (device != NULL);
|
assert (device != NULL);
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
device_init (&device->base, backend);
|
device_init (&device->base, context, backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
memset (device->fingerprint, 0, sizeof (device->fingerprint));
|
memset (device->fingerprint, 0, sizeof (device->fingerprint));
|
||||||
|
|||||||
@ -46,7 +46,7 @@ typedef struct suunto_common_layout_t {
|
|||||||
} suunto_common_layout_t;
|
} suunto_common_layout_t;
|
||||||
|
|
||||||
void
|
void
|
||||||
suunto_common_device_init (suunto_common_device_t *device, const device_backend_t *backend);
|
suunto_common_device_init (suunto_common_device_t *device, dc_context_t *context, const device_backend_t *backend);
|
||||||
|
|
||||||
dc_status_t
|
dc_status_t
|
||||||
suunto_common_device_set_fingerprint (dc_device_t *device, const unsigned char data[], unsigned int size);
|
suunto_common_device_set_fingerprint (dc_device_t *device, const unsigned char data[], unsigned int size);
|
||||||
|
|||||||
@ -42,12 +42,12 @@
|
|||||||
#define BACKEND(abstract) ((suunto_common2_device_backend_t *) abstract->backend)
|
#define BACKEND(abstract) ((suunto_common2_device_backend_t *) abstract->backend)
|
||||||
|
|
||||||
void
|
void
|
||||||
suunto_common2_device_init (suunto_common2_device_t *device, const suunto_common2_device_backend_t *backend)
|
suunto_common2_device_init (suunto_common2_device_t *device, dc_context_t *context, const suunto_common2_device_backend_t *backend)
|
||||||
{
|
{
|
||||||
assert (device != NULL);
|
assert (device != NULL);
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
device_init (&device->base, &backend->base);
|
device_init (&device->base, context, &backend->base);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
device->layout = NULL;
|
device->layout = NULL;
|
||||||
|
|||||||
@ -50,7 +50,7 @@ typedef struct suunto_common2_device_backend_t {
|
|||||||
} suunto_common2_device_backend_t;
|
} suunto_common2_device_backend_t;
|
||||||
|
|
||||||
void
|
void
|
||||||
suunto_common2_device_init (suunto_common2_device_t *device, const suunto_common2_device_backend_t *backend);
|
suunto_common2_device_init (suunto_common2_device_t *device, dc_context_t *context, const suunto_common2_device_backend_t *backend);
|
||||||
|
|
||||||
dc_status_t
|
dc_status_t
|
||||||
suunto_common2_device_set_fingerprint (dc_device_t *device, const unsigned char data[], unsigned int size);
|
suunto_common2_device_set_fingerprint (dc_device_t *device, const unsigned char data[], unsigned int size);
|
||||||
|
|||||||
@ -138,7 +138,7 @@ suunto_d9_device_open (dc_device_t **out, dc_context_t *context, const char *nam
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
suunto_common2_device_init (&device->base, &suunto_d9_device_backend);
|
suunto_common2_device_init (&device->base, context, &suunto_d9_device_backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
device->port = NULL;
|
device->port = NULL;
|
||||||
|
|||||||
@ -97,7 +97,7 @@ suunto_d9_parser_create (dc_parser_t **out, dc_context_t *context, unsigned int
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
parser_init (&parser->base, &suunto_d9_parser_backend);
|
parser_init (&parser->base, context, &suunto_d9_parser_backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
parser->model = model;
|
parser->model = model;
|
||||||
|
|||||||
@ -89,7 +89,7 @@ suunto_eon_device_open (dc_device_t **out, dc_context_t *context, const char *na
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
suunto_common_device_init (&device->base, &suunto_eon_device_backend);
|
suunto_common_device_init (&device->base, context, &suunto_eon_device_backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
device->port = NULL;
|
device->port = NULL;
|
||||||
|
|||||||
@ -79,7 +79,7 @@ suunto_eon_parser_create (dc_parser_t **out, dc_context_t *context, int spyder)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
parser_init (&parser->base, &suunto_eon_parser_backend);
|
parser_init (&parser->base, context, &suunto_eon_parser_backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
parser->spyder = spyder;
|
parser->spyder = spyder;
|
||||||
|
|||||||
@ -82,7 +82,7 @@ suunto_solution_device_open (dc_device_t **out, dc_context_t *context, const cha
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
device_init (&device->base, &suunto_solution_device_backend);
|
device_init (&device->base, context, &suunto_solution_device_backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
device->port = NULL;
|
device->port = NULL;
|
||||||
|
|||||||
@ -76,7 +76,7 @@ suunto_solution_parser_create (dc_parser_t **out, dc_context_t *context)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
parser_init (&parser->base, &suunto_solution_parser_backend);
|
parser_init (&parser->base, context, &suunto_solution_parser_backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
parser->cached = 0;
|
parser->cached = 0;
|
||||||
|
|||||||
@ -109,7 +109,7 @@ suunto_vyper_device_open (dc_device_t **out, dc_context_t *context, const char *
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
suunto_common_device_init (&device->base, &suunto_vyper_device_backend);
|
suunto_common_device_init (&device->base, context, &suunto_vyper_device_backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
device->port = NULL;
|
device->port = NULL;
|
||||||
|
|||||||
@ -88,7 +88,7 @@ suunto_vyper2_device_open (dc_device_t **out, dc_context_t *context, const char
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
suunto_common2_device_init (&device->base, &suunto_vyper2_device_backend);
|
suunto_common2_device_init (&device->base, context, &suunto_vyper2_device_backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
device->port = NULL;
|
device->port = NULL;
|
||||||
|
|||||||
@ -77,7 +77,7 @@ suunto_vyper_parser_create (dc_parser_t **out, dc_context_t *context)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
parser_init (&parser->base, &suunto_vyper_parser_backend);
|
parser_init (&parser->base, context, &suunto_vyper_parser_backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
parser->cached = 0;
|
parser->cached = 0;
|
||||||
|
|||||||
@ -91,7 +91,7 @@ uwatec_aladin_device_open (dc_device_t **out, dc_context_t *context, const char
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
device_init (&device->base, &uwatec_aladin_device_backend);
|
device_init (&device->base, context, &uwatec_aladin_device_backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
device->port = NULL;
|
device->port = NULL;
|
||||||
|
|||||||
@ -89,7 +89,7 @@ uwatec_memomouse_device_open (dc_device_t **out, dc_context_t *context, const ch
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
device_init (&device->base, &uwatec_memomouse_device_backend);
|
device_init (&device->base, context, &uwatec_memomouse_device_backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
device->port = NULL;
|
device->port = NULL;
|
||||||
|
|||||||
@ -75,7 +75,7 @@ uwatec_memomouse_parser_create (dc_parser_t **out, dc_context_t *context, unsign
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
parser_init (&parser->base, &uwatec_memomouse_parser_backend);
|
parser_init (&parser->base, context, &uwatec_memomouse_parser_backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
parser->devtime = devtime;
|
parser->devtime = devtime;
|
||||||
|
|||||||
@ -165,7 +165,7 @@ uwatec_smart_device_open (dc_device_t **out, dc_context_t *context)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
device_init (&device->base, &uwatec_smart_device_backend);
|
device_init (&device->base, context, &uwatec_smart_device_backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
device->socket = NULL;
|
device->socket = NULL;
|
||||||
|
|||||||
@ -89,7 +89,7 @@ uwatec_smart_parser_create (dc_parser_t **out, dc_context_t *context, unsigned i
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
parser_init (&parser->base, &uwatec_smart_parser_backend);
|
parser_init (&parser->base, context, &uwatec_smart_parser_backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
parser->model = model;
|
parser->model = model;
|
||||||
|
|||||||
@ -150,7 +150,7 @@ zeagle_n2ition3_device_open (dc_device_t **out, dc_context_t *context, const cha
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the base class.
|
// Initialize the base class.
|
||||||
device_init (&device->base, &zeagle_n2ition3_device_backend);
|
device_init (&device->base, context, &zeagle_n2ition3_device_backend);
|
||||||
|
|
||||||
// Set the default values.
|
// Set the default values.
|
||||||
device->port = NULL;
|
device->port = NULL;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user