EDM first effort
This commit is contained in:
parent
ef7348ee90
commit
ba2a47b08d
|
|
@ -11,6 +11,7 @@ ADD_EXECUTABLE(it2s-itss-facilities
|
||||||
tpm.c
|
tpm.c
|
||||||
vcm.c
|
vcm.c
|
||||||
evm.c
|
evm.c
|
||||||
|
edm.c
|
||||||
)
|
)
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES(it2s-itss-facilities
|
TARGET_LINK_LIBRARIES(it2s-itss-facilities
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
#include "edm.h"
|
||||||
|
|
||||||
|
int edm_encap(void* its_msg, int its_msg_type) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int edm_decap(uint8_t* data, uint16_t data_len) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#define EDM_VE_MAX_MSGS 16
|
||||||
|
#define EDM_MAX_VES 16
|
||||||
|
|
||||||
|
typedef enum VE_MSG_TYPE {
|
||||||
|
iid,
|
||||||
|
hash
|
||||||
|
} VE_MSG_TYPE_e;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* event message
|
||||||
|
*/
|
||||||
|
typedef struct ve_msg {
|
||||||
|
VE_MSG_TYPE_e present;
|
||||||
|
union {
|
||||||
|
uint32_t iid;
|
||||||
|
uint8_t hash[32];
|
||||||
|
} choice;
|
||||||
|
} ve_msg_t;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* event
|
||||||
|
*/
|
||||||
|
typedef struct ve {
|
||||||
|
uint32_t id;
|
||||||
|
|
||||||
|
uint64_t t_init;
|
||||||
|
uint64_t t_la;
|
||||||
|
|
||||||
|
ve_msg_t* ve_msgs[EDM_VE_MAX_MSGS];
|
||||||
|
uint8_t ve_msgs_len;
|
||||||
|
} ve_t;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* event data manager
|
||||||
|
*/
|
||||||
|
typedef struct edm {
|
||||||
|
ve_t* ves[EDM_MAX_VES];
|
||||||
|
uint8_t ves_len;
|
||||||
|
} edm_t;
|
||||||
|
|
||||||
|
|
||||||
|
int edm_encap(void* its_msg, int its_msg_type);
|
||||||
|
int edm_decap(uint8_t* data, uint16_t data_len);
|
||||||
Loading…
Reference in New Issue