sdk-core
v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Toggle main menu visibility
Loading...
Searching...
No Matches
mqtt_priv.h
Go to the documentation of this file.
1
6
7
/*
8
* Copyright (c) 2016 Erik Andersson
9
* All rights reserved.
10
*
11
* Redistribution and use in source and binary forms, with or without modification,
12
* are permitted provided that the following conditions are met:
13
*
14
* 1. Redistributions of source code must retain the above copyright notice,
15
* this list of conditions and the following disclaimer.
16
* 2. Redistributions in binary form must reproduce the above copyright notice,
17
* this list of conditions and the following disclaimer in the documentation
18
* and/or other materials provided with the distribution.
19
* 3. The name of the author may not be used to endorse or promote products
20
* derived from this software without specific prior written permission.
21
*
22
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
23
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
24
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
25
* SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
27
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
30
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
31
* OF SUCH DAMAGE.
32
*
33
* This file is part of the lwIP TCP/IP stack.
34
*
35
* Author: Erik Andersson
36
*
37
*/
38
#ifndef LWIP_HDR_APPS_MQTT_PRIV_H
39
#define LWIP_HDR_APPS_MQTT_PRIV_H
40
41
#include "
lwip/apps/mqtt.h
"
42
#include "
lwip/altcp.h
"
43
44
#ifdef __cplusplus
45
extern
"C"
{
46
#endif
47
49
struct
mqtt_request_t
50
{
53
struct
mqtt_request_t
*
next
;
55
mqtt_request_cb_t
cb
;
56
void
*arg;
58
u16_t
pkt_id
;
60
u16_t
timeout_diff
;
61
};
62
64
struct
mqtt_ringbuf_t
{
65
u16_t put;
66
u16_t get;
67
u8_t buf[
MQTT_OUTPUT_RINGBUF_SIZE
];
68
};
69
71
struct
mqtt_client_s
72
{
74
u16_t
cyclic_tick
;
75
u16_t keep_alive;
76
u16_t server_watchdog;
78
u16_t
pkt_id_seq
;
80
u16_t
inpub_pkt_id
;
82
u8_t
conn_state
;
83
struct
altcp_pcb *conn;
85
void
*
connect_arg
;
86
mqtt_connection_cb_t
connect_cb;
88
struct
mqtt_request_t
*
pend_req_queue
;
89
struct
mqtt_request_t
req_list[
MQTT_REQ_MAX_IN_FLIGHT
];
90
void
*inpub_arg;
92
mqtt_incoming_data_cb_t
data_cb
;
93
mqtt_incoming_publish_cb_t
pub_cb;
95
u32_t
msg_idx
;
96
u8_t rx_buffer[
MQTT_VAR_HEADER_BUFFER_LEN
];
98
struct
mqtt_ringbuf_t
output
;
99
};
100
101
#ifdef __cplusplus
102
}
103
#endif
104
105
#endif
/* LWIP_HDR_APPS_MQTT_PRIV_H */
altcp.h
mqtt_connection_cb_t
void(*) mqtt_connection_cb_t(mqtt_client_t *client, void *arg, mqtt_connection_status_t status)
Definition
mqtt.h:128
mqtt_incoming_publish_cb_t
void(*) mqtt_incoming_publish_cb_t(void *arg, const char *topic, u32_t tot_len)
Definition
mqtt.h:163
mqtt_incoming_data_cb_t
void(*) mqtt_incoming_data_cb_t(void *arg, const u8_t *data, u16_t len, u8_t flags)
Definition
mqtt.h:151
mqtt_request_cb_t
void(*) mqtt_request_cb_t(void *arg, err_t err)
Definition
mqtt.h:175
MQTT_OUTPUT_RINGBUF_SIZE
#define MQTT_OUTPUT_RINGBUF_SIZE
Definition
mqtt_opts.h:56
MQTT_VAR_HEADER_BUFFER_LEN
#define MQTT_VAR_HEADER_BUFFER_LEN
Definition
mqtt_opts.h:64
MQTT_REQ_MAX_IN_FLIGHT
#define MQTT_REQ_MAX_IN_FLIGHT
Definition
mqtt_opts.h:71
mqtt.h
mqtt_client_s
Definition
mqtt_priv.h:72
mqtt_client_s::pend_req_queue
struct mqtt_request_t * pend_req_queue
Definition
mqtt_priv.h:88
mqtt_client_s::data_cb
mqtt_incoming_data_cb_t data_cb
Definition
mqtt_priv.h:92
mqtt_client_s::cyclic_tick
u16_t cyclic_tick
Definition
mqtt_priv.h:74
mqtt_client_s::output
struct mqtt_ringbuf_t output
Definition
mqtt_priv.h:98
mqtt_client_s::inpub_pkt_id
u16_t inpub_pkt_id
Definition
mqtt_priv.h:80
mqtt_client_s::msg_idx
u32_t msg_idx
Definition
mqtt_priv.h:95
mqtt_client_s::pkt_id_seq
u16_t pkt_id_seq
Definition
mqtt_priv.h:78
mqtt_client_s::connect_arg
void * connect_arg
Definition
mqtt_priv.h:85
mqtt_client_s::conn_state
u8_t conn_state
Definition
mqtt_priv.h:82
mqtt_request_t
Definition
mqtt_priv.h:50
mqtt_request_t::cb
mqtt_request_cb_t cb
Definition
mqtt_priv.h:55
mqtt_request_t::timeout_diff
u16_t timeout_diff
Definition
mqtt_priv.h:60
mqtt_request_t::next
struct mqtt_request_t * next
Definition
mqtt_priv.h:53
mqtt_request_t::pkt_id
u16_t pkt_id
Definition
mqtt_priv.h:58
mqtt_ringbuf_t
Definition
mqtt_priv.h:64
core
ps2ip
include
lwip_include
lwip
apps
mqtt_priv.h
Generated by
1.18.0