🧪 test(enable lpi plus test): lpi test

This commit is contained in:
yangwei
2024-11-26 18:59:55 +08:00
parent 1b55f09ba7
commit f80da6760d
16 changed files with 130 additions and 172 deletions

View File

@@ -6,15 +6,21 @@ extern "C"
#endif
#include "stellar/module.h"
#include "stellar/session.h"
#include "stellar/packet.h"
#define LPI_PLUS_MODULE_NAME "LPI_PLUS"
struct module *lpi_plus_init(struct module_manager *mod_mgr);
void lpi_plus_exit(struct module_manager *mod_mgr, struct module *mod);
struct lpi_plus;
struct lpi_plus *module_to_lpi_plus(struct module *mod);
typedef void lpi_plus_on_appid_callback(struct session *sess, int appid[], int packet_sequence[], size_t appid_num, void *args);
int lpi_plus_appid_subscribe(struct lpi_plus *lpip, lpi_plus_on_appid_callback *cb, void *args);
const char *lpi_plus_appid2name(struct lpi_plus *lpip, int appid);
void lpi_plus_on_packet(struct packet *pkt, struct module *mod);
int32_t *packet_exdata_to_lpip_appid(struct lpi_plus *lpip, struct packet *pkt, size_t *appid_num);
#ifdef __cplusplus
}

View File

@@ -8,6 +8,7 @@ extern "C"
#include <stdint.h>
#include "stellar/log.h"
#include "stellar/module.h"
struct stellar;
struct stellar *stellar_new(const char *toml_file);
@@ -16,6 +17,7 @@ void stellar_free(struct stellar *st);
void stellar_loopbreak(struct stellar *st);
void stellar_reload_log_level(struct stellar *st);
struct logger *stellar_get_logger(struct stellar *st);
struct module_manager *stellar_get_module_manager(struct stellar *st);
#ifdef __cplusplus
}