PrIoT-CLI 0.0.1 documentation

PrIoT Database

«  PrIoT Command Line Interface (PrIoT-CLI) reference   ::   Contents   ::   PrIoT List of Supported Sensors  »

PrIoT Database

Note

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

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.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
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

«  PrIoT Command Line Interface (PrIoT-CLI) reference   ::   Contents   ::   PrIoT List of Supported Sensors  »