Commit 3a53ac7d authored by 于水才's avatar 于水才

gongfu detect

parent 9b38daef
cmake-build-debug
data/*
model/*
out/*
weight
\ No newline at end of file
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PublishConfigData" remoteFilesAllowedToDisappearOnAutoupload="false">
<serverData>
<paths name="huawei (6bde78cd-c07c-4854-97ce-5e00fae79afe)">
<serverdata>
<mappings>
<mapping deploy="/usr/local/samples/cplusplus/level3_application/1_cv/detect_and_classify" local="$PROJECT_DIR$" />
</mappings>
<excludedPaths>
<excludedPath local="true" path="$PROJECT_DIR$/cmake-build-debug" />
<excludedPath local="true" path="$PROJECT_DIR$/cmake-build-debug" />
</excludedPaths>
</serverdata>
</paths>
</serverData>
</component>
</project>
\ No newline at end of file
......@@ -2,7 +2,7 @@
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/detect_and_classify.iml" filepath="$PROJECT_DIR$/.idea/detect_and_classify.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/atlas_huawei_cpp_demo.iml" filepath="$PROJECT_DIR$/.idea/atlas_huawei_cpp_demo.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AutoUploadManager">
<option name="hosts">
<list>
<option value="6bde78cd-c07c-4854-97ce-5e00fae79afe" />
</list>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../../../.." vcs="Git" />
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
# - Find libmosquitto
# Find the native libmosquitto includes and libraries
#
# MOSQUITTO_INCLUDE_DIR - where to find mosquitto.h, etc.
# MOSQUITTO_LIBRARIES - List of libraries when using libmosquitto.
# MOSQUITTO_FOUND - True if libmosquitto found.
macro(find_mosquitto)
if (NOT MOSQUITTO_INCLUDE_DIR)
find_path(MOSQUITTO_INCLUDE_DIR mosquitto.h ${MOSQUITTO_ROOT}/include)
endif()
if (NOT MOSQUITTO_LIBRARY)
find_library(
MOSQUITTO_LIBRARY
NAMES mosquitto mosquittopp PATHS ${MOSQUITTO_ROOT}/lib)
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
MOSQUITTO DEFAULT_MSG
MOSQUITTO_LIBRARY MOSQUITTO_INCLUDE_DIR)
message(STATUS "libmosquitto include dir: ${MOSQUITTO_INCLUDE_DIR}")
message(STATUS "libmosquitto: ${MOSQUITTO_LIBRARY}")
set(MOSQUITTO_LIBRARIES ${MOSQUITTO_LIBRARY})
mark_as_advanced(MOSQUITTO_INCLUDE_DIR MOSQUITTO_LIBRARY)
if (NOT MOSQUITTO_FOUND)
message(FATAL_ERROR "mosquitto not found")
endif()
endmacro()
# - Find libmosquitto
# Find the native libmosquitto includes and libraries
#
# MOSQUITTO_INCLUDE_DIR - where to find mosquitto.h, etc.
# MOSQUITTO_LIBRARIES - List of libraries when using libmosquitto.
# MOSQUITTO_FOUND - True if libmosquitto found.
macro(find_mosquitto)
if (NOT MOSQUITTO_INCLUDE_DIR)
find_path(MOSQUITTO_INCLUDE_DIR mosquitto.h ${MOSQUITTO_ROOT}/include)
endif()
if (NOT MOSQUITTO_LIBRARY)
find_library(
MOSQUITTO_LIBRARY
NAMES mosquitto mosquittopp PATHS ${MOSQUITTO_ROOT}/lib)
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
MOSQUITTO DEFAULT_MSG
MOSQUITTO_LIBRARY MOSQUITTO_INCLUDE_DIR)
message(STATUS "libmosquitto include dir: ${MOSQUITTO_INCLUDE_DIR}")
message(STATUS "libmosquitto: ${MOSQUITTO_LIBRARY}")
set(MOSQUITTO_LIBRARIES ${MOSQUITTO_LIBRARY})
mark_as_advanced(MOSQUITTO_INCLUDE_DIR MOSQUITTO_LIBRARY)
if (NOT MOSQUITTO_FOUND)
message(FATAL_ERROR "mosquitto not found")
endif()
endmacro()
# This affects access control for clients with no username.
topic read $SYS/#
# This only affects clients with username "roger".
user roger
topic foo/bar
# This affects all clients.
pattern write $SYS/broker/connection/%c/state
# This affects access control for clients with no username.
topic read $SYS/#
# This only affects clients with username "roger".
user roger
topic foo/bar
# This affects all clients.
pattern write $SYS/broker/connection/%c/state
roger:$6$clQ4Ocu312S0qWgl$Cv2wUxgEN73c6C6jlBkswqR4AkHsvDLWvtEXZZ8NpsBLgP1WAo/qA+WXcmEN/mjDNgdUwcxRAveqNMs2xUVQYA==
sub_client:$6$U+qg0/32F0g2Fh+n$fBPSkq/rfNyEQ/TkEjRgwGTTVBpvNhKSyGShovH9KHewsvJ731tD5Zx26IHhR5RYCICt0L9qBW0/KK31UkCliw==
pub_client:$6$vxQ89y+7WrsnL2yn$fSPMmEZn9TSrC8s/jaPmxJ9NijWpkP2e7bMJLz78JXR1vW2x8+T3FZ23byJA6xs5Mt+LeOybAHwcUv0OCl40rA==
roger:$6$clQ4Ocu312S0qWgl$Cv2wUxgEN73c6C6jlBkswqR4AkHsvDLWvtEXZZ8NpsBLgP1WAo/qA+WXcmEN/mjDNgdUwcxRAveqNMs2xUVQYA==
sub_client:$6$U+qg0/32F0g2Fh+n$fBPSkq/rfNyEQ/TkEjRgwGTTVBpvNhKSyGShovH9KHewsvJ731tD5Zx26IHhR5RYCICt0L9qBW0/KK31UkCliw==
pub_client:$6$vxQ89y+7WrsnL2yn$fSPMmEZn9TSrC8s/jaPmxJ9NijWpkP2e7bMJLz78JXR1vW2x8+T3FZ23byJA6xs5Mt+LeOybAHwcUv0OCl40rA==
/*
Copyright (c) 2009-2019 Roger Light <roger@atchoo.org>
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
and Eclipse Distribution License v1.0 which accompany this distribution.
The Eclipse Public License is available at
http://www.eclipse.org/legal/epl-v10.html
and the Eclipse Distribution License is available at
http://www.eclipse.org/org/documents/edl-v10.php.
Contributors:
Roger Light - initial implementation and documentation.
*/
#ifndef MOSQUITTO_BROKER_H
#define MOSQUITTO_BROKER_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdbool.h>
struct mosquitto;
enum mosquitto_protocol {
mp_mqtt,
mp_mqttsn,
mp_websockets
};
/* =========================================================================
*
* Utility Functions
*
* Use these functions from within your plugin.
*
* There are also very useful functions in libmosquitto.
*
* ========================================================================= */
/*
* Function: mosquitto_log_printf
*
* Write a log message using the broker configured logging.
*
* Parameters:
* level - Log message priority. Can currently be one of:
*
* MOSQ_LOG_INFO
* MOSQ_LOG_NOTICE
* MOSQ_LOG_WARNING
* MOSQ_LOG_ERR
* MOSQ_LOG_DEBUG
* MOSQ_LOG_SUBSCRIBE (not recommended for use by plugins)
* MOSQ_LOG_UNSUBSCRIBE (not recommended for use by plugins)
*
* These values are defined in mosquitto.h.
*
* fmt, ... - printf style format and arguments.
*/
void mosquitto_log_printf(int level, const char *fmt, ...);
/* =========================================================================
*
* Client Functions
*
* Use these functions to access client information.
*
* ========================================================================= */
/*
* Function: mosquitto_client_address
*
* Retrieve the IP address of the client as a string.
*/
const char *mosquitto_client_address(const struct mosquitto *client);
/*
* Function: mosquitto_client_clean_session
*
* Retrieve the clean session flag value for a client.
*/
bool mosquitto_client_clean_session(const struct mosquitto *client);
/*
* Function: mosquitto_client_id
*
* Retrieve the client id associated with a client.
*/
const char *mosquitto_client_id(const struct mosquitto *client);
/*
* Function: mosquitto_client_keepalive
*
* Retrieve the keepalive value for a client.
*/
int mosquitto_client_keepalive(const struct mosquitto *client);
/*
* Function: mosquitto_client_certificate
*
* If TLS support is enabled, return the certificate provided by a client as an
* X509 pointer from openssl. If the client did not provide a certificate, then
* NULL will be returned. This function will only ever return a non-NULL value
* if the `require_certificate` option is set to true.
*
* If TLS is not supported, this function will always return NULL.
*/
void *mosquitto_client_certificate(const struct mosquitto *client);
/*
* Function: mosquitto_client_protocol
*
* Retrieve the protocol with which the client has connected. Can be one of:
*
* mp_mqtt (MQTT over TCP)
* mp_mqttsn (MQTT-SN)
* mp_websockets (MQTT over Websockets)
*/
int mosquitto_client_protocol(const struct mosquitto *client);
/*
* Function: mosquitto_client_sub_count
*
* Retrieve the number of subscriptions that have been made by a client.
*/
int mosquitto_client_sub_count(const struct mosquitto *client);
/*
* Function: mosquitto_client_username
*
* Retrieve the username associated with a client.
*/
const char *mosquitto_client_username(const struct mosquitto *client);
/* Function: mosquitto_set_username
*
* Set the username for a client.
*
* This removes and replaces the current username for a client and hence
* updates its access.
*
* username can be NULL, in which case the client will become anonymous, but
* must not be zero length.
*
* In the case of error, the client will be left with its original username.
*
* Returns:
* MOSQ_ERR_SUCCESS - on success
* MOSQ_ERR_INVAL - if client is NULL, or if username is zero length
* MOSQ_ERR_NOMEM - on out of memory
*/
int mosquitto_set_username(struct mosquitto *client, const char *username);
#ifdef __cplusplus
}
#endif
#endif
/*
Copyright (c) 2009-2019 Roger Light <roger@atchoo.org>
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
and Eclipse Distribution License v1.0 which accompany this distribution.
The Eclipse Public License is available at
http://www.eclipse.org/legal/epl-v10.html
and the Eclipse Distribution License is available at
http://www.eclipse.org/org/documents/edl-v10.php.
Contributors:
Roger Light - initial implementation and documentation.
*/
#ifndef MOSQUITTO_BROKER_H
#define MOSQUITTO_BROKER_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdbool.h>
struct mosquitto;
enum mosquitto_protocol {
mp_mqtt,
mp_mqttsn,
mp_websockets
};
/* =========================================================================
*
* Utility Functions
*
* Use these functions from within your plugin.
*
* There are also very useful functions in libmosquitto.
*
* ========================================================================= */
/*
* Function: mosquitto_log_printf
*
* Write a log message using the broker configured logging.
*
* Parameters:
* level - Log message priority. Can currently be one of:
*
* MOSQ_LOG_INFO
* MOSQ_LOG_NOTICE
* MOSQ_LOG_WARNING
* MOSQ_LOG_ERR
* MOSQ_LOG_DEBUG
* MOSQ_LOG_SUBSCRIBE (not recommended for use by plugins)
* MOSQ_LOG_UNSUBSCRIBE (not recommended for use by plugins)
*
* These values are defined in mosquitto.h.
*
* fmt, ... - printf style format and arguments.
*/
void mosquitto_log_printf(int level, const char *fmt, ...);
/* =========================================================================
*
* Client Functions
*
* Use these functions to access client information.
*
* ========================================================================= */
/*
* Function: mosquitto_client_address
*
* Retrieve the IP address of the client as a string.
*/
const char *mosquitto_client_address(const struct mosquitto *client);
/*
* Function: mosquitto_client_clean_session
*
* Retrieve the clean session flag value for a client.
*/
bool mosquitto_client_clean_session(const struct mosquitto *client);
/*
* Function: mosquitto_client_id
*
* Retrieve the client id associated with a client.
*/
const char *mosquitto_client_id(const struct mosquitto *client);
/*
* Function: mosquitto_client_keepalive
*
* Retrieve the keepalive value for a client.
*/
int mosquitto_client_keepalive(const struct mosquitto *client);
/*
* Function: mosquitto_client_certificate
*
* If TLS support is enabled, return the certificate provided by a client as an
* X509 pointer from openssl. If the client did not provide a certificate, then
* NULL will be returned. This function will only ever return a non-NULL value
* if the `require_certificate` option is set to true.
*
* If TLS is not supported, this function will always return NULL.
*/
void *mosquitto_client_certificate(const struct mosquitto *client);
/*
* Function: mosquitto_client_protocol
*
* Retrieve the protocol with which the client has connected. Can be one of:
*
* mp_mqtt (MQTT over TCP)
* mp_mqttsn (MQTT-SN)
* mp_websockets (MQTT over Websockets)
*/
int mosquitto_client_protocol(const struct mosquitto *client);
/*
* Function: mosquitto_client_sub_count
*
* Retrieve the number of subscriptions that have been made by a client.
*/
int mosquitto_client_sub_count(const struct mosquitto *client);
/*
* Function: mosquitto_client_username
*
* Retrieve the username associated with a client.
*/
const char *mosquitto_client_username(const struct mosquitto *client);
/* Function: mosquitto_set_username
*
* Set the username for a client.
*
* This removes and replaces the current username for a client and hence
* updates its access.
*
* username can be NULL, in which case the client will become anonymous, but
* must not be zero length.
*
* In the case of error, the client will be left with its original username.
*
* Returns:
* MOSQ_ERR_SUCCESS - on success
* MOSQ_ERR_INVAL - if client is NULL, or if username is zero length
* MOSQ_ERR_NOMEM - on out of memory
*/
int mosquitto_set_username(struct mosquitto *client, const char *username);
#ifdef __cplusplus
}
#endif
#endif
prefix=/usr/local
exec_prefix=${prefix}
includedir=${prefix}/include
libdir=${exec_prefix}/lib
Name: mosquitto
Description: mosquitto MQTT library (C bindings)
Version: 1.6.8
Cflags: -I${includedir}
Libs: -L${libdir} -lmosquitto
prefix=/usr/local
exec_prefix=${prefix}
includedir=${prefix}/include
libdir=${exec_prefix}/lib
Name: mosquitto
Description: mosquitto MQTT library (C bindings)
Version: 1.6.8
Cflags: -I${includedir}
Libs: -L${libdir} -lmosquitto
prefix=/usr/local
exec_prefix=${prefix}
includedir=${prefix}/include
libdir=${exec_prefix}/lib
Name: mosquittopp
Description: mosquitto MQTT library (C++ bindings)
Version: 1.6.8
Cflags: -I${includedir}
Libs: -L${libdir} -lmosquittopp
prefix=/usr/local
exec_prefix=${prefix}
includedir=${prefix}/include
libdir=${exec_prefix}/lib
Name: mosquittopp
Description: mosquitto MQTT library (C++ bindings)
Version: 1.6.8
Cflags: -I${includedir}
Libs: -L${libdir} -lmosquittopp
'\" t
.\" Title: mosquitto_passwd
.\" Author: [see the "Author" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 11/28/2019
.\" Manual: Commands
.\" Source: Mosquitto Project
.\" Language: English
.\"
.TH "MOSQUITTO_PASSWD" "1" "11/28/2019" "Mosquitto Project" "Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
mosquitto_passwd \- manage password files for mosquitto
.SH "SYNOPSIS"
.HP \w'\fBmosquitto_passwd\fR\ 'u
\fBmosquitto_passwd\fR [\fB\-c\fR | \fB\-D\fR] \fIpasswordfile\fR \fIusername\fR
.HP \w'\fBmosquitto_passwd\fR\ 'u
\fBmosquitto_passwd\fR \fB\-b\fR \fIpasswordfile\fR \fIusername\fR \fIpassword\fR
.HP \w'\fBmosquitto_passwd\fR\ 'u
\fBmosquitto_passwd\fR \fB\-U\fR \fIpasswordfile\fR
.SH "DESCRIPTION"
.PP
\fBmosquitto_passwd\fR
is a tool for managing password files for the mosquitto MQTT broker\&.
.PP
Usernames must not contain ":"\&. Passwords are stored in a similar format to
\fBcrypt\fR(3)\&.
.SH "OPTIONS"
.PP
\fB\-b\fR
.RS 4
Run in batch mode\&. This allows the password to be provided at the command line which can be convenient but should be used with care because the password will be visible on the command line and in command history\&.
.RE
.PP
\fB\-c\fR
.RS 4
Create a new password file\&. If the file already exists, it will be overwritten\&.
.RE
.PP
\fB\-D\fR
.RS 4
Delete the specified user from the password file\&.
.RE
.PP
\fB\-U\fR
.RS 4
This option can be used to upgrade/convert a password file with plain text passwords into one using hashed passwords\&. It will modify the specified file\&. It does not detect whether passwords are already hashed, so using it on a password file that already contains hashed passwords will generate new hashes based on the old hashes and render the password file unusable\&.
.RE
.PP
\fBpasswordfile\fR
.RS 4
The password file to modify\&.
.RE
.PP
\fBusername\fR
.RS 4
The username to add/update/delete\&.
.RE
.PP
\fBpassword\fR
.RS 4
The password to use when in batch mode\&.
.RE
.SH "EXAMPLES"
.PP
Add a user to a new password file:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
mosquitto_passwd
\-c
/etc/mosquitto/passwd
ral
.RE
.PP
Delete a user from a password file
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
mosquitto_passwd
\-D
/etc/mosquitto/passwd
ral
.RE
.SH "BUGS"
.PP
\fBmosquitto\fR
bug information can be found at
\m[blue]\fB\%https://github.com/eclipse/mosquitto/issues\fR\m[]
.SH "SEE ALSO"
\fBmosquitto\fR(8), \fBmosquitto.conf\fR(5), \fBmqtt\fR(7)
.SH "AUTHOR"
.PP
Roger Light
<roger@atchoo\&.org>
'\" t
.\" Title: mosquitto_passwd
.\" Author: [see the "Author" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 11/28/2019
.\" Manual: Commands
.\" Source: Mosquitto Project
.\" Language: English
.\"
.TH "MOSQUITTO_PASSWD" "1" "11/28/2019" "Mosquitto Project" "Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
mosquitto_passwd \- manage password files for mosquitto
.SH "SYNOPSIS"
.HP \w'\fBmosquitto_passwd\fR\ 'u
\fBmosquitto_passwd\fR [\fB\-c\fR | \fB\-D\fR] \fIpasswordfile\fR \fIusername\fR
.HP \w'\fBmosquitto_passwd\fR\ 'u
\fBmosquitto_passwd\fR \fB\-b\fR \fIpasswordfile\fR \fIusername\fR \fIpassword\fR
.HP \w'\fBmosquitto_passwd\fR\ 'u
\fBmosquitto_passwd\fR \fB\-U\fR \fIpasswordfile\fR
.SH "DESCRIPTION"
.PP
\fBmosquitto_passwd\fR
is a tool for managing password files for the mosquitto MQTT broker\&.
.PP
Usernames must not contain ":"\&. Passwords are stored in a similar format to
\fBcrypt\fR(3)\&.
.SH "OPTIONS"
.PP
\fB\-b\fR
.RS 4
Run in batch mode\&. This allows the password to be provided at the command line which can be convenient but should be used with care because the password will be visible on the command line and in command history\&.
.RE
.PP
\fB\-c\fR
.RS 4
Create a new password file\&. If the file already exists, it will be overwritten\&.
.RE
.PP
\fB\-D\fR
.RS 4
Delete the specified user from the password file\&.
.RE
.PP
\fB\-U\fR
.RS 4
This option can be used to upgrade/convert a password file with plain text passwords into one using hashed passwords\&. It will modify the specified file\&. It does not detect whether passwords are already hashed, so using it on a password file that already contains hashed passwords will generate new hashes based on the old hashes and render the password file unusable\&.
.RE
.PP
\fBpasswordfile\fR
.RS 4
The password file to modify\&.
.RE
.PP
\fBusername\fR
.RS 4
The username to add/update/delete\&.
.RE
.PP
\fBpassword\fR
.RS 4
The password to use when in batch mode\&.
.RE
.SH "EXAMPLES"
.PP
Add a user to a new password file:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
mosquitto_passwd
\-c
/etc/mosquitto/passwd
ral
.RE
.PP
Delete a user from a password file
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
mosquitto_passwd
\-D
/etc/mosquitto/passwd
ral
.RE
.SH "BUGS"
.PP
\fBmosquitto\fR
bug information can be found at
\m[blue]\fB\%https://github.com/eclipse/mosquitto/issues\fR\m[]
.SH "SEE ALSO"
\fBmosquitto\fR(8), \fBmosquitto.conf\fR(5), \fBmqtt\fR(7)
.SH "AUTHOR"
.PP
Roger Light
<roger@atchoo\&.org>
'\" t
.\" Title: libmosquitto
.\" Author: [see the "Author" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 11/28/2019
.\" Manual: Library calls
.\" Source: Mosquitto Project
.\" Language: English
.\"
.TH "LIBMOSQUITTO" "3" "11/28/2019" "Mosquitto Project" "Library calls"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
libmosquitto \- MQTT version 5\&.0/3\&.1\&.1 client library
.SH "DOCUMENTATION"
.PP
See
\m[blue]\fB\%https://mosquitto.org/api/\fR\m[]
.SH "AUTHOR"
.PP
Roger Light
<roger@atchoo\&.org>
'\" t
.\" Title: libmosquitto
.\" Author: [see the "Author" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 11/28/2019
.\" Manual: Library calls
.\" Source: Mosquitto Project
.\" Language: English
.\"
.TH "LIBMOSQUITTO" "3" "11/28/2019" "Mosquitto Project" "Library calls"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
libmosquitto \- MQTT version 5\&.0/3\&.1\&.1 client library
.SH "DOCUMENTATION"
.PP
See
\m[blue]\fB\%https://mosquitto.org/api/\fR\m[]
.SH "AUTHOR"
.PP
Roger Light
<roger@atchoo\&.org>
'\" t
.\" Title: mosquitto-tls
.\" Author: [see the "Author" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 11/28/2019
.\" Manual: Conventions and miscellaneous
.\" Source: Mosquitto Project
.\" Language: English
.\"
.TH "MOSQUITTO\-TLS" "7" "11/28/2019" "Mosquitto Project" "Conventions and miscellaneous"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
mosquitto-tls \- Configure SSL/TLS support for Mosquitto
.SH "DESCRIPTION"
.PP
\fBmosquitto\fR
provides SSL support for encrypted network connections and authentication\&. This manual describes how to create the files needed\&.
.if n \{\
.sp
.\}
.RS 4
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBNote\fR
.ps -1
.br
.PP
It is important to use different certificate subject parameters for your CA, server and clients\&. If the certificates appear identical, even though generated separately, the broker/client will not be able to distinguish between them and you will experience difficult to diagnose errors\&.
.sp .5v
.RE
.SH "GENERATING CERTIFICATES"
.PP
The sections below give the openssl commands that can be used to generate certificates, but without any context\&. The asciicast at
\m[blue]\fBhttps://asciinema\&.org/a/201826\fR\m[]
gives a full run through of how to use those commands\&.
.SH "CERTIFICATE AUTHORITY"
.PP
Generate a certificate authority certificate and key\&.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
openssl req \-new \-x509 \-days <duration> \-extensions v3_ca \-keyout ca\&.key \-out ca\&.crt
.RE
.SH "SERVER"
.PP
Generate a server key\&.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
openssl genrsa \-des3 \-out server\&.key 2048
.RE
.PP
Generate a server key without encryption\&.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
openssl genrsa \-out server\&.key 2048
.RE
.PP
Generate a certificate signing request to send to the CA\&.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
openssl req \-out server\&.csr \-key server\&.key \-new
.RE
.if n \{\
.sp
.\}
.RS 4
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBNote\fR
.ps -1
.br
.PP
When prompted for the CN (Common Name), please enter either your server (or broker) hostname or domain name\&.
.sp .5v
.RE
.PP
Send the CSR to the CA, or sign it with your CA key:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
openssl x509 \-req \-in server\&.csr \-CA ca\&.crt \-CAkey ca\&.key \-CAcreateserial \-out server\&.crt \-days <duration>
.RE
.SH "CLIENT"
.PP
Generate a client key\&.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
openssl genrsa \-des3 \-out client\&.key 2048
.RE
.PP
Generate a certificate signing request to send to the CA\&.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
openssl req \-out client\&.csr \-key client\&.key \-new
.RE
.PP
Send the CSR to the CA, or sign it with your CA key:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
openssl x509 \-req \-in client\&.csr \-CA ca\&.crt \-CAkey ca\&.key \-CAcreateserial \-out client\&.crt \-days <duration>
.RE
.SH "SEE ALSO"
\fBmosquitto\fR(8), \fBmosquitto-conf\fR(5)
.SH "AUTHOR"
.PP
Roger Light
<roger@atchoo\&.org>
'\" t
.\" Title: mosquitto-tls
.\" Author: [see the "Author" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 11/28/2019
.\" Manual: Conventions and miscellaneous
.\" Source: Mosquitto Project
.\" Language: English
.\"
.TH "MOSQUITTO\-TLS" "7" "11/28/2019" "Mosquitto Project" "Conventions and miscellaneous"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
mosquitto-tls \- Configure SSL/TLS support for Mosquitto
.SH "DESCRIPTION"
.PP
\fBmosquitto\fR
provides SSL support for encrypted network connections and authentication\&. This manual describes how to create the files needed\&.
.if n \{\
.sp
.\}
.RS 4
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBNote\fR
.ps -1
.br
.PP
It is important to use different certificate subject parameters for your CA, server and clients\&. If the certificates appear identical, even though generated separately, the broker/client will not be able to distinguish between them and you will experience difficult to diagnose errors\&.
.sp .5v
.RE
.SH "GENERATING CERTIFICATES"
.PP
The sections below give the openssl commands that can be used to generate certificates, but without any context\&. The asciicast at
\m[blue]\fBhttps://asciinema\&.org/a/201826\fR\m[]
gives a full run through of how to use those commands\&.
.SH "CERTIFICATE AUTHORITY"
.PP
Generate a certificate authority certificate and key\&.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
openssl req \-new \-x509 \-days <duration> \-extensions v3_ca \-keyout ca\&.key \-out ca\&.crt
.RE
.SH "SERVER"
.PP
Generate a server key\&.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
openssl genrsa \-des3 \-out server\&.key 2048
.RE
.PP
Generate a server key without encryption\&.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
openssl genrsa \-out server\&.key 2048
.RE
.PP
Generate a certificate signing request to send to the CA\&.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
openssl req \-out server\&.csr \-key server\&.key \-new
.RE
.if n \{\
.sp
.\}
.RS 4
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBNote\fR
.ps -1
.br
.PP
When prompted for the CN (Common Name), please enter either your server (or broker) hostname or domain name\&.
.sp .5v
.RE
.PP
Send the CSR to the CA, or sign it with your CA key:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
openssl x509 \-req \-in server\&.csr \-CA ca\&.crt \-CAkey ca\&.key \-CAcreateserial \-out server\&.crt \-days <duration>
.RE
.SH "CLIENT"
.PP
Generate a client key\&.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
openssl genrsa \-des3 \-out client\&.key 2048
.RE
.PP
Generate a certificate signing request to send to the CA\&.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
openssl req \-out client\&.csr \-key client\&.key \-new
.RE
.PP
Send the CSR to the CA, or sign it with your CA key:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
openssl x509 \-req \-in client\&.csr \-CA ca\&.crt \-CAkey ca\&.key \-CAcreateserial \-out client\&.crt \-days <duration>
.RE
.SH "SEE ALSO"
\fBmosquitto\fR(8), \fBmosquitto-conf\fR(5)
.SH "AUTHOR"
.PP
Roger Light
<roger@atchoo\&.org>
# Copyright (c) Huawei Technologies Co., Ltd. 2019. All rights reserved.
# CMake lowest version requirement
cmake_minimum_required(VERSION 3.5.1)
# project information
project(huawei_atlas_demo)
add_subdirectory("./src")
# Copyright (c) Huawei Technologies Co., Ltd. 2019. All rights reserved.
# CMake lowest version requirement
cmake_minimum_required(VERSION 3.5.1)
# project information
project(huawei_atlas_demo)
add_subdirectory("./src")
# Atlas_huawei_cpp_demo
# Atlas_huawei_cpp_demo
华为 atlas 服务器 推理代码,包含 dvpp 解码 加速。cann推理。
\ No newline at end of file
This diff is collapsed.
First, you must ensure "python3.5" is install in your ubuntu environment.
# Install the dependency package.
# First go to the presenter server directory
1. sudo pip3 install -r requirements
# Configure your network information.
# Modify presenter_server_ip to the IP address of the private network that can be accessed by the development board.
# Modify web_server_ip to the IP address that your Chrome browser can access.
2. sudo vim face_detection/config/config.conf
# Go to the source code directory and run the python program.
3. python3.5 presenter_server.py --app=face_detection
4. Open your browser(only support Chrome now), and visit the website, for example: http:192.168.1.100:7007
First, you must ensure "python3.5" is install in your ubuntu environment.
# Install the dependency package.
# First go to the presenter server directory
1. sudo pip3 install -r requirements
# Configure your network information.
# Modify presenter_server_ip to the IP address of the private network that can be accessed by the development board.
# Modify web_server_ip to the IP address that your Chrome browser can access.
2. sudo vim face_detection/config/config.conf
# Go to the source code directory and run the python program.
3. python3.5 presenter_server.py --app=face_detection
4. Open your browser(only support Chrome now), and visit the website, for example: http:192.168.1.100:7007
# =======================================================================
#
# Copyright (C) 2018, Hisilicon Technologies Co., Ltd. All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1 Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# 2 Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# 3 Neither the names of the copyright holders nor the names of the
# contributors may be used to endorse or promote products derived from this
# software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
# =======================================================================
#
"""Parameter Validation module"""
import logging
PORT_INTERVAL_BEGIN = 1024
PORT_INTERVAL_END = 49151
def validate_ip(ip_str):
if ip_str == '0.0.0.0':
logging.error("IP Addr \"0.0.0.0\" is illegal")
print("IP Addr \"0.0.0.0\" is illegal")
return False
sep = ip_str.split('.')
if len(sep) != 4:
return False
for i, x in enumerate(sep):
try:
int_x = int(x)
if int_x < 0 or int_x > 255:
logging.error("Illegal ip: %s", ip_str)
print("Illegal ip: %s"%ip_str)
return False
except ValueError:
logging.error("IP format error:%s", ip_str)
print("IP format error:%s"%ip_str)
return False
return True
def validate_port(value_str):
try:
value = int(value_str)
if value < PORT_INTERVAL_BEGIN or value > PORT_INTERVAL_END:
logging.error("Illegal port: %d", value)
print("Illegal port: %d"%value)
return False
except ValueError:
logging.error("Port format error:%s", value_str)
print("Port format error:%s"%value_str)
return False
return True
def validate_integer(value_str, begin, end):
try:
value = int(value_str)
if value < begin or value > end:
return False
except ValueError:
return False
return True
def Integer_greater(value_str, compared_value):
try:
value = int(value_str)
if value < compared_value:
return False
except ValueError:
return False
return True
def validate_float(value_str, begin, end):
try:
value = float(value_str)
if value < begin or value > end:
return False
except ValueError:
return False
# =======================================================================
#
# Copyright (C) 2018, Hisilicon Technologies Co., Ltd. All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1 Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# 2 Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# 3 Neither the names of the copyright holders nor the names of the
# contributors may be used to endorse or promote products derived from this
# software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
# =======================================================================
#
"""Parameter Validation module"""
import logging
PORT_INTERVAL_BEGIN = 1024
PORT_INTERVAL_END = 49151
def validate_ip(ip_str):
if ip_str == '0.0.0.0':
logging.error("IP Addr \"0.0.0.0\" is illegal")
print("IP Addr \"0.0.0.0\" is illegal")
return False
sep = ip_str.split('.')
if len(sep) != 4:
return False
for i, x in enumerate(sep):
try:
int_x = int(x)
if int_x < 0 or int_x > 255:
logging.error("Illegal ip: %s", ip_str)
print("Illegal ip: %s"%ip_str)
return False
except ValueError:
logging.error("IP format error:%s", ip_str)
print("IP format error:%s"%ip_str)
return False
return True
def validate_port(value_str):
try:
value = int(value_str)
if value < PORT_INTERVAL_BEGIN or value > PORT_INTERVAL_END:
logging.error("Illegal port: %d", value)
print("Illegal port: %d"%value)
return False
except ValueError:
logging.error("Port format error:%s", value_str)
print("Port format error:%s"%value_str)
return False
return True
def validate_integer(value_str, begin, end):
try:
value = int(value_str)
if value < begin or value > end:
return False
except ValueError:
return False
return True
def Integer_greater(value_str, compared_value):
try:
value = int(value_str)
if value < compared_value:
return False
except ValueError:
return False
return True
def validate_float(value_str, begin, end):
try:
value = float(value_str)
if value < begin or value > end:
return False
except ValueError:
return False
return True
\ No newline at end of file
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
tornado == 5.1.0
tornado == 5.1.0
protobuf == 3.11.3
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment