mirror of
https://github.com/emqx/neuron.git
synced 2026-10-18 13:41:22 +08:00
92 lines
2.3 KiB
C
92 lines
2.3 KiB
C
/**
|
|
* NEURON IIoT System for Industry 4.0
|
|
* Copyright (C) 2020-2021 EMQ Technologies Co., Ltd All rights reserved.
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 3 of the License, or (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
* along with this program; if not, write to the Free Software Foundation,
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
**/
|
|
|
|
/*
|
|
* DO NOT EDIT THIS FILE MANUALLY!
|
|
* It was automatically generated by `json-autotype`.
|
|
*/
|
|
|
|
#ifndef _NEU_JSON_API_NEU_MQTT_H_
|
|
#define _NEU_JSON_API_NEU_MQTT_H_
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include <stdint.h>
|
|
|
|
typedef enum neu_mqtt_function {
|
|
NEU_MQTT_OP_LOGIN = 1,
|
|
NEU_MQTT_OP_LOGOUT,
|
|
|
|
NEU_MQTT_OP_READ,
|
|
NEU_MQTT_OP_WRITE,
|
|
NEU_MQTT_OP_GET_TTY,
|
|
|
|
/*group config*/
|
|
NEU_MQTT_OP_ADD_GROUP_CONFIG,
|
|
NEU_MQTT_OP_UPDATE_GROUP_CONFIG,
|
|
NEU_MQTT_OP_DELETE_GROUP_CONFIG,
|
|
NEU_MQTT_OP_GET_GROUP_CONFIG,
|
|
NEU_MQTT_OP_SUBSCRIBE,
|
|
NEU_MQTT_OP_UNSUBSCRIBE,
|
|
NEU_MQTT_OP_GET_SUBSCRIBE_GRP_CONFIG,
|
|
|
|
/*tag */
|
|
NEU_MQTT_OP_ADD_TAGS,
|
|
NEU_MQTT_OP_UPDATE_TAGS,
|
|
NEU_MQTT_OP_DELETE_TAGS,
|
|
NEU_MQTT_OP_GET_TAGS,
|
|
|
|
/*nodes*/
|
|
NEU_MQTT_OP_ADD_NODES,
|
|
NEU_MQTT_OP_UPDATE_NODES,
|
|
NEU_MQTT_OP_DELETE_NODES,
|
|
NEU_MQTT_OP_GET_NODES,
|
|
NEU_MQTT_OP_NODE_SETTING,
|
|
NEU_MQTT_OP_GET_NODE_SETTING,
|
|
NEU_MQTT_OP_NODE_CTL,
|
|
NEU_MQTT_OP_GET_NODE_STATE,
|
|
|
|
/*plugin*/
|
|
NEU_MQTT_OP_ADD_PLUGIN,
|
|
NEU_MQTT_OP_UPDATE_PLUGIN,
|
|
NEU_MQTT_OP_DELETE_PLUGIN,
|
|
NEU_MQTT_OP_GET_PLUGIN,
|
|
|
|
NEU_MQTT_OP_PING,
|
|
|
|
} neu_mqtt_function_e;
|
|
|
|
typedef struct {
|
|
neu_mqtt_function_e function;
|
|
char * uuid;
|
|
} neu_json_mqtt_t;
|
|
|
|
int neu_json_decode_mqtt_req(char *buf, neu_json_mqtt_t **result);
|
|
void neu_json_decode_mqtt_req_free(neu_json_mqtt_t *req);
|
|
|
|
int neu_json_encode_mqtt_resp(void *json_object, void *param);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|