Ejemplo n.º 1
0
# import packages gps
import serial
import time

from funktion import main
from funktion import query_table
from funktion import insert_table_batch
from funktion import query_table_id
from funktion import delete_table_id
from funktion import query_table_ele
from funktion import gps_map_marker



mssql = main()

breakout_command = 'e'                          # ends collecting infomation and sends the information to the database
device_id = socket.gethostname()                # default device id
reader_connected = True                         # If reader is connected variable set True


information_list = []                           # Create a list where information can be stored
data_list = 3
data_qr = {}
data_rfid = {}
vs = VideoStream( usePiCamera = True ).start()

def get_gps_location():

    # Enable Serial Communication
Ejemplo n.º 2
0
Archivo: test.py Proyecto: Muzhai/ATP
#!/usr/bin/env python
# _*_ coding:utf-8 _*_
from funktion import main
from funktion import query_table
from funktion import insert_table_batch
from funktion import query_table_id
from funktion import delete_table_id
from funktion import query_table_ele
from funktion import gps_map_marker
from funktion import create_table
host = "127.0.0.1"
user = "******"
password = "******"
database = "Baum"
mssql = main(host, user, password, database, default_table='baum_test')
create_table('baum_test')

baums = [{
    'device_id': 'Pi111111',
    'tag_id': 'TId:000001',
    'date': '2020.03.04 08:32:08',
    'GPS': '50.749797, 6.097067, 23, 2'
}, {
    'device_id': 'Pi222222',
    'tag_id': 'TId:000001',
    'date': '2020.03.04 14:32:08',
    'GPS': '50.750673, 6.098043, 23, 2'
}, {
    'device_id': 'Pi333333',
    'tag_id': 'TId:000001',
    'date': '2020.03.10 10:00:08',
Ejemplo n.º 3
0
#!/usr/bin/env python
# _*_ coding:utf-8 _*_
from funktion import main
from funktion import query_table
from funktion import insert_table_batch
from funktion import query_table_id
from funktion import delete_table_id
from funktion import query_table_ele
from funktion import gps_map_marker

server = "127.0.0.1"
user = "******"
password = "******"
database = "Baum"
mssql = main(server, user, password, database)
table_name= 'baum_test'
tag_id = 'tagid:28984'
i = query_table_id(tag_id)

for ii in i:
    print(ii)

gps_map_marker(i)




Ejemplo n.º 4
0
from funktion import query_table_id
from funktion import delete_table_id
from funktion import query_table_ele
from funktion import create_login_rw

#----------------------------------1
# create login name with admin_right
# server = "127.0.0.1"
# user = "******"
# password = "******"
# database = "Baum"
# mssql = main(server, user, password, database)
#
# server = "127.0.0.1"
# username='******'
# key = '123456'
# database = "Baum"
# create_login_rw(username, key)

#-----------------------------------------------2
# remote connect to SQL Server
server = "LAPTOP-7SRV1LGC"
username='******'
key = '123456'
database = "Baum"
mssql = main(server, username, key, database)
query_table_ele('device_id', 'rgs23451')