mirror of
https://github.com/emqx/neuron.git
synced 2026-10-18 13:41:22 +08:00
76 lines
2.1 KiB
C
76 lines
2.1 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_JSON_RW_H_
|
|
#define _NEU_JSON_API_NEU_JSON_RW_H_
|
|
|
|
#include "json/json.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef struct {
|
|
int64_t id;
|
|
enum neu_json_type t;
|
|
union neu_json_value value;
|
|
} neu_json_read_resp_tag_t;
|
|
|
|
typedef struct {
|
|
int n_tag;
|
|
neu_json_read_resp_tag_t *tags;
|
|
} neu_json_read_resp_t;
|
|
|
|
int neu_json_encode_read_resp(void *json_object, void *param);
|
|
|
|
typedef struct {
|
|
int64_t id;
|
|
enum neu_json_type t;
|
|
union neu_json_value value;
|
|
} neu_json_write_req_tag_t;
|
|
|
|
typedef struct {
|
|
int n_tag;
|
|
neu_json_write_req_tag_t *tags;
|
|
char * group_config_name;
|
|
int64_t node_id;
|
|
} neu_json_write_req_t;
|
|
|
|
int neu_json_decode_write_req(char *buf, neu_json_write_req_t **result);
|
|
void neu_json_decode_write_req_free(neu_json_write_req_t *req);
|
|
|
|
typedef struct {
|
|
char * group_config_name;
|
|
int64_t node_id;
|
|
} neu_json_read_req_t;
|
|
|
|
int neu_json_decode_read_req(char *buf, neu_json_read_req_t **result);
|
|
void neu_json_decode_read_req_free(neu_json_read_req_t *req);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|