-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstant.py
43 lines (35 loc) · 8.19 KB
/
constant.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
SERVER_NAME = 'localhost'
SERVER_IP = '127.0.0.1'
PORT = 8443
ENCODE_UTF8 = 'utf-8'
CONTENT_TYPE_APP_JSON = 'application/json'
CONTENT_TYPE_TEXT_PLAIN = 'text/plain'
ESPOO_MAP_PATH = 'resources/trace/espoo.json'
HELSINKI_MAP_PATH = 'resources/trace/helsinki.json'
TASK_2_ROUTE = '[[60.18314587645695, 24.831518950092683], [60.183115400000005, 24.831577100000004], [60.183115400000005, 24.831577100000004], [60.18306549999999, 24.831656399999996], [60.18296499999999, 24.831824800000003], [60.1827219, 24.832274299999998], [60.182534700000005, 24.8326882], [60.182384400000004, 24.8329588], [60.1821692, 24.833253900000003], [60.18202589999999, 24.833446], [60.1819362, 24.833533799999998], [60.1819362, 24.833533799999998], [60.181848499999994, 24.833619799999997], [60.18169859999999, 24.833740000000002], [60.18169859999999, 24.833740000000002], [60.181223599999996, 24.8339641], [60.181223599999996, 24.8339641], [60.180690299999995, 24.834219799999996], [60.180690299999995, 24.834219799999996], [60.18063649999999, 24.834151199999994], [60.1804591, 24.834241], [60.1804591, 24.834241], [60.180215200000006, 24.8343268], [60.180215200000006, 24.8343268], [60.1801295, 24.8343745], [60.1799234, 24.834539499999998], [60.1797578, 24.834642700000003], [60.1796572, 24.8347019], [60.17938569999999, 24.833778], [60.179227, 24.833294799999997], [60.1791999, 24.833221299999998], [60.1791999, 24.833221299999998], [60.1786586, 24.8316585], [60.1786586, 24.8316585], [60.178530099999996, 24.8313338], [60.178530099999996, 24.8313338], [60.1784033, 24.8310085], [60.178291099999996, 24.8307014], [60.1781811, 24.8303664], [60.1781811, 24.8303664], [60.178088499999994, 24.8300309], [60.178088499999994, 24.8300309], [60.1778528, 24.8291556], [60.177722800000005, 24.8286256], [60.177699, 24.8284876], [60.17766939999999, 24.8281869], [60.17766939999999, 24.8281869], [60.177690299999995, 24.8281414], [60.177713, 24.828075700000003], [60.177713, 24.828075700000003], [60.1777296, 24.828012500000003], [60.17774289999999, 24.827941], [60.1777515, 24.827866], [60.177755399999995, 24.827789199999998], [60.177754199999995, 24.8277116], [60.177748400000006, 24.827634399999997], [60.17773760000001, 24.827559100000002], [60.1777221, 24.8274868], [60.177702200000006, 24.827418800000004], [60.177659500000004, 24.827320699999998], [60.177617899999994, 24.827263700000003], [60.1775845, 24.827229799999998], [60.17754939999999, 24.8272044], [60.177513499999996, 24.827187999999996], [60.17747709999999, 24.827180799999997], [60.1774408, 24.8271831], [60.1774051, 24.8271941], [60.1774051, 24.8271941], [60.1773673, 24.827223699999998], [60.1773318, 24.827262899999997], [60.1772951, 24.827318299999998], [60.1772951, 24.827318299999998], [60.177101099999994, 24.8274334], [60.1768499, 24.827604899999997], [60.1768499, 24.827604899999997], [60.1768145, 24.827628400000002], [60.1765568, 24.8276699], [60.176406699999994, 24.8276907], [60.176406699999994, 24.8276907], [60.1762419, 24.827695099999996], [60.17565260000001, 24.8275227], [60.1754112, 24.8274673], [60.17529259999999, 24.8274643], [60.17529259999999, 24.8274643], [60.1710205, 24.824689499999998], [60.1704712, 24.8239771], [60.1686288, 24.8277146], [60.1666612, 24.8394137], [60.16446440000001, 24.912354200000003], [60.16446440000001, 24.912354200000003], [60.164441000000004, 24.920876000000003], [60.164842099999994, 24.924807000000005], [60.164901199999996, 24.9254017], [60.1649479, 24.925661200000004], [60.1649479, 24.925661200000004], [60.165009700000006, 24.925837700000002], [60.1652432, 24.926529700000003], [60.1652432, 24.926529700000003], [60.1655276, 24.927283600000003], [60.1655276, 24.927283600000003], [60.165530200000006, 24.9273262], [60.1655399, 24.927370699999997], [60.1655399, 24.927370699999997], [60.165555399999995, 24.9274026], [60.1655735, 24.9274233], [60.165595800000006, 24.9274339], [60.165595800000006, 24.9274339], [60.16563299999999, 24.927544299999997], [60.16563299999999, 24.927544299999997], [60.16599480000001, 24.9287176], [60.16599480000001, 24.9287176], [60.166335, 24.9296534], [60.166335, 24.9296534], [60.166385299999995, 24.9297901], [60.166385299999995, 24.9297901], [60.1664446, 24.9300051], [60.1664446, 24.9300051], [60.1664466, 24.9302131], [60.166433899999994, 24.9303724], [60.166433899999994, 24.9303724], [60.166433899999994, 24.9303724], [60.166433899999994, 24.9303724], [60.16641039999999, 24.9303889], [60.1663917, 24.930414400000004], [60.166377, 24.930448799999997], [60.166367300000005, 24.930489700000003], [60.1663632, 24.9305344], [60.1663638, 24.930551400000002], [60.1663638, 24.930551400000002], [60.166365199999994, 24.9305801], [60.1663717, 24.930615], [60.1663717, 24.930615], [60.166382000000006, 24.930649799999998], [60.1663983, 24.930681099999997], [60.1664182, 24.9307027], [60.1664413, 24.930713500000003], [60.1664413, 24.930713500000003], [60.1664626, 24.9307114], [60.166485200000004, 24.9306969], [60.166485200000004, 24.9306969], [60.166496900000006, 24.9306833], [60.1665165, 24.930647300000004], [60.1665165, 24.930647300000004], [60.1666468, 24.930705000000003], [60.1666468, 24.930705000000003], [60.1673478, 24.9310772], [60.1673827, 24.9310958], [60.16738600000001, 24.931136799999997], [60.167394099999996, 24.931175], [60.1674063, 24.931208399999996], [60.167422099999996, 24.9312351], [60.167438499999996, 24.9312528], [60.167438499999996, 24.9312528], [60.16740599999999, 24.9316963], [60.16741399999999, 24.9320579], [60.16745159999999, 24.9323673], [60.167495499999994, 24.9325501], [60.167495499999994, 24.932550100000014], [60.1677508, 24.933333299999997], [60.1677508, 24.933333299999997], [60.1678331, 24.933585700000002], [60.1678331, 24.933585700000002], [60.1683156, 24.9349577], [60.1683156, 24.9349577], [60.1683156, 24.9349577], [60.1683156, 24.9349577], [60.1684773, 24.934729699999995], [60.1684773, 24.934729699999995], [60.169007199999996, 24.936182700000003], [60.169007199999996, 24.936182700000003], [60.1694098, 24.9373494], [60.1694098, 24.9373494], [60.169793399999996, 24.938404], [60.169793399999996, 24.938404], [60.169793399999996, 24.938404000000016], [60.169793399999996, 24.938403999999984], [60.169793399999996, 24.938404], [60.169793399999996, 24.938404], [60.169905299999996, 24.938696], [60.169905299999996, 24.938696], [60.17000859999999, 24.9389777], [60.170164699999994, 24.9393885], [60.170288600000006, 24.939705000000004], [60.170288600000006, 24.939705000000004], [60.17033049999999, 24.9398448], [60.170340599999996, 24.93989], [60.170340599999996, 24.93989], [60.170353999999996, 24.939993899999997], [60.1703604, 24.940080400000003], [60.170362399999995, 24.940296099999994], [60.170361899999996, 24.940946399999994], [60.170361899999996, 24.940946399999994], [60.17038959999999, 24.942731100000003], [60.17038959999999, 24.942731100000003], [60.1703911, 24.9428189], [60.1703911, 24.9428189], [60.1704161, 24.9442342], [60.1704291, 24.944388699999998], [60.170446000000005, 24.9445157], [60.170473699999995, 24.944638299999998], [60.170550199999994, 24.9448947], [60.170562999999994, 24.944929199999997], [60.170562999999994, 24.944929199999997], [60.1706498, 24.9451635], [60.1706498, 24.9451635], [60.170716299999995, 24.9453778], [60.170716299999995, 24.9453778], [60.170858100000004, 24.945855400000003], [60.1710935, 24.9466124]]'
METADATA_FILE_PATH = '../resources/trace/metadata.json'
BASE_PATH_OUT = 'resources/output/'
PATH_OUT_PUT = 'resources/output/put/'
########################################
# MQTT_BROKER = 'mqtt.eclipseprojects.io'
# MQTT_BROKER = 'broker.emqx.io'
# MQTT_BROKER = 'test.mosquitto.org'
MQTT_BROKER = 'localhost'
MQTT_PORT = 1883
MQTT_KEEP_ALIVE_INTERVAL = 50
MQTT_TOPIC_BASE = "InternetProtocol/Road/Segment/"
MQTT_TOPIC_2 = "InternetProtocol/Road/Discard/"
MQTT_TOPIC_3 = "InternetProtocol/Road/C3/"
MQTT_TOPIC_SCALE_BASE = "InternetProtocol/Scale/Road/"
# Init few parameters ###########################
MQTT_NO_OF_PUBLISHERS = 112
# set the multiplier to 1, 3, 5, 7, 15, 20
MQTT_NO_OF_SUBSCRIBERS = 112*20
MQTT_NO_OF_TOPIC = 112
#################################################
MQTT_DATA_PATH_BASE = "../resources/samples_p2/"
MQTT_OUTPUT_PATH = '../../resources/output/mqtt/'
MQTT_OUTPUT_MSG_SENT = 'message_sent'
MQTT_OUTPUT_MSG_SENT_PER_TOPIC = 'message_sent_per_topic'
MQTT_OUTPUT_MSG_RECEIVED = 'message_received'
MQTT_OUTPUT_DELAY = 'delay'