Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix docstring comments for configureCredentials and configureAutoReconnectBackoffTime methods of AWSIoTMQTTShadowClient class. #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 23 additions & 5 deletions AWSIoTPythonSDK/MQTTLib.py
Original file line number Diff line number Diff line change
Expand Up @@ -693,12 +693,26 @@ def configureCredentials(self, CAFilePath, KeyPath="", CertificatePath=""): # S
"""
**Description**

Used to configure the rootCA, private key and certificate files. Should be called before connect.

**Syntax**

.. code:: python

myAWSIoTMQTTShadowClient.configureCredentials("PATH/TO/ROOT_CA", "PATH/TO/PRIVATE_KEY", "PATH/TO/CERTIFICATE")

**Parameters**

*CAFilePath* - Path to read the root CA file. Required for all connection types.

*KeyPath* - Path to read the private key. Required for X.509 certificate based connection.

*CertificatePath* - Path to read the certificate. Required for X.509 certificate based connection.

**Returns**

None

"""
# AWSIoTMQTTClient.configureCredentials
self._AWSIoTMQTTClient.configureCredentials(CAFilePath, KeyPath, CertificatePath)
Expand All @@ -707,21 +721,25 @@ def configureAutoReconnectBackoffTime(self, baseReconnectQuietTimeSecond, maxRec
"""
**Description**

Used to configure the rootCA, private key and certificate files. Should be called before connect.
Used to configure the auto-reconnect backoff timing. Should be called before connect.

**Syntax**

.. code:: python

myAWSIoTMQTTShadowClient.configureCredentials("PATH/TO/ROOT_CA", "PATH/TO/PRIVATE_KEY", "PATH/TO/CERTIFICATE")
# Configure the auto-reconnect backoff to start with 1 second and use 128 seconds as a maximum back off time.
# Connection over 20 seconds is considered stable and will reset the back off time back to its base.
myAWSIoTMQTTShadowClient.configureAutoReconnectBackoffTime(1, 128, 20)

**Parameters**

*CAFilePath* - Path to read the root CA file. Required for all connection types.
*baseReconnectQuietTimeSecond* - The initial back off time to start with, in seconds.
Should be less than the stableConnectionTime.

*KeyPath* - Path to read the private key. Required for X.509 certificate based connection.
*maxReconnectQuietTimeSecond* - The maximum back off time, in seconds.

*CertificatePath* - Path to read the certificate. Required for X.509 certificate based connection.
*stableConnectionTimeSecond* - The number of seconds for a connection to last to be considered as stable.
Back off time will be reset to base once the connection is stable.

**Returns**

Expand Down