PrIoT-CLI 0.0.1 documentation

PrIoT Command Line Interface (PrIoT-CLI) reference

«  Welcome to PrIoT-CLI’s documentation!   ::   Contents   ::   PrIoT Database  »

PrIoT Command Line Interface (PrIoT-CLI) reference

Note

Install all the prerequisites before using PrIoT-CLI, see Prerequisites

PrIoT command line interface : PrIoT-CLI

priot_cli.main()[source]

Main function for processing command line arguments

Usage: python priot_cli.py --createproject [project_name] python priot_cli.py --createconfig [project_name] [config_filename] [board_name] [library_deps] python priot_cli.py --build [project_name] python priot_cli.py --upload [project_name] python priot_cli.py --createdatabase [database_name] python priot_cli.py --insertboard [database_name] [board_json_filename] python priot_cli.py --insertmcu [database_name] [mcu_json_filename] python priot_cli.py --insertactuator [database_name] [actuator_json_filename] ``python priot_cli.py --insertsensor [database_name] [sensor_json_filename]

priot_cli.main()[source]
Main function for processing command line arguments.

PrIoT database management

class priot_database.PrIoT_DB_Mangodb(database_name='priot_mango_db', host='localhost', port=27017)[source]
create_mango_db()[source]
insert_actuator_mdb(json_filenames)[source]
insert_board_mdb(json_filenames)[source]

Function for inserting board specific information into PrIoT database

insert_mcu_mdb(json_filenames)[source]
insert_sensor_mdb(json_filenames)[source]
class priot_database.Priot_DB_Sqlite(dbname='priot_sqlite_db.db')[source]
class priot_database.Priot_DB_Unqlite(dbname='priot_unqlite_db.udb')[source]
priot_database.insert_board()
Parameters:
  • database_name – PrIoT mangoDB database name
  • json_filename – JSON file name for the board (eg. [path_to_json_file]/board.json)
priot_database.insert_sensor()
Parameters:
  • database_name – PrIoT mangoDB database name
  • json_filename – List of JSON file names for the sensors (eg [ “[path_to_json_file]/sensor_1.json”, “[path_to_json_file]/sensor_2.json” )
priot_database.insert_actuator()
Parameters:
  • database_name – PrIoT mangoDB database name
  • json_filename – List of JSON file names for the actuator (eg [ “[path_to_json_file]/actuator_1.json”, “[path_to_json_file]/actuator_2.json”)
priot_database.insert_transceiver()
class priot_database.board
This class defines the structure of **board** information inside database. Use by the python module - *mangoengine*.
name
mcu_family
mcu_name
class priot_database.sensor
This class defines the structure of **sensor** information inside database. Use by the python module - *mangoengine*.
component_type
String field restricted to one of the following component type - Sensor, Actuator, Transciver, HMI, MCU.
category
List of string field which specifies the category of actuator - For eg : ["Relay"].
unique_id
Component ID to access it uniquely inside the database.
interface
List of string field restricted to the following interface type - GPIO, SPI, I2C, UART, etc.
manufacturer
String field - Name of manufacturer.
demo_board_url
URL field - URL for demo board.
class priot_database.actuator
This class defines the structure of **actuator** information inside database. Use by the python module - *mangoengine*.
component_type
category
unique_id
interface
manufacturer
demo_board_url

«  Welcome to PrIoT-CLI’s documentation!   ::   Contents   ::   PrIoT Database  »