feat(core): add NEU_REQ_INST_TEMPLATE message

This commit is contained in:
eeff
2023-04-23 15:09:58 +08:00
parent 43005248c7
commit 082eb6393a
2 changed files with 10 additions and 0 deletions
+7
View File
@@ -101,6 +101,7 @@ typedef enum neu_reqresp_type {
NEU_RESP_UPDATE_TEMPLATE_TAG,
NEU_REQ_GET_TEMPLATE_TAG,
NEU_RESP_GET_TEMPLATE_TAG,
NEU_REQ_INST_TEMPLATE,
NEU_REQRESP_TRANS_DATA,
NEU_REQRESP_NODES_STATE,
@@ -185,6 +186,7 @@ static const char *neu_reqresp_type_string_t[] = {
[NEU_RESP_UPDATE_TEMPLATE_TAG] = "REQ_RESP_UPDATE_TEMPLATE_TAG",
[NEU_REQ_GET_TEMPLATE_TAG] = "REQ_REQ_GET_TEMPLATE_TAG",
[NEU_RESP_GET_TEMPLATE_TAG] = "REQ_RESP_GET_TEMPLATE_TAG",
[NEU_REQ_INST_TEMPLATE] = "NEU_REQ_INST_TEMPLATE",
[NEU_REQRESP_TRANS_DATA] = "NEU_REQRESP_TRANS_DATA",
[NEU_REQRESP_NODES_STATE] = "NEU_REQRESP_NODES_STATE",
@@ -544,6 +546,11 @@ typedef struct neu_req_get_template_tag {
char name[NEU_TAG_NAME_LEN];
} neu_req_get_template_tag_t;
typedef struct {
char tmpl[NEU_TEMPLATE_NAME_LEN];
char node[NEU_NODE_NAME_LEN];
} neu_req_inst_template_t;
typedef struct neu_req_update_license {
} neu_req_update_license_t;
+3
View File
@@ -1162,6 +1162,9 @@ void *neu_msg_gen(neu_reqresp_head_t *header, void *data)
case NEU_REQ_GET_TEMPLATE_TAG:
data_size = sizeof(neu_req_get_template_tag_t);
break;
case NEU_REQ_INST_TEMPLATE:
data_size = sizeof(neu_req_inst_template_t);
break;
case NEU_REQ_ADD_NODE:
case NEU_REQ_ADD_NODE_EVENT:
data_size = sizeof(neu_req_add_node_t);