+static enum HostMessageT get_ack_msg_id(const enum HostMessageT id)
+{
+ switch (id) {
+ case NMSG_KEEP_ALIVE:
+ return NMSG_KEEP_ALIVE_ACK;
+ case NMSG_START:
+ return NMSG_START_ACK;
+ case NMSG_STOP:
+ return NMSG_STOP_ACK;
+ case NMSG_CONFIG:
+ return NMSG_CONFIG_ACK;
+ case NMSG_BINARY_INFO:
+ return NMSG_BINARY_INFO_ACK;
+ case NMSG_GET_TARGET_INFO:
+ return NMSG_GET_TARGET_INFO_ACK;
+ case NMSG_SWAP_INST_ADD:
+ return NMSG_SWAP_INST_ADD_ACK;
+ case NMSG_SWAP_INST_REMOVE:
+ return NMSG_SWAP_INST_REMOVE_ACK;
+ default:
+ LOGE("Fatal: unknown message ID [0x%X]\n", id);
+ exit(EXIT_FAILURE);
+ }
+}
+