Use Digidevice.config For Device Configuration - Digi Connect IT 16 User Manual

Hide thumbs Also See for Connect IT 16:
Table of Contents

Advertisement

Applications
# python
Python 3.6.12 (default, Jan 11 2021, 10:25:21)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
3. Import the datapoint submodule and other necessary modules:
>>> from digidevice import datapoint
>>>
4. Use the help command with datapoint.upload:
>>> help(datapoint.upload)
Help on function upload in module digidevice.datapoint:
upload(stream_id:str, data, *, description:str=None, timestamp:float=None,
units:str=None,
geo_location:Tuple[float, float, float]=None, quality:int=None,
data_type:digidevice.datapoint.DataType=None, timeout:float=None)
...
5. Use Ctrl-D to exit the Python session. You can also exit the session using exit() or quit().

Use digidevice.config for device configuration

Use the config Python module to access and modify the device configuration.
Read the device configuration
1. Log into the Connect IT 16/48 command line as a user with shell access.
Depending on your device configuration, you may be presented with an Access selection
menu. Type shell to access the device shell.
2. At the shell prompt, use the python command with no parameters to enter an interactive
Python session:
# python
Python 3.6.12 (default, Jan 11 2021, 10:25:21)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
3. Import the config submodule:
>>> from digidevice import config
>>>
4. Use config.load() and the get() method to return the device's configuration:
a. Return the entire configuration:
>>> cfg = config.load()
>>> print(cfg)
Digi Connect IT® 16/48 User Guide
Digidevice module
455

Advertisement

Table of Contents
loading

This manual is also suitable for:

Connect it 48

Table of Contents