Move event handling from global variable to handle
- remove global event function pointer - add event function pointer to handle structure - add handle parameter to register functions - move all register functions to mbus-protocol-aux.c
This commit is contained in:
@ -513,18 +513,9 @@ typedef struct _mbus_data_secondary_address {
|
||||
//
|
||||
// Event callback functions
|
||||
//
|
||||
extern void (*_mbus_recv_event)(unsigned char src_type, const char *buff, size_t len);
|
||||
extern void (*_mbus_send_event)(unsigned char src_type, const char *buff, size_t len);
|
||||
|
||||
void mbus_dump_recv_event(unsigned char src_type, const char *buff, size_t len);
|
||||
void mbus_dump_send_event(unsigned char src_type, const char *buff, size_t len);
|
||||
|
||||
//
|
||||
// Event register functions
|
||||
//
|
||||
void mbus_register_recv_event(void (*event)(unsigned char src_type, const char *buff, size_t len));
|
||||
void mbus_register_send_event(void (*event)(unsigned char src_type, const char *buff, size_t len));
|
||||
|
||||
//
|
||||
// variable length records
|
||||
//
|
||||
|
Reference in New Issue
Block a user