Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
3rdparty
paho.mqtt.c
src
samples
pubsub_opts.h
Go to the documentation of this file.
1
/*******************************************************************************
2
* Copyright (c) 2012, 2018 IBM Corp.
3
*
4
* All rights reserved. This program and the accompanying materials
5
* are made available under the terms of the Eclipse Public License v2.0
6
* and Eclipse Distribution License v1.0 which accompany this distribution.
7
*
8
* The Eclipse Public License is available at
9
* https://www.eclipse.org/legal/epl-2.0/
10
* and the Eclipse Distribution License is available at
11
* http://www.eclipse.org/org/documents/edl-v10.php.
12
*
13
* Contributors:
14
* Ian Craggs - initial contribution
15
* Guilherme Maciel Ferreira - add keep alive option
16
*******************************************************************************/
17
18
#if !defined(PUBSUB_OPTS_H)
19
#define PUBSUB_OPTS_H
20
21
#include "
MQTTAsync.h
"
22
#include "
MQTTClientPersistence.h
"
23
24
struct
pubsub_opts
25
{
26
/* debug app options */
27
int
publisher
;
/* publisher app? */
28
int
quiet
;
29
int
verbose
;
30
int
tracelevel
;
31
char
*
delimiter
;
32
int
maxdatalen
;
33
/* message options */
34
char
*
message
;
35
char
*
filename
;
36
int
stdin_lines
;
37
int
stdlin_complete
;
38
int
null_message
;
39
/* MQTT options */
40
int
MQTTVersion
;
41
char
*
topic
;
42
char
*
clientid
;
43
int
qos
;
44
int
retained
;
45
char
*
username
;
46
char
*
password
;
47
char
*
host
;
48
char
*
port
;
49
char
*
connection
;
50
int
keepalive
;
51
/* will options */
52
char
*
will_topic
;
53
char
*
will_payload
;
54
int
will_qos
;
55
int
will_retain
;
56
/* TLS options */
57
int
insecure
;
58
char
*
capath
;
59
char
*
cert
;
60
char
*
cafile
;
61
char
*
key
;
62
char
*
keypass
;
63
char
*
ciphers
;
64
char
*
psk_identity
;
65
char
*
psk
;
66
/* MQTT V5 options */
67
int
message_expiry
;
68
struct
{
69
char
*
name
;
70
char
*
value
;
71
}
user_property
;
72
};
73
74
typedef
struct
75
{
76
const
char
*
name
;
77
const
char
*
value
;
78
}
pubsub_opts_nameValue
;
79
80
//void usage(struct pubsub_opts* opts, const char* version, const char* program_name);
81
void
usage
(
struct
pubsub_opts
*
opts
,
pubsub_opts_nameValue
* name_values,
const
char
* program_name);
82
int
getopts
(
int
argc,
char
** argv,
struct
pubsub_opts
*
opts
);
83
char
*
readfile
(
int
* data_len,
struct
pubsub_opts
*
opts
);
84
void
logProperties
(
MQTTProperties
*
props
);
85
86
#endif
87
88
pubsub_opts::topic
char * topic
Definition:
pubsub_opts.h:41
logProperties
void logProperties(MQTTProperties *props)
Definition:
pubsub_opts.c:466
pubsub_opts::publisher
int publisher
Definition:
pubsub_opts.h:27
pubsub_opts::retained
int retained
Definition:
pubsub_opts.h:44
pubsub_opts::capath
char * capath
Definition:
pubsub_opts.h:58
pubsub_opts::message
char * message
Definition:
pubsub_opts.h:34
pubsub_opts::connection
char * connection
Definition:
pubsub_opts.h:49
props
MQTTProperties props
Definition:
paho_c_pub.c:54
readfile
char * readfile(int *data_len, struct pubsub_opts *opts)
Definition:
pubsub_opts.c:430
pubsub_opts::cert
char * cert
Definition:
pubsub_opts.h:59
pubsub_opts::keepalive
int keepalive
Definition:
pubsub_opts.h:50
pubsub_opts::will_topic
char * will_topic
Definition:
pubsub_opts.h:52
MQTTProperties
Definition:
MQTTProperties.h:112
pubsub_opts::delimiter
char * delimiter
Definition:
pubsub_opts.h:31
pubsub_opts::psk_identity
char * psk_identity
Definition:
pubsub_opts.h:64
pubsub_opts::filename
char * filename
Definition:
pubsub_opts.h:35
pubsub_opts::name
char * name
Definition:
pubsub_opts.h:69
pubsub_opts_nameValue::name
const char * name
Definition:
pubsub_opts.h:76
opts
struct pubsub_opts opts
Definition:
paho_c_pub.c:42
pubsub_opts::key
char * key
Definition:
pubsub_opts.h:61
MQTTAsync.h
pubsub_opts::will_qos
int will_qos
Definition:
pubsub_opts.h:54
usage
void usage(struct pubsub_opts *opts, pubsub_opts_nameValue *name_values, const char *program_name)
Definition:
pubsub_opts.c:40
pubsub_opts::clientid
char * clientid
Definition:
pubsub_opts.h:42
pubsub_opts::stdlin_complete
int stdlin_complete
Definition:
pubsub_opts.h:37
pubsub_opts::host
char * host
Definition:
pubsub_opts.h:47
getopts
int getopts(int argc, char **argv, struct pubsub_opts *opts)
Definition:
pubsub_opts.c:128
pubsub_opts::cafile
char * cafile
Definition:
pubsub_opts.h:60
pubsub_opts::insecure
int insecure
Definition:
pubsub_opts.h:57
pubsub_opts::ciphers
char * ciphers
Definition:
pubsub_opts.h:63
MQTTClientPersistence.h
This structure represents a persistent data store, used to store outbound and inbound messages...
pubsub_opts::message_expiry
int message_expiry
Definition:
pubsub_opts.h:67
pubsub_opts::MQTTVersion
int MQTTVersion
Definition:
pubsub_opts.h:40
pubsub_opts::will_retain
int will_retain
Definition:
pubsub_opts.h:55
pubsub_opts::qos
int qos
Definition:
pubsub_opts.h:43
pubsub_opts
Definition:
pubsub_opts.h:24
pubsub_opts::keypass
char * keypass
Definition:
pubsub_opts.h:62
pubsub_opts::quiet
int quiet
Definition:
pubsub_opts.h:28
pubsub_opts::value
char * value
Definition:
pubsub_opts.h:70
pubsub_opts::verbose
int verbose
Definition:
pubsub_opts.h:29
pubsub_opts::stdin_lines
int stdin_lines
Definition:
pubsub_opts.h:36
pubsub_opts::password
char * password
Definition:
pubsub_opts.h:46
pubsub_opts_nameValue
Definition:
pubsub_opts.h:74
pubsub_opts::will_payload
char * will_payload
Definition:
pubsub_opts.h:53
pubsub_opts::psk
char * psk
Definition:
pubsub_opts.h:65
pubsub_opts::tracelevel
int tracelevel
Definition:
pubsub_opts.h:30
pubsub_opts_nameValue::value
const char * value
Definition:
pubsub_opts.h:77
pubsub_opts::port
char * port
Definition:
pubsub_opts.h:48
pubsub_opts::null_message
int null_message
Definition:
pubsub_opts.h:38
pubsub_opts::maxdatalen
int maxdatalen
Definition:
pubsub_opts.h:32
pubsub_opts::user_property
struct pubsub_opts::@69 user_property
pubsub_opts::username
char * username
Definition:
pubsub_opts.h:45
plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 03:48:10