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