Skip to content
Snippets Groups Projects
Commit 9e20b3c2 authored by Henrik Tjäder's avatar Henrik Tjäder
Browse files

Added locality placeholder function

parent 4dee57d5
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,11 @@ from threading import Thread, Timer
import numpy as np
from array import *
# pymongo for MongoDB support
import pymongo
# For timestamping in MongoDB
import datetime
#DEFINE INPUTS HERE
#CLIENT - SENDER
......@@ -86,7 +91,7 @@ def udp_client_receive(UDP_RECEIVE_IP, UDP_RECEIVE_PORT):
outfile.close()
#CALLBACK FUNCTION
#DATA SUBSCRIPTION (callback)
def cb_event(recipient, threshold):
# TODO
......@@ -98,6 +103,15 @@ def cb_event(recipient, threshold):
# any of the thresholds are exceeded. Notify recpient as needed.
print("TODO")
#GET LOCALITY
def get_loc():
# Query locality group, return the bounding box for current loc
#TODO
loc = 0
return loc
#CLIENT SERVER SIDE
def udp_client_send(UDP_DEST_IP, UDP_DEST_PORT,
PACKET_SIZE, NR_OF_PACKETS, PACKETS_PER_SEC):
......@@ -232,6 +246,9 @@ if __name__ == "__main__":
while sender_thread.is_alive():
time.sleep(1)
# Measurement done, store data and then move on
# While testing, end after one iteration
sys.exit()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment