diff --git a/include/neuron/adapter.h b/include/neuron/adapter.h index 064a9eca..069b8d8a 100644 --- a/include/neuron/adapter.h +++ b/include/neuron/adapter.h @@ -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; diff --git a/src/adapter/adapter.c b/src/adapter/adapter.c index 27349081..1963142d 100644 --- a/src/adapter/adapter.c +++ b/src/adapter/adapter.c @@ -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);