add an analysis plugin api sketch
This commit is contained in:
parent
b12e8a3a8b
commit
25286dd9d2
1 changed files with 81 additions and 0 deletions
81
src/tools/mana_replay_api.h
Normal file
81
src/tools/mana_replay_api.h
Normal file
|
@ -0,0 +1,81 @@
|
|||
#ifndef DA93DC95_9F70_4B58_9B6C_5E32D3811E48
|
||||
#define DA93DC95_9F70_4B58_9B6C_5E32D3811E48
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
{
|
||||
|
||||
typedef struct
|
||||
{
|
||||
const char *name;
|
||||
size_t size;
|
||||
} array_descriptor_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
const char *module_name;
|
||||
const char *module_type;
|
||||
array_descriptor_t *data_sources;
|
||||
size_t data_source_count;
|
||||
} module_descriptor_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
const char *event_name;
|
||||
module_descriptor_t *modules;
|
||||
size_t module_count;
|
||||
} event_descriptor_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
const char *listfile_name;
|
||||
event_descriptor_t *events;
|
||||
size_t event_count;
|
||||
} run_descriptor_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
const float *data;
|
||||
size_t size;
|
||||
} const_span_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
const_span_t *data_arrays;
|
||||
size_t data_array_count;
|
||||
} module_data_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
module_data_t *modules;
|
||||
size_t module_count;
|
||||
} event_data_t;
|
||||
|
||||
#define MANA_DEFINE_PLUGIN_INIT(name) \
|
||||
void *name()
|
||||
|
||||
#define MANA_DEFINE_PLUGIN_SHUTDOWN(name) \
|
||||
void name(void *context)
|
||||
|
||||
#define MANA_DEFINE_PLUGIN_BEGIN_RUN(name) \
|
||||
void name(void *context, run_descriptor_t run_descriptor)
|
||||
|
||||
#define MANA_DEFINE_PLUGIN_END_RUN(name) \
|
||||
void name(void *context, run_descriptor_t run_descriptor)
|
||||
|
||||
#define MANA_DEFINE_PLUGIN_EVENT_DATA(name) \
|
||||
void name(void *context, int eventIndex, event_data_t event_data)
|
||||
|
||||
typedef MANA_DEFINE_PLUGIN_BEGIN_RUN(mana_init_t);
|
||||
typedef MANA_DEFINE_PLUGIN_SHUTDOWN(mana_shutdown_t);
|
||||
typedef MANA_DEFINE_PLUGIN_BEGIN_RUN(mana_begin_run_t);
|
||||
typedef MANA_DEFINE_PLUGIN_BEGIN_RUN(mana_end_run_t);
|
||||
typedef MANA_DEFINE_PLUGIN_EVENT_DATA(mana_event_data_t);
|
||||
|
||||
}
|
||||
|
||||
#endif /* DA93DC95_9F70_4B58_9B6C_5E32D3811E48 */
|
Loading…
Reference in a new issue