ManaCountingSink counts match the mvme analysis counts for the single event is690-9Li_3H_run094 run. ~280 MB/s in release mode.
76 lines
2.2 KiB
C
76 lines
2.2 KiB
C
#ifndef A51A04C1_ABD6_4DE9_B16A_49A9DA46C67E
|
|
#define A51A04C1_ABD6_4DE9_B16A_49A9DA46C67E
|
|
|
|
#include <stdint.h>
|
|
#include <stddef.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C"
|
|
{
|
|
#endif
|
|
|
|
typedef enum
|
|
{
|
|
mana_custom,
|
|
mana_uint8,
|
|
mana_sint8,
|
|
mana_uint16,
|
|
mana_uint32,
|
|
mana_uint64,
|
|
mana_float,
|
|
mana_double,
|
|
} mana_data_type_t;
|
|
|
|
typedef struct
|
|
{
|
|
mana_data_type_t data_type;
|
|
ptrdiff_t offset;
|
|
} mana_offset_ptr_t;
|
|
|
|
typedef struct
|
|
{
|
|
mana_offset_ptr_t ptr;
|
|
size_t size_bytes;
|
|
} mana_offset_array_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, const char *descriptor_json)
|
|
|
|
#define MANA_DEFINE_PLUGIN_END_RUN(name) void name(void *context, const char *descriptor_json)
|
|
|
|
#define MANA_DEFINE_PLUGIN_EVENT_DATA(name) \
|
|
void name(void *context, uint16_t eventIndex, mana_offset_array_t *arrays, size_t arrayCount, \
|
|
size_t totalBytes)
|
|
|
|
#define MANA_DEFINE_PLUGIN_SYSTEM_EVENT(name) \
|
|
void name(void *context, const uint32_t *data, size_t size)
|
|
|
|
typedef MANA_DEFINE_PLUGIN_INIT(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_END_RUN(mana_end_run_t);
|
|
typedef MANA_DEFINE_PLUGIN_EVENT_DATA(mana_process_event_t);
|
|
typedef MANA_DEFINE_PLUGIN_SYSTEM_EVENT(mana_process_system_event_t);
|
|
|
|
typedef struct
|
|
{
|
|
mana_init_t *init;
|
|
mana_shutdown_t *shutdown;
|
|
mana_begin_run_t *begin_run;
|
|
mana_end_run_t *end_run;
|
|
mana_process_event_t *process_event;
|
|
mana_process_system_event_t *process_system_event;
|
|
} mana_plugin_t;
|
|
|
|
// plugins need to define this function with the name 'mana_get_plugin'
|
|
#define MANA_DEFINE_GET_PLUGIN(name) mana_plugin_t name()
|
|
typedef MANA_DEFINE_GET_PLUGIN(mana_get_plugin_t);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* A51A04C1_ABD6_4DE9_B16A_49A9DA46C67E */
|