From b0f353d572cd8369088905a33c350f71853c537e Mon Sep 17 00:00:00 2001 From: karthikmurakonda Date: Tue, 27 Sep 2022 14:40:49 +0530 Subject: [PATCH] deleted db server temperorily --- DBServer/ANALOG_MEASUREMENTS.txt | 398 ------ DBServer/DIGITAL_MEASUREMENTS.txt | 0 DBServer/Db.sql | 214 ---- DBServer/Doxyfile | 1285 ------------------- DBServer/FREQUENCY_MEASUREMENTS.txt | 398 ------ DBServer/Makefile | 70 - DBServer/PHASOR_MEASUREMENTS.txt | 398 ------ DBServer/RECEIVED_FRAME_TIME.txt | 398 ------ DBServer/Sample DBConnect.c | 145 --- DBServer/cfg.bin | Bin 94 -> 0 bytes DBServer/connections.c | 271 ---- DBServer/connections.h | 57 - DBServer/dallocate.c | 112 -- DBServer/dallocate.h | 37 - DBServer/dbserver.c | 52 - DBServer/global.h | 59 - DBServer/parser.c | 1837 --------------------------- DBServer/parser.h | 137 -- DBServer/recreate.c | 645 ---------- DBServer/recreate.h | 38 - 20 files changed, 6551 deletions(-) delete mode 100644 DBServer/ANALOG_MEASUREMENTS.txt delete mode 100644 DBServer/DIGITAL_MEASUREMENTS.txt delete mode 100755 DBServer/Db.sql delete mode 100755 DBServer/Doxyfile delete mode 100644 DBServer/FREQUENCY_MEASUREMENTS.txt delete mode 100755 DBServer/Makefile delete mode 100644 DBServer/PHASOR_MEASUREMENTS.txt delete mode 100644 DBServer/RECEIVED_FRAME_TIME.txt delete mode 100755 DBServer/Sample DBConnect.c delete mode 100644 DBServer/cfg.bin delete mode 100755 DBServer/connections.c delete mode 100755 DBServer/connections.h delete mode 100755 DBServer/dallocate.c delete mode 100755 DBServer/dallocate.h delete mode 100755 DBServer/dbserver.c delete mode 100755 DBServer/global.h delete mode 100755 DBServer/parser.c delete mode 100755 DBServer/parser.h delete mode 100755 DBServer/recreate.c delete mode 100755 DBServer/recreate.h diff --git a/DBServer/ANALOG_MEASUREMENTS.txt b/DBServer/ANALOG_MEASUREMENTS.txt deleted file mode 100644 index 7dfdc5a..0000000 --- a/DBServer/ANALOG_MEASUREMENTS.txt +++ /dev/null @@ -1,398 +0,0 @@ - 1,1,1657041650,880000,"B ",0.006000 - 1,1,1657041650,920000,"B ",0.006000 - 1,1,1657041650,960000,"B ",0.006000 - 1,1,1657041651,0,"B ",0.006000 - 1,1,1657041651,40000,"B ",0.006000 - 1,1,1657041651,80000,"B ",0.006000 - 1,1,1657041651,120000,"B ",0.006000 - 1,1,1657041651,160000,"B ",0.006000 - 1,1,1657041651,200000,"B ",0.006000 - 1,1,1657041651,240000,"B ",0.006000 - 1,1,1657041651,280000,"B ",0.006000 - 1,1,1657041651,320000,"B ",0.006000 - 1,1,1657041651,360000,"B ",0.006000 - 1,1,1657041651,400000,"B ",0.006000 - 1,1,1657041651,440000,"B ",0.006000 - 1,1,1657041651,480000,"B ",0.006000 - 1,1,1657041651,520000,"B ",0.006000 - 1,1,1657041651,560000,"B ",0.006000 - 1,1,1657041651,600000,"B ",0.006000 - 1,1,1657041651,640000,"B ",0.006000 - 1,1,1657041651,680000,"B ",0.006000 - 1,1,1657041651,720000,"B ",0.006000 - 1,1,1657041651,760000,"B ",0.006000 - 1,1,1657041651,800000,"B ",0.006000 - 1,1,1657041651,840000,"B ",0.006000 - 1,1,1657041651,880000,"B ",0.006000 - 1,1,1657041651,920000,"B ",0.006000 - 1,1,1657041651,960000,"B ",0.006000 - 1,1,1657041652,0,"B ",0.006000 - 1,1,1657041652,40000,"B ",0.006000 - 1,1,1657041652,80000,"B ",0.006000 - 1,1,1657041652,120000,"B ",0.006000 - 1,1,1657041652,160000,"B ",0.006000 - 1,1,1657041652,200000,"B ",0.006000 - 1,1,1657041652,240000,"B ",0.006000 - 1,1,1657041652,280000,"B ",0.006000 - 1,1,1657041652,320000,"B ",0.006000 - 1,1,1657041652,360000,"B ",0.006000 - 1,1,1657041652,400000,"B ",0.006000 - 1,1,1657041652,440000,"B ",0.006000 - 1,1,1657041652,480000,"B ",0.006000 - 1,1,1657041652,520000,"B ",0.006000 - 1,1,1657041652,560000,"B ",0.006000 - 1,1,1657041652,600000,"B ",0.006000 - 1,1,1657041652,640000,"B ",0.006000 - 1,1,1657041652,680000,"B ",0.006000 - 1,1,1657041652,720000,"B ",0.006000 - 1,1,1657041652,760000,"B ",0.006000 - 1,1,1657041652,800000,"B ",0.006000 - 1,1,1657041652,840000,"B ",0.006000 - 1,1,1657041652,880000,"B ",0.006000 - 1,1,1657041652,920000,"B ",0.006000 - 1,1,1657041652,960000,"B ",0.006000 - 1,1,1657041653,0,"B ",0.006000 - 1,1,1657041653,40000,"B ",0.006000 - 1,1,1657041653,80000,"B ",0.006000 - 1,1,1657041653,120000,"B ",0.006000 - 1,1,1657041653,160000,"B ",0.006000 - 1,1,1657041653,200000,"B ",0.006000 - 1,1,1657041653,240000,"B ",0.006000 - 1,1,1657041653,280000,"B ",0.006000 - 1,1,1657041653,320000,"B ",0.006000 - 1,1,1657041653,360000,"B ",0.006000 - 1,1,1657041653,400000,"B ",0.006000 - 1,1,1657041653,440000,"B ",0.006000 - 1,1,1657041653,480000,"B ",0.006000 - 1,1,1657041653,520000,"B ",0.006000 - 1,1,1657041653,560000,"B ",0.006000 - 1,1,1657041653,600000,"B ",0.006000 - 1,1,1657041653,640000,"B ",0.006000 - 1,1,1657041653,680000,"B ",0.006000 - 1,1,1657041653,720000,"B ",0.006000 - 1,1,1657041653,760000,"B ",0.006000 - 1,1,1657041653,800000,"B ",0.006000 - 1,1,1657041653,840000,"B ",0.006000 - 1,1,1657041653,880000,"B ",0.006000 - 1,1,1657041653,920000,"B ",0.006000 - 1,1,1657041653,960000,"B ",0.006000 - 1,1,1657041654,0,"B ",0.006000 - 1,1,1657041654,40000,"B ",0.006000 - 1,1,1657041654,80000,"B ",0.006000 - 1,1,1657041654,120000,"B ",0.006000 - 1,1,1657041654,160000,"B ",0.006000 - 1,1,1657041654,200000,"B ",0.006000 - 1,1,1657041654,240000,"B ",0.006000 - 1,1,1657041654,280000,"B ",0.006000 - 1,1,1657041654,320000,"B ",0.006000 - 1,1,1657041654,360000,"B ",0.006000 - 1,1,1657041654,400000,"B ",0.006000 - 1,1,1657041654,440000,"B ",0.006000 - 1,1,1657041654,480000,"B ",0.006000 - 1,1,1657041654,520000,"B ",0.006000 - 1,1,1657041654,560000,"B ",0.006000 - 1,1,1657041654,600000,"B ",0.006000 - 1,1,1657041654,640000,"B ",0.006000 - 1,1,1657041654,680000,"B ",0.006000 - 1,1,1657041654,720000,"B ",0.006000 - 1,1,1657041654,760000,"B ",0.006000 - 1,1,1657041654,800000,"B ",0.006000 - 1,1,1657041654,840000,"B ",0.006000 - 1,1,1657041654,880000,"B ",0.006000 - 1,1,1657041654,920000,"B ",0.006000 - 1,1,1657041654,960000,"B ",0.006000 - 1,1,1657041655,0,"B ",0.006000 - 1,1,1657041655,40000,"B ",0.006000 - 1,1,1657041655,80000,"B ",0.006000 - 1,1,1657041655,120000,"B ",0.006000 - 1,1,1657041655,160000,"B ",0.006000 - 1,1,1657041655,200000,"B ",0.006000 - 1,1,1657041655,240000,"B ",0.006000 - 1,1,1657041655,280000,"B ",0.006000 - 1,1,1657041655,320000,"B ",0.006000 - 1,1,1657041655,360000,"B ",0.006000 - 1,1,1657041655,400000,"B ",0.006000 - 1,1,1657041655,440000,"B ",0.006000 - 1,1,1657041655,480000,"B ",0.006000 - 1,1,1657041655,520000,"B ",0.006000 - 1,1,1657041655,560000,"B ",0.006000 - 1,1,1657041655,600000,"B ",0.006000 - 1,1,1657041655,640000,"B ",0.006000 - 1,1,1657041655,680000,"B ",0.006000 - 1,1,1657041655,720000,"B ",0.006000 - 1,1,1657041655,760000,"B ",0.006000 - 1,1,1657041655,800000,"B ",0.006000 - 1,1,1657041655,840000,"B ",0.006000 - 1,1,1657041655,880000,"B ",0.006000 - 1,1,1657041655,920000,"B ",0.006000 - 1,1,1657041655,960000,"B ",0.006000 - 1,1,1657041656,0,"B ",0.006000 - 1,1,1657041656,40000,"B ",0.006000 - 1,1,1657041656,80000,"B ",0.006000 - 1,1,1657041656,120000,"B ",0.006000 - 1,1,1657041656,160000,"B ",0.006000 - 1,1,1657041656,200000,"B ",0.006000 - 1,1,1657041656,240000,"B ",0.006000 - 1,1,1657041656,280000,"B ",0.006000 - 1,1,1657041656,320000,"B ",0.006000 - 1,1,1657041656,360000,"B ",0.006000 - 1,1,1657041656,400000,"B ",0.006000 - 1,1,1657041656,440000,"B ",0.006000 - 1,1,1657041656,480000,"B ",0.006000 - 1,1,1657041656,520000,"B ",0.006000 - 1,1,1657041656,560000,"B ",0.006000 - 1,1,1657041656,600000,"B ",0.006000 - 1,1,1657041656,640000,"B ",0.006000 - 1,1,1657041656,680000,"B ",0.006000 - 1,1,1657041656,720000,"B ",0.006000 - 1,1,1657041656,760000,"B ",0.006000 - 1,1,1657041656,800000,"B ",0.006000 - 1,1,1657041656,840000,"B ",0.006000 - 1,1,1657041656,880000,"B ",0.006000 - 1,1,1657041656,920000,"B ",0.006000 - 1,1,1657041656,960000,"B ",0.006000 - 1,1,1657041657,0,"B ",0.006000 - 1,1,1657041657,40000,"B ",0.006000 - 1,1,1657041657,80000,"B ",0.006000 - 1,1,1657041657,120000,"B ",0.006000 - 1,1,1657041657,160000,"B ",0.006000 - 1,1,1657041657,200000,"B ",0.006000 - 1,1,1657041657,240000,"B ",0.006000 - 1,1,1657041657,280000,"B ",0.006000 - 1,1,1657041657,320000,"B ",0.006000 - 1,1,1657041657,360000,"B ",0.006000 - 1,1,1657041657,400000,"B ",0.006000 - 1,1,1657041657,440000,"B ",0.006000 - 1,1,1657041657,480000,"B ",0.006000 - 1,1,1657041657,520000,"B ",0.006000 - 1,1,1657041657,560000,"B ",0.006000 - 1,1,1657041657,600000,"B ",0.006000 - 1,1,1657041657,640000,"B ",0.006000 - 1,1,1657041657,680000,"B ",0.006000 - 1,1,1657041657,720000,"B ",0.006000 - 1,1,1657041657,760000,"B ",0.006000 - 1,1,1657041657,800000,"B ",0.006000 - 1,1,1657041657,840000,"B ",0.006000 - 1,1,1657041657,880000,"B ",0.006000 - 1,1,1657041657,920000,"B ",0.006000 - 1,1,1657041657,960000,"B ",0.006000 - 1,1,1657041658,0,"B ",0.006000 - 1,1,1657041658,40000,"B ",0.006000 - 1,1,1657041658,80000,"B ",0.006000 - 1,1,1657041658,120000,"B ",0.006000 - 1,1,1657041658,160000,"B ",0.006000 - 1,1,1657041658,200000,"B ",0.006000 - 1,1,1657041658,240000,"B ",0.006000 - 1,1,1657041658,280000,"B ",0.006000 - 1,1,1657041658,320000,"B ",0.006000 - 1,1,1657041658,360000,"B ",0.006000 - 1,1,1657041658,400000,"B ",0.006000 - 1,1,1657041658,440000,"B ",0.006000 - 1,1,1657041658,480000,"B ",0.006000 - 1,1,1657041658,520000,"B ",0.006000 - 1,1,1657041658,560000,"B ",0.006000 - 1,1,1657041658,600000,"B ",0.006000 - 1,1,1657041658,640000,"B ",0.006000 - 1,1,1657041658,680000,"B ",0.006000 - 1,1,1657041658,720000,"B ",0.006000 - 1,1,1657041658,760000,"B ",0.006000 - 1,1,1657041658,800000,"B ",0.006000 - 1,1,1657041658,840000,"B ",0.006000 - 1,1,1657041658,880000,"B ",0.006000 - 1,1,1657041658,920000,"B ",0.006000 - 1,1,1657041658,960000,"B ",0.006000 - 1,1,1657041659,0,"B ",0.006000 - 1,1,1657041659,40000,"B ",0.006000 - 1,1,1657041659,80000,"B ",0.006000 - 1,1,1657041659,120000,"B ",0.006000 - 1,1,1657041659,160000,"B ",0.006000 - 1,1,1657041659,200000,"B ",0.006000 - 1,1,1657041659,240000,"B ",0.006000 - 1,1,1657041659,280000,"B ",0.006000 - 1,1,1657041659,320000,"B ",0.006000 - 1,1,1657041659,360000,"B ",0.006000 - 1,1,1657041659,400000,"B ",0.006000 - 1,1,1657041659,440000,"B ",0.006000 - 1,1,1657041659,480000,"B ",0.006000 - 1,1,1657041659,520000,"B ",0.006000 - 1,1,1657041659,560000,"B ",0.006000 - 1,1,1657041659,600000,"B ",0.006000 - 1,1,1657041659,640000,"B ",0.006000 - 1,1,1657041659,680000,"B ",0.006000 - 1,1,1657041659,720000,"B ",0.006000 - 1,1,1657041659,760000,"B ",0.006000 - 1,1,1657041659,800000,"B ",0.006000 - 1,1,1657041659,840000,"B ",0.006000 - 1,1,1657041659,880000,"B ",0.006000 - 1,1,1657041659,920000,"B ",0.006000 - 1,1,1657041659,960000,"B ",0.006000 - 1,1,1657041660,0,"B ",0.006000 - 1,1,1657041660,40000,"B ",0.006000 - 1,1,1657041660,80000,"B ",0.006000 - 1,1,1657041660,120000,"B ",0.006000 - 1,1,1657041660,160000,"B ",0.006000 - 1,1,1657041660,200000,"B ",0.006000 - 1,1,1657041660,240000,"B ",0.006000 - 1,1,1657041660,280000,"B ",0.006000 - 1,1,1657041660,320000,"B ",0.006000 - 1,1,1657041660,360000,"B ",0.006000 - 1,1,1657041660,400000,"B ",0.006000 - 1,1,1657041660,440000,"B ",0.006000 - 1,1,1657041660,480000,"B ",0.006000 - 1,1,1657041660,520000,"B ",0.006000 - 1,1,1657041660,560000,"B ",0.006000 - 1,1,1657041660,600000,"B ",0.006000 - 1,1,1657041660,640000,"B ",0.006000 - 1,1,1657041660,680000,"B ",0.006000 - 1,1,1657041660,720000,"B ",0.006000 - 1,1,1657041660,760000,"B ",0.006000 - 1,1,1657041660,800000,"B ",0.006000 - 1,1,1657041660,840000,"B ",0.006000 - 1,1,1657041660,880000,"B ",0.006000 - 1,1,1657041660,920000,"B ",0.006000 - 1,1,1657041660,960000,"B ",0.006000 - 1,1,1657041661,0,"B ",0.006000 - 1,1,1657041661,40000,"B ",0.006000 - 1,1,1657041661,80000,"B ",0.006000 - 1,1,1657041661,120000,"B ",0.006000 - 1,1,1657041661,160000,"B ",0.006000 - 1,1,1657041661,200000,"B ",0.006000 - 1,1,1657041661,240000,"B ",0.006000 - 1,1,1657041661,280000,"B ",0.006000 - 1,1,1657041661,320000,"B ",0.006000 - 1,1,1657041661,360000,"B ",0.006000 - 1,1,1657041661,400000,"B ",0.006000 - 1,1,1657041661,440000,"B ",0.006000 - 1,1,1657041661,480000,"B ",0.006000 - 1,1,1657041661,520000,"B ",0.006000 - 1,1,1657041661,560000,"B ",0.006000 - 1,1,1657041661,600000,"B ",0.006000 - 1,1,1657041661,640000,"B ",0.006000 - 1,1,1657041661,680000,"B ",0.006000 - 1,1,1657041661,720000,"B ",0.006000 - 1,1,1657041661,760000,"B ",0.006000 - 1,1,1657041661,800000,"B ",0.006000 - 1,1,1657041661,840000,"B ",0.006000 - 1,1,1657041661,880000,"B ",0.006000 - 1,1,1657041661,920000,"B ",0.006000 - 1,1,1657041661,960000,"B ",0.006000 - 1,1,1657041662,0,"B ",0.006000 - 1,1,1657041662,40000,"B ",0.006000 - 1,1,1657041662,80000,"B ",0.006000 - 1,1,1657041662,120000,"B ",0.006000 - 1,1,1657041662,160000,"B ",0.006000 - 1,1,1657041662,200000,"B ",0.006000 - 1,1,1657041662,240000,"B ",0.006000 - 1,1,1657041662,280000,"B ",0.006000 - 1,1,1657041662,320000,"B ",0.006000 - 1,1,1657041662,360000,"B ",0.006000 - 1,1,1657041662,400000,"B ",0.006000 - 1,1,1657041662,440000,"B ",0.006000 - 1,1,1657041662,480000,"B ",0.006000 - 1,1,1657041662,520000,"B ",0.006000 - 1,1,1657041662,560000,"B ",0.006000 - 1,1,1657041662,600000,"B ",0.006000 - 1,1,1657041662,640000,"B ",0.006000 - 1,1,1657041662,680000,"B ",0.006000 - 1,1,1657041662,720000,"B ",0.006000 - 1,1,1657041662,760000,"B ",0.006000 - 1,1,1657041662,800000,"B ",0.006000 - 1,1,1657041662,840000,"B ",0.006000 - 1,1,1657041662,880000,"B ",0.006000 - 1,1,1657041662,920000,"B ",0.006000 - 1,1,1657041662,960000,"B ",0.006000 - 1,1,1657041663,0,"B ",0.006000 - 1,1,1657041663,40000,"B ",0.006000 - 1,1,1657041663,80000,"B ",0.006000 - 1,1,1657041663,120000,"B ",0.006000 - 1,1,1657041663,160000,"B ",0.006000 - 1,1,1657041663,200000,"B ",0.006000 - 1,1,1657041663,240000,"B ",0.006000 - 1,1,1657041663,280000,"B ",0.006000 - 1,1,1657041663,320000,"B ",0.006000 - 1,1,1657041663,360000,"B ",0.006000 - 1,1,1657041663,400000,"B ",0.006000 - 1,1,1657041663,440000,"B ",0.006000 - 1,1,1657041663,480000,"B ",0.006000 - 1,1,1657041663,520000,"B ",0.006000 - 1,1,1657041663,560000,"B ",0.006000 - 1,1,1657041663,600000,"B ",0.006000 - 1,1,1657041663,640000,"B ",0.006000 - 1,1,1657041663,680000,"B ",0.006000 - 1,1,1657041663,720000,"B ",0.006000 - 1,1,1657041663,760000,"B ",0.006000 - 1,1,1657041663,800000,"B ",0.006000 - 1,1,1657041663,840000,"B ",0.006000 - 1,1,1657041663,880000,"B ",0.006000 - 1,1,1657041663,920000,"B ",0.006000 - 1,1,1657041663,960000,"B ",0.006000 - 1,1,1657041664,0,"B ",0.006000 - 1,1,1657041664,40000,"B ",0.006000 - 1,1,1657041664,80000,"B ",0.006000 - 1,1,1657041664,120000,"B ",0.006000 - 1,1,1657041664,160000,"B ",0.006000 - 1,1,1657041664,200000,"B ",0.006000 - 1,1,1657041664,240000,"B ",0.006000 - 1,1,1657041664,280000,"B ",0.006000 - 1,1,1657041664,320000,"B ",0.006000 - 1,1,1657041664,360000,"B ",0.006000 - 1,1,1657041664,400000,"B ",0.006000 - 1,1,1657041664,440000,"B ",0.006000 - 1,1,1657041664,480000,"B ",0.006000 - 1,1,1657041664,520000,"B ",0.006000 - 1,1,1657041664,560000,"B ",0.006000 - 1,1,1657041664,600000,"B ",0.006000 - 1,1,1657041664,640000,"B ",0.006000 - 1,1,1657041664,680000,"B ",0.006000 - 1,1,1657041664,720000,"B ",0.006000 - 1,1,1657041664,760000,"B ",0.006000 - 1,1,1657041664,800000,"B ",0.006000 - 1,1,1657041664,840000,"B ",0.006000 - 1,1,1657041664,880000,"B ",0.006000 - 1,1,1657041664,920000,"B ",0.006000 - 1,1,1657041664,960000,"B ",0.006000 - 1,1,1657041665,0,"B ",0.006000 - 1,1,1657041665,40000,"B ",0.006000 - 1,1,1657041665,80000,"B ",0.006000 - 1,1,1657041665,120000,"B ",0.006000 - 1,1,1657041665,160000,"B ",0.006000 - 1,1,1657041665,200000,"B ",0.006000 - 1,1,1657041665,240000,"B ",0.006000 - 1,1,1657041665,280000,"B ",0.006000 - 1,1,1657041665,320000,"B ",0.006000 - 1,1,1657041665,360000,"B ",0.006000 - 1,1,1657041665,400000,"B ",0.006000 - 1,1,1657041665,440000,"B ",0.006000 - 1,1,1657041665,480000,"B ",0.006000 - 1,1,1657041665,520000,"B ",0.006000 - 1,1,1657041665,560000,"B ",0.006000 - 1,1,1657041665,600000,"B ",0.006000 - 1,1,1657041665,640000,"B ",0.006000 - 1,1,1657041665,680000,"B ",0.006000 - 1,1,1657041665,720000,"B ",0.006000 - 1,1,1657041665,760000,"B ",0.006000 - 1,1,1657041665,800000,"B ",0.006000 - 1,1,1657041665,840000,"B ",0.006000 - 1,1,1657041665,880000,"B ",0.006000 - 1,1,1657041665,920000,"B ",0.006000 - 1,1,1657041665,960000,"B ",0.006000 - 1,1,1657041666,0,"B ",0.006000 - 1,1,1657041666,40000,"B ",0.006000 - 1,1,1657041666,80000,"B ",0.006000 - 1,1,1657041666,120000,"B ",0.006000 - 1,1,1657041666,160000,"B ",0.006000 - 1,1,1657041666,200000,"B ",0.006000 - 1,1,1657041666,240000,"B ",0.006000 - 1,1,1657041666,280000,"B ",0.006000 - 1,1,1657041666,320000,"B ",0.006000 - 1,1,1657041666,360000,"B ",0.006000 - 1,1,1657041666,400000,"B ",0.006000 - 1,1,1657041666,440000,"B ",0.006000 - 1,1,1657041666,480000,"B ",0.006000 - 1,1,1657041666,520000,"B ",0.006000 - 1,1,1657041666,560000,"B ",0.006000 - 1,1,1657041666,600000,"B ",0.006000 - 1,1,1657041666,640000,"B ",0.006000 - 1,1,1657041666,680000,"B ",0.006000 - 1,1,1657041666,720000,"B ",0.006000 - 1,1,1657041666,760000,"B ",0.006000 diff --git a/DBServer/DIGITAL_MEASUREMENTS.txt b/DBServer/DIGITAL_MEASUREMENTS.txt deleted file mode 100644 index e69de29..0000000 diff --git a/DBServer/Db.sql b/DBServer/Db.sql deleted file mode 100755 index ba6f386..0000000 --- a/DBServer/Db.sql +++ /dev/null @@ -1,214 +0,0 @@ --- ============================================================================= --- Db.sql (iPDC Data Structures for MySQL ) --- --- iPDC - Phasor Data Concentrator --- --- Copyright (C) 2011 Nitesh Pandit --- Copyright (C) 2011 Kedar V. Khandeparkar --- --- This program is free software; you can redistribute it and/or --- modify it under the terms of the GNU General Public License --- as published by the Free Software Foundation; either version 2 --- of the License, or (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- --- Authors: --- Kedar V. Khandeparkar --- Nitesh Pandit --- --- ============================================================================= - - --- First execute the following from the command prompt to create database: --- mysql -uroot -p <"Db.sql" - --- The following statements are used to create a user with access to the database. --- Be sure to change the username and password. --- CREATE USER NewUser IDENTIFIED BY 'MyPassword'; --- GRANT SELECT, UPDATE, INSERT, DELETE ON iPDC.* TO NewUser; - -SET default_storage_engine=INNODB; -CREATE DATABASE iPDC; -USE iPDC; - - --- ============================================================================================ --- This creates Main Configuration Table, --- This table stores MAIN CONFIGURATION details Like PDC_ID, SOC, TIME BASE, NO. OF PMU, --- DATA Rate in iPDC Database - -CREATE TABLE MAIN_CFG_TABLE( - PDC_ID INT NOT NULL, - SOC DECIMAL(10) NOT NULL, - FRACSEC DECIMAL(10) NOT NULL, - TIMEBASE DECIMAL(10) NOT NULL, - NUM_OF_PMU INT NOT NULL, - DATA_RATE INT DEFAULT 0, - PRIMARY KEY (PDC_ID ASC) -); - - --- ============================================================================================ --- This creates Sub Configuration Table, --- This table stores Sub Configuration details Like PDC_ID, PMU_ID, SOC,Fraction of Second, --- Station Name, No. of Analog channels, No. of Phasor channels in iPDC Database - -CREATE TABLE SUB_CFG_TABLE( - - PDC_ID INT NOT NULL, - PMU_ID INT NOT NULL, - SOC DECIMAL(10) NOT NULL, - FRACSEC DECIMAL(10) NOT NULL, - STN VARCHAR(40) NOT NULL, - PHNMR INT DEFAULT 0, - ANNMR INT DEFAULT 0, - DGNMR INT DEFAULT 0, - FNOM INT DEFAULT 0, - PRIMARY KEY (PMU_ID), - CONSTRAINT FOREIGN KEY (PDC_ID) REFERENCES MAIN_CFG_TABLE (PDC_ID) -); - --- ============================================================================================ --- This creates Phasor channel information Table --- This table stores details about phasor Configuration like PDC_ID, Phasor name, Phasor type, --- Phasor units in iPDC Database - -CREATE TABLE PHASOR ( - - PDC_ID INT NOT NULL, - PMU_ID INT NOT NULL, - PHASOR_NAMES VARCHAR(32) NOT NULL, - PHASOR_TYPE VARCHAR(3) NOT NULL, - PHUNITS FLOAT(20,6) DEFAULT 1.0, - PRIMARY KEY(PHASOR_NAMES,PDC_ID,PMU_ID), - CONSTRAINT FOREIGN KEY (PDC_ID) REFERENCES MAIN_CFG_TABLE (PDC_ID), - CONSTRAINT FOREIGN KEY (PMU_ID) REFERENCES SUB_CFG_TABLE (PMU_ID) -); - --- ============================================================================================ --- This creates ANALOG channel information Table --- This table stores details about Analog Configuration like PDC_ID, Analog name, Analog type, --- Analog units in iPDC Database - -CREATE TABLE ANALOG ( - PDC_ID INT NOT NULL, - PMU_ID INT NOT NULL, - ANALOG_NAMES VARCHAR(32) NOT NULL, - ANALOG_TYPE VARCHAR(6) NOT NULL, - ANUNITS FLOAT(20,6) DEFAULT 1.0, - PRIMARY KEY(ANALOG_NAMES,PDC_ID,PMU_ID), - CONSTRAINT FOREIGN KEY (PDC_ID) REFERENCES MAIN_CFG_TABLE (PDC_ID), - CONSTRAINT FOREIGN KEY (PMU_ID) REFERENCES SUB_CFG_TABLE (PMU_ID) - -); - - --- ============================================================================================ --- This creates Digital information Table --- this table stores details about Digital channel Configuration like Digital Status word etc.. --- in iPDC Database - -CREATE TABLE DIGITAL ( - - PDC_ID INT NOT NULL, - PMU_ID INT NOT NULL, - DIGITAL_NAMES VARCHAR(32) NOT NULL, - DIGITAL_WORD BIGINT NOT NULL, - PRIMARY KEY(DIGITAL_NAMES,PDC_ID,PMU_ID), - CONSTRAINT FOREIGN KEY (PDC_ID) REFERENCES MAIN_CFG_TABLE (PDC_ID), - CONSTRAINT FOREIGN KEY (PMU_ID) REFERENCES SUB_CFG_TABLE (PMU_ID) -); - --- ============================================================================================ --- This creates Phasor Data Table --- this table stores measurements received from phasor data channel(s) in iPDC Database. - -CREATE TABLE PHASOR_MEASUREMENTS ( - PDC_ID INT NOT NULL, - PMU_ID INT NOT NULL, - SOC DECIMAL(10) NOT NULL, - FRACSEC DECIMAL(10) NOT NULL, - PHASOR_NAME VARCHAR(32) NOT NULL, - PHASOR_AMPLITUDE REAL NOT NULL, - PHASOR_ANGLE REAL NOT NULL, - CONSTRAINT FOREIGN KEY (PHASOR_NAME) REFERENCES PHASOR (PHASOR_NAMES), - CONSTRAINT FOREIGN KEY (PDC_ID) REFERENCES MAIN_CFG_TABLE (PDC_ID), - CONSTRAINT FOREIGN KEY (PMU_ID) REFERENCES SUB_CFG_TABLE (PMU_ID) -); - --- ============================================================================================ --- This creates Analog Data Table in iPDC database, --- this table stores measurements received from Analog data channel(s) in iPDC Database. - -CREATE TABLE ANALOG_MEASUREMENTS ( - PDC_ID INT NOT NULL, - PMU_ID INT NOT NULL, - SOC DECIMAL(10) NOT NULL, - FRACSEC DECIMAL(10) NOT NULL, - ANALOG_NAME VARCHAR(32) NOT NULL, - ANALOG_VALUE REAL NOT NULL, - CONSTRAINT FOREIGN KEY (ANALOG_NAME) REFERENCES ANALOG (ANALOG_NAMES), - CONSTRAINT FOREIGN KEY (PDC_ID) REFERENCES MAIN_CFG_TABLE (PDC_ID), - CONSTRAINT FOREIGN KEY (PMU_ID) REFERENCES SUB_CFG_TABLE (PMU_ID) - -); - --- ============================================================================================ --- This creates "Digital Measurements" Table --- this table stores measurements received from Digital data channel in iPDC Database. - -CREATE TABLE DIGITAL_MEASUREMENTS ( - PDC_ID INT NOT NULL, - PMU_ID INT NOT NULL, - SOC DECIMAL(10) NOT NULL, - FRACSEC DECIMAL(10) NOT NULL, - DIGITAL_WORD INT NOT NULL, - CONSTRAINT FOREIGN KEY (PDC_ID) REFERENCES MAIN_CFG_TABLE (PDC_ID), - CONSTRAINT FOREIGN KEY (PMU_ID) REFERENCES SUB_CFG_TABLE (PMU_ID) - -); - --- ============================================================================================ --- This creates "Frequency Measurements" Table --- This table stores Frequency measurements received from frequency data channel in iPDC --- Database. - -CREATE TABLE FREQUENCY_MEASUREMENTS ( - PDC_ID INT NOT NULL, - PMU_ID INT NOT NULL, - SOC DECIMAL(10) NOT NULL, - FRACSEC DECIMAL(10) NOT NULL, - FREQ FLOAT (10, 8) NOT NULL, - DFREQ FLOAT (10, 8) NOT NULL, - PRIMARY KEY(SOC,FRACSEC,PDC_ID,PMU_ID), - CONSTRAINT FOREIGN KEY (PDC_ID) REFERENCES MAIN_CFG_TABLE (PDC_ID), - CONSTRAINT FOREIGN KEY (PMU_ID) REFERENCES SUB_CFG_TABLE (PMU_ID) - -); - --- ============================================================================================ --- This creates Received frame Time Table --- This table stores REceived frame time log in iPDC Database. - -CREATE TABLE RECEIVED_FRAME_TIME ( - PDC_ID INT NOT NULL, - PMU_ID INT NOT NULL, - FRAME_SOC DECIMAL(10) NOT NULL, - FRAME_FRACSEC DECIMAL(10) NOT NULL, - RECEIVE_SOC DECIMAL(10) NOT NULL, - RECEIVE_FRACSEC DECIMAL(10) NOT NULL, - TIME_DIFF DECIMAL(10) NOT NULL, - PRIMARY KEY(FRAME_SOC,FRAME_FRACSEC,PDC_ID,PMU_ID), - CONSTRAINT FOREIGN KEY (PDC_ID) REFERENCES MAIN_CFG_TABLE (PDC_ID), - CONSTRAINT FOREIGN KEY (PMU_ID) REFERENCES SUB_CFG_TABLE (PMU_ID) - -); --- ============================================================================================ diff --git a/DBServer/Doxyfile b/DBServer/Doxyfile deleted file mode 100755 index 80b247d..0000000 --- a/DBServer/Doxyfile +++ /dev/null @@ -1,1285 +0,0 @@ - # ----------------------------------------------------------------------------- - # Doxyfile for documentation of DBServer - - # iPDC - Phasor Data Concentrator - # - # Copyright (C) 2011 Nitesh Pandit - # Copyright (C) 2011 Kedar V. Khandeparkar - - # This program is free software; you can redistribute it and/or - # modify it under the terms of the GNU General Public License - # as published by the Free Software Foundation; either version 2 - # of the License, or (at your option) any later version. - # - # This program is distributed in the hope that it will be useful, - # but WITHOUT ANY WARRANTY; without even the implied warranty of - # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - # GNU General Public License for more details. - # - # You should have received a copy of the GNU General Public License - # along with this program; if not, write to the Free Software - # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - # - # Authors: - # Nitesh Pandit - # Kedar V. Khandeparkar - # - # ----------------------------------------------------------------------------- - -# Doxyfile 1.5.2 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file that -# follow. The default is UTF-8 which is also the encoding used for all text before -# the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into -# libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of -# possible encodings. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = DBServer - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would -# otherwise cause performance problems for the file system. - -CREATE_SUBDIRS = YES - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, -# Italian, Japanese, Japanese-en (Japanese with English messages), Korean, -# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, -# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" -# "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = YES - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like the Qt-style comments (thus requiring an -# explicit @brief command for a brief description. - -JAVADOC_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. - -DETAILS_AT_TOP = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will -# be part of the file/class/namespace that contains it. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 8 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = YES - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for Java. -# For instance, namespaces will be presented as packages, qualified scopes -# will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to -# include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. - -CPP_CLI_SUPPORT = NO - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = YES - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. - -EXTRACT_LOCAL_METHODS = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -# in the documentation. The default is NO. - -SHOW_DIRECTORIES = NO - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from the -# version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the program writes to standard output -# is used as the file version. See the manual for examples. - -FILE_VERSION_FILTER = - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of -# documentation. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could -# be obtained via FILE_VERSION_FILTER) - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = - -# This tag can be used to specify the character encoding of the source files that -# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default -# input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding. -# See http://www.gnu.org/software/libiconv for the list of possible encodings. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx -# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py - -FILE_PATTERNS = - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = NO - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded -# from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories -# for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the output. -# The symbol name can be a fully qualified name, a word, or if the wildcard * is used, -# a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be -# ignored. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER -# is applied to all files. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = YES - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = YES - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES (the default) -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES (the default) -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = YES - -# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) -# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from -# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will -# link to the source code. Otherwise they will link to the documentstion. - -REFERENCES_LINK_SOURCE = YES - -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You -# will need version 4.8.6 or higher. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = NO - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be -# generated containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. - -GENERATE_TREEVIEW = NO - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = NO - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = NO - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = NO - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = NO - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_DEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator -# instead of the = operator. - -PREDEFINED = - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse -# the parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more -# powerful graphs. - -CLASS_DIAGRAMS = YES - -# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to -# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to -# specify the directory where the mscgen tool resides. If left empty the tool is assumed to -# be found in the default search path. - -MSCGEN_PATH = - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = YES - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for groups, showing the direct groups dependencies - -GROUP_GRAPHS = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a call dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable call graphs for selected -# functions only using the \callgraph command. - -CALL_GRAPH = YES - -# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a caller dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable caller graphs for selected -# functions only using the \callergraph command. - -CALLER_GRAPH = YES - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories -# in a graphical way. The dependency relations are determined by the #include -# relations between the files in the directories. - -DIRECTORY_GRAPH = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = gif - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found in the path. - -DOT_PATH = /usr/local/bin/dot - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of -# nodes that will be shown in the graph. If the number of nodes in a graph -# becomes larger than this value, doxygen will truncate the graph, which is -# visualized by representing a node as a red box. Note that doxygen will always -# show the root nodes and its direct children regardless of this setting. - -DOT_GRAPH_MAX_NODES = 50 - -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, which results in a white background. -# Warning: Depending on the platform used, enabling this option may lead to -# badly anti-aliased labels on the edges of a graph (i.e. they become hard to -# read). - -DOT_TRANSPARENT = NO - -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) -# support this, this feature is disabled by default. - -DOT_MULTI_TARGETS = NO - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO diff --git a/DBServer/FREQUENCY_MEASUREMENTS.txt b/DBServer/FREQUENCY_MEASUREMENTS.txt deleted file mode 100644 index f79a713..0000000 --- a/DBServer/FREQUENCY_MEASUREMENTS.txt +++ /dev/null @@ -1,398 +0,0 @@ - 1,1,1657041650,880000,50.400002,0.000000 - 1,1,1657041650,920000,50.099998,0.000000 - 1,1,1657041650,960000,50.099998,0.000000 - 1,1,1657041651,0,50.400002,0.000000 - 1,1,1657041651,40000,50.400002,0.000000 - 1,1,1657041651,80000,50.200001,0.000000 - 1,1,1657041651,120000,50.500000,0.000000 - 1,1,1657041651,160000,50.400002,0.000000 - 1,1,1657041651,200000,50.500000,0.000000 - 1,1,1657041651,240000,50.299999,0.000000 - 1,1,1657041651,280000,50.299999,0.000000 - 1,1,1657041651,320000,50.099998,0.000000 - 1,1,1657041651,360000,50.500000,0.000000 - 1,1,1657041651,400000,50.200001,0.000000 - 1,1,1657041651,440000,50.500000,0.000000 - 1,1,1657041651,480000,50.099998,0.000000 - 1,1,1657041651,520000,50.500000,0.000000 - 1,1,1657041651,560000,50.500000,0.000000 - 1,1,1657041651,600000,50.200001,0.000000 - 1,1,1657041651,640000,50.099998,0.000000 - 1,1,1657041651,680000,50.500000,0.000000 - 1,1,1657041651,720000,50.200001,0.000000 - 1,1,1657041651,760000,50.500000,0.000000 - 1,1,1657041651,800000,50.200001,0.000000 - 1,1,1657041651,840000,50.500000,0.000000 - 1,1,1657041651,880000,50.200001,0.000000 - 1,1,1657041651,920000,50.299999,0.000000 - 1,1,1657041651,960000,50.500000,0.000000 - 1,1,1657041652,0,50.099998,0.000000 - 1,1,1657041652,40000,50.299999,0.000000 - 1,1,1657041652,80000,50.400002,0.000000 - 1,1,1657041652,120000,50.200001,0.000000 - 1,1,1657041652,160000,50.200001,0.000000 - 1,1,1657041652,200000,50.299999,0.000000 - 1,1,1657041652,240000,50.500000,0.000000 - 1,1,1657041652,280000,50.400002,0.000000 - 1,1,1657041652,320000,50.200001,0.000000 - 1,1,1657041652,360000,50.299999,0.000000 - 1,1,1657041652,400000,50.099998,0.000000 - 1,1,1657041652,440000,50.200001,0.000000 - 1,1,1657041652,480000,50.099998,0.000000 - 1,1,1657041652,520000,50.299999,0.000000 - 1,1,1657041652,560000,50.299999,0.000000 - 1,1,1657041652,600000,50.299999,0.000000 - 1,1,1657041652,640000,50.299999,0.000000 - 1,1,1657041652,680000,50.200001,0.000000 - 1,1,1657041652,720000,50.299999,0.000000 - 1,1,1657041652,760000,50.400002,0.000000 - 1,1,1657041652,800000,50.500000,0.000000 - 1,1,1657041652,840000,50.099998,0.000000 - 1,1,1657041652,880000,50.099998,0.000000 - 1,1,1657041652,920000,50.200001,0.000000 - 1,1,1657041652,960000,50.299999,0.000000 - 1,1,1657041653,0,50.500000,0.000000 - 1,1,1657041653,40000,50.200001,0.000000 - 1,1,1657041653,80000,50.099998,0.000000 - 1,1,1657041653,120000,50.500000,0.000000 - 1,1,1657041653,160000,50.400002,0.000000 - 1,1,1657041653,200000,50.299999,0.000000 - 1,1,1657041653,240000,50.099998,0.000000 - 1,1,1657041653,280000,50.400002,0.000000 - 1,1,1657041653,320000,50.299999,0.000000 - 1,1,1657041653,360000,50.400002,0.000000 - 1,1,1657041653,400000,50.400002,0.000000 - 1,1,1657041653,440000,50.400002,0.000000 - 1,1,1657041653,480000,50.200001,0.000000 - 1,1,1657041653,520000,50.500000,0.000000 - 1,1,1657041653,560000,50.099998,0.000000 - 1,1,1657041653,600000,50.099998,0.000000 - 1,1,1657041653,640000,50.200001,0.000000 - 1,1,1657041653,680000,50.200001,0.000000 - 1,1,1657041653,720000,50.200001,0.000000 - 1,1,1657041653,760000,50.200001,0.000000 - 1,1,1657041653,800000,50.200001,0.000000 - 1,1,1657041653,840000,50.299999,0.000000 - 1,1,1657041653,880000,50.099998,0.000000 - 1,1,1657041653,920000,50.400002,0.000000 - 1,1,1657041653,960000,50.500000,0.000000 - 1,1,1657041654,0,50.200001,0.000000 - 1,1,1657041654,40000,50.400002,0.000000 - 1,1,1657041654,80000,50.200001,0.000000 - 1,1,1657041654,120000,50.500000,0.000000 - 1,1,1657041654,160000,50.299999,0.000000 - 1,1,1657041654,200000,50.200001,0.000000 - 1,1,1657041654,240000,50.299999,0.000000 - 1,1,1657041654,280000,50.400002,0.000000 - 1,1,1657041654,320000,50.400002,0.000000 - 1,1,1657041654,360000,50.400002,0.000000 - 1,1,1657041654,400000,50.500000,0.000000 - 1,1,1657041654,440000,50.500000,0.000000 - 1,1,1657041654,480000,50.099998,0.000000 - 1,1,1657041654,520000,50.099998,0.000000 - 1,1,1657041654,560000,50.400002,0.000000 - 1,1,1657041654,600000,50.299999,0.000000 - 1,1,1657041654,640000,50.099998,0.000000 - 1,1,1657041654,680000,50.299999,0.000000 - 1,1,1657041654,720000,50.400002,0.000000 - 1,1,1657041654,760000,50.299999,0.000000 - 1,1,1657041654,800000,50.200001,0.000000 - 1,1,1657041654,840000,50.099998,0.000000 - 1,1,1657041654,880000,50.099998,0.000000 - 1,1,1657041654,920000,50.400002,0.000000 - 1,1,1657041654,960000,50.200001,0.000000 - 1,1,1657041655,0,50.200001,0.000000 - 1,1,1657041655,40000,50.500000,0.000000 - 1,1,1657041655,80000,50.299999,0.000000 - 1,1,1657041655,120000,50.299999,0.000000 - 1,1,1657041655,160000,50.500000,0.000000 - 1,1,1657041655,200000,50.200001,0.000000 - 1,1,1657041655,240000,50.299999,0.000000 - 1,1,1657041655,280000,50.200001,0.000000 - 1,1,1657041655,320000,50.500000,0.000000 - 1,1,1657041655,360000,50.299999,0.000000 - 1,1,1657041655,400000,50.200001,0.000000 - 1,1,1657041655,440000,50.200001,0.000000 - 1,1,1657041655,480000,50.299999,0.000000 - 1,1,1657041655,520000,50.400002,0.000000 - 1,1,1657041655,560000,50.099998,0.000000 - 1,1,1657041655,600000,50.500000,0.000000 - 1,1,1657041655,640000,50.099998,0.000000 - 1,1,1657041655,680000,50.500000,0.000000 - 1,1,1657041655,720000,50.500000,0.000000 - 1,1,1657041655,760000,50.099998,0.000000 - 1,1,1657041655,800000,50.200001,0.000000 - 1,1,1657041655,840000,50.099998,0.000000 - 1,1,1657041655,880000,50.400002,0.000000 - 1,1,1657041655,920000,50.099998,0.000000 - 1,1,1657041655,960000,50.299999,0.000000 - 1,1,1657041656,0,50.500000,0.000000 - 1,1,1657041656,40000,50.500000,0.000000 - 1,1,1657041656,80000,50.400002,0.000000 - 1,1,1657041656,120000,50.200001,0.000000 - 1,1,1657041656,160000,50.099998,0.000000 - 1,1,1657041656,200000,50.500000,0.000000 - 1,1,1657041656,240000,50.200001,0.000000 - 1,1,1657041656,280000,50.400002,0.000000 - 1,1,1657041656,320000,50.099998,0.000000 - 1,1,1657041656,360000,50.500000,0.000000 - 1,1,1657041656,400000,50.299999,0.000000 - 1,1,1657041656,440000,50.299999,0.000000 - 1,1,1657041656,480000,50.200001,0.000000 - 1,1,1657041656,520000,50.500000,0.000000 - 1,1,1657041656,560000,50.400002,0.000000 - 1,1,1657041656,600000,50.299999,0.000000 - 1,1,1657041656,640000,50.299999,0.000000 - 1,1,1657041656,680000,50.500000,0.000000 - 1,1,1657041656,720000,50.200001,0.000000 - 1,1,1657041656,760000,50.099998,0.000000 - 1,1,1657041656,800000,50.500000,0.000000 - 1,1,1657041656,840000,50.500000,0.000000 - 1,1,1657041656,880000,50.099998,0.000000 - 1,1,1657041656,920000,50.299999,0.000000 - 1,1,1657041656,960000,50.200001,0.000000 - 1,1,1657041657,0,50.200001,0.000000 - 1,1,1657041657,40000,50.099998,0.000000 - 1,1,1657041657,80000,50.200001,0.000000 - 1,1,1657041657,120000,50.400002,0.000000 - 1,1,1657041657,160000,50.400002,0.000000 - 1,1,1657041657,200000,50.099998,0.000000 - 1,1,1657041657,240000,50.400002,0.000000 - 1,1,1657041657,280000,50.400002,0.000000 - 1,1,1657041657,320000,50.400002,0.000000 - 1,1,1657041657,360000,50.200001,0.000000 - 1,1,1657041657,400000,50.099998,0.000000 - 1,1,1657041657,440000,50.099998,0.000000 - 1,1,1657041657,480000,50.400002,0.000000 - 1,1,1657041657,520000,50.500000,0.000000 - 1,1,1657041657,560000,50.400002,0.000000 - 1,1,1657041657,600000,50.099998,0.000000 - 1,1,1657041657,640000,50.500000,0.000000 - 1,1,1657041657,680000,50.400002,0.000000 - 1,1,1657041657,720000,50.299999,0.000000 - 1,1,1657041657,760000,50.400002,0.000000 - 1,1,1657041657,800000,50.500000,0.000000 - 1,1,1657041657,840000,50.099998,0.000000 - 1,1,1657041657,880000,50.400002,0.000000 - 1,1,1657041657,920000,50.500000,0.000000 - 1,1,1657041657,960000,50.400002,0.000000 - 1,1,1657041658,0,50.500000,0.000000 - 1,1,1657041658,40000,50.400002,0.000000 - 1,1,1657041658,80000,50.400002,0.000000 - 1,1,1657041658,120000,50.200001,0.000000 - 1,1,1657041658,160000,50.500000,0.000000 - 1,1,1657041658,200000,50.400002,0.000000 - 1,1,1657041658,240000,50.200001,0.000000 - 1,1,1657041658,280000,50.099998,0.000000 - 1,1,1657041658,320000,50.200001,0.000000 - 1,1,1657041658,360000,50.500000,0.000000 - 1,1,1657041658,400000,50.500000,0.000000 - 1,1,1657041658,440000,50.400002,0.000000 - 1,1,1657041658,480000,50.099998,0.000000 - 1,1,1657041658,520000,50.099998,0.000000 - 1,1,1657041658,560000,50.200001,0.000000 - 1,1,1657041658,600000,50.099998,0.000000 - 1,1,1657041658,640000,50.099998,0.000000 - 1,1,1657041658,680000,50.200001,0.000000 - 1,1,1657041658,720000,50.099998,0.000000 - 1,1,1657041658,760000,50.500000,0.000000 - 1,1,1657041658,800000,50.099998,0.000000 - 1,1,1657041658,840000,50.299999,0.000000 - 1,1,1657041658,880000,50.299999,0.000000 - 1,1,1657041658,920000,50.099998,0.000000 - 1,1,1657041658,960000,50.400002,0.000000 - 1,1,1657041659,0,50.200001,0.000000 - 1,1,1657041659,40000,50.099998,0.000000 - 1,1,1657041659,80000,50.200001,0.000000 - 1,1,1657041659,120000,50.400002,0.000000 - 1,1,1657041659,160000,50.400002,0.000000 - 1,1,1657041659,200000,50.500000,0.000000 - 1,1,1657041659,240000,50.099998,0.000000 - 1,1,1657041659,280000,50.200001,0.000000 - 1,1,1657041659,320000,50.200001,0.000000 - 1,1,1657041659,360000,50.400002,0.000000 - 1,1,1657041659,400000,50.299999,0.000000 - 1,1,1657041659,440000,50.299999,0.000000 - 1,1,1657041659,480000,50.200001,0.000000 - 1,1,1657041659,520000,50.200001,0.000000 - 1,1,1657041659,560000,50.299999,0.000000 - 1,1,1657041659,600000,50.099998,0.000000 - 1,1,1657041659,640000,50.299999,0.000000 - 1,1,1657041659,680000,50.099998,0.000000 - 1,1,1657041659,720000,50.299999,0.000000 - 1,1,1657041659,760000,50.400002,0.000000 - 1,1,1657041659,800000,50.200001,0.000000 - 1,1,1657041659,840000,50.400002,0.000000 - 1,1,1657041659,880000,50.200001,0.000000 - 1,1,1657041659,920000,50.400002,0.000000 - 1,1,1657041659,960000,50.299999,0.000000 - 1,1,1657041660,0,50.200001,0.000000 - 1,1,1657041660,40000,50.299999,0.000000 - 1,1,1657041660,80000,50.500000,0.000000 - 1,1,1657041660,120000,50.200001,0.000000 - 1,1,1657041660,160000,50.500000,0.000000 - 1,1,1657041660,200000,50.200001,0.000000 - 1,1,1657041660,240000,50.099998,0.000000 - 1,1,1657041660,280000,50.299999,0.000000 - 1,1,1657041660,320000,50.200001,0.000000 - 1,1,1657041660,360000,50.299999,0.000000 - 1,1,1657041660,400000,50.500000,0.000000 - 1,1,1657041660,440000,50.400002,0.000000 - 1,1,1657041660,480000,50.200001,0.000000 - 1,1,1657041660,520000,50.200001,0.000000 - 1,1,1657041660,560000,50.299999,0.000000 - 1,1,1657041660,600000,50.500000,0.000000 - 1,1,1657041660,640000,50.200001,0.000000 - 1,1,1657041660,680000,50.200001,0.000000 - 1,1,1657041660,720000,50.099998,0.000000 - 1,1,1657041660,760000,50.099998,0.000000 - 1,1,1657041660,800000,50.099998,0.000000 - 1,1,1657041660,840000,50.400002,0.000000 - 1,1,1657041660,880000,50.299999,0.000000 - 1,1,1657041660,920000,50.400002,0.000000 - 1,1,1657041660,960000,50.299999,0.000000 - 1,1,1657041661,0,50.200001,0.000000 - 1,1,1657041661,40000,50.500000,0.000000 - 1,1,1657041661,80000,50.299999,0.000000 - 1,1,1657041661,120000,50.500000,0.000000 - 1,1,1657041661,160000,50.200001,0.000000 - 1,1,1657041661,200000,50.200001,0.000000 - 1,1,1657041661,240000,50.200001,0.000000 - 1,1,1657041661,280000,50.400002,0.000000 - 1,1,1657041661,320000,50.200001,0.000000 - 1,1,1657041661,360000,50.200001,0.000000 - 1,1,1657041661,400000,50.500000,0.000000 - 1,1,1657041661,440000,50.400002,0.000000 - 1,1,1657041661,480000,50.200001,0.000000 - 1,1,1657041661,520000,50.099998,0.000000 - 1,1,1657041661,560000,50.299999,0.000000 - 1,1,1657041661,600000,50.299999,0.000000 - 1,1,1657041661,640000,50.500000,0.000000 - 1,1,1657041661,680000,50.400002,0.000000 - 1,1,1657041661,720000,50.400002,0.000000 - 1,1,1657041661,760000,50.500000,0.000000 - 1,1,1657041661,800000,50.099998,0.000000 - 1,1,1657041661,840000,50.500000,0.000000 - 1,1,1657041661,880000,50.099998,0.000000 - 1,1,1657041661,920000,50.400002,0.000000 - 1,1,1657041661,960000,50.400002,0.000000 - 1,1,1657041662,0,50.500000,0.000000 - 1,1,1657041662,40000,50.400002,0.000000 - 1,1,1657041662,80000,50.099998,0.000000 - 1,1,1657041662,120000,50.299999,0.000000 - 1,1,1657041662,160000,50.500000,0.000000 - 1,1,1657041662,200000,50.200001,0.000000 - 1,1,1657041662,240000,50.200001,0.000000 - 1,1,1657041662,280000,50.099998,0.000000 - 1,1,1657041662,320000,50.099998,0.000000 - 1,1,1657041662,360000,50.400002,0.000000 - 1,1,1657041662,400000,50.500000,0.000000 - 1,1,1657041662,440000,50.500000,0.000000 - 1,1,1657041662,480000,50.099998,0.000000 - 1,1,1657041662,520000,50.400002,0.000000 - 1,1,1657041662,560000,50.200001,0.000000 - 1,1,1657041662,600000,50.299999,0.000000 - 1,1,1657041662,640000,50.200001,0.000000 - 1,1,1657041662,680000,50.099998,0.000000 - 1,1,1657041662,720000,50.500000,0.000000 - 1,1,1657041662,760000,50.500000,0.000000 - 1,1,1657041662,800000,50.200001,0.000000 - 1,1,1657041662,840000,50.099998,0.000000 - 1,1,1657041662,880000,50.299999,0.000000 - 1,1,1657041662,920000,50.099998,0.000000 - 1,1,1657041662,960000,50.099998,0.000000 - 1,1,1657041663,0,50.200001,0.000000 - 1,1,1657041663,40000,50.500000,0.000000 - 1,1,1657041663,80000,50.099998,0.000000 - 1,1,1657041663,120000,50.400002,0.000000 - 1,1,1657041663,160000,50.400002,0.000000 - 1,1,1657041663,200000,50.500000,0.000000 - 1,1,1657041663,240000,50.400002,0.000000 - 1,1,1657041663,280000,50.200001,0.000000 - 1,1,1657041663,320000,50.099998,0.000000 - 1,1,1657041663,360000,50.099998,0.000000 - 1,1,1657041663,400000,50.200001,0.000000 - 1,1,1657041663,440000,50.099998,0.000000 - 1,1,1657041663,480000,50.099998,0.000000 - 1,1,1657041663,520000,50.400002,0.000000 - 1,1,1657041663,560000,50.099998,0.000000 - 1,1,1657041663,600000,50.099998,0.000000 - 1,1,1657041663,640000,50.500000,0.000000 - 1,1,1657041663,680000,50.099998,0.000000 - 1,1,1657041663,720000,50.299999,0.000000 - 1,1,1657041663,760000,50.400002,0.000000 - 1,1,1657041663,800000,50.500000,0.000000 - 1,1,1657041663,840000,50.200001,0.000000 - 1,1,1657041663,880000,50.400002,0.000000 - 1,1,1657041663,920000,50.099998,0.000000 - 1,1,1657041663,960000,50.400002,0.000000 - 1,1,1657041664,0,50.500000,0.000000 - 1,1,1657041664,40000,50.500000,0.000000 - 1,1,1657041664,80000,50.200001,0.000000 - 1,1,1657041664,120000,50.200001,0.000000 - 1,1,1657041664,160000,50.400002,0.000000 - 1,1,1657041664,200000,50.299999,0.000000 - 1,1,1657041664,240000,50.500000,0.000000 - 1,1,1657041664,280000,50.099998,0.000000 - 1,1,1657041664,320000,50.299999,0.000000 - 1,1,1657041664,360000,50.099998,0.000000 - 1,1,1657041664,400000,50.500000,0.000000 - 1,1,1657041664,440000,50.099998,0.000000 - 1,1,1657041664,480000,50.400002,0.000000 - 1,1,1657041664,520000,50.200001,0.000000 - 1,1,1657041664,560000,50.299999,0.000000 - 1,1,1657041664,600000,50.400002,0.000000 - 1,1,1657041664,640000,50.299999,0.000000 - 1,1,1657041664,680000,50.400002,0.000000 - 1,1,1657041664,720000,50.400002,0.000000 - 1,1,1657041664,760000,50.500000,0.000000 - 1,1,1657041664,800000,50.400002,0.000000 - 1,1,1657041664,840000,50.400002,0.000000 - 1,1,1657041664,880000,50.200001,0.000000 - 1,1,1657041664,920000,50.299999,0.000000 - 1,1,1657041664,960000,50.099998,0.000000 - 1,1,1657041665,0,50.500000,0.000000 - 1,1,1657041665,40000,50.200001,0.000000 - 1,1,1657041665,80000,50.200001,0.000000 - 1,1,1657041665,120000,50.500000,0.000000 - 1,1,1657041665,160000,50.099998,0.000000 - 1,1,1657041665,200000,50.099998,0.000000 - 1,1,1657041665,240000,50.200001,0.000000 - 1,1,1657041665,280000,50.299999,0.000000 - 1,1,1657041665,320000,50.400002,0.000000 - 1,1,1657041665,360000,50.500000,0.000000 - 1,1,1657041665,400000,50.500000,0.000000 - 1,1,1657041665,440000,50.400002,0.000000 - 1,1,1657041665,480000,50.500000,0.000000 - 1,1,1657041665,520000,50.500000,0.000000 - 1,1,1657041665,560000,50.099998,0.000000 - 1,1,1657041665,600000,50.400002,0.000000 - 1,1,1657041665,640000,50.400002,0.000000 - 1,1,1657041665,680000,50.299999,0.000000 - 1,1,1657041665,720000,50.200001,0.000000 - 1,1,1657041665,760000,50.299999,0.000000 - 1,1,1657041665,800000,50.400002,0.000000 - 1,1,1657041665,840000,50.299999,0.000000 - 1,1,1657041665,880000,50.200001,0.000000 - 1,1,1657041665,920000,50.200001,0.000000 - 1,1,1657041665,960000,50.099998,0.000000 - 1,1,1657041666,0,50.299999,0.000000 - 1,1,1657041666,40000,50.500000,0.000000 - 1,1,1657041666,80000,50.200001,0.000000 - 1,1,1657041666,120000,50.099998,0.000000 - 1,1,1657041666,160000,50.299999,0.000000 - 1,1,1657041666,200000,50.299999,0.000000 - 1,1,1657041666,240000,50.500000,0.000000 - 1,1,1657041666,280000,50.200001,0.000000 - 1,1,1657041666,320000,50.099998,0.000000 - 1,1,1657041666,360000,50.299999,0.000000 - 1,1,1657041666,400000,50.299999,0.000000 - 1,1,1657041666,440000,50.500000,0.000000 - 1,1,1657041666,480000,50.299999,0.000000 - 1,1,1657041666,520000,50.500000,0.000000 - 1,1,1657041666,560000,50.200001,0.000000 - 1,1,1657041666,600000,50.299999,0.000000 - 1,1,1657041666,640000,50.099998,0.000000 - 1,1,1657041666,680000,50.500000,0.000000 - 1,1,1657041666,720000,50.099998,0.000000 - 1,1,1657041666,760000,50.099998,0.000000 diff --git a/DBServer/Makefile b/DBServer/Makefile deleted file mode 100755 index a5faa34..0000000 --- a/DBServer/Makefile +++ /dev/null @@ -1,70 +0,0 @@ - # ----------------------------------------------------------------------------- - # Makefile for building DBServer - - # iPDC - Phasor Data Concentrator - # - # Copyright (C) 2011 Nitesh Pandit - # Copyright (C) 2011 Kedar V. Khandeparkar - - # This program is free software; you can redistribute it and/or - # modify it under the terms of the GNU General Public License - # as published by the Free Software Foundation; either version 2 - # of the License, or (at your option) any later version. - # - # This program is distributed in the hope that it will be useful, - # but WITHOUT ANY WARRANTY; without even the implied warranty of - # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - # GNU General Public License for more details. - # - # You should have received a copy of the GNU General Public License - # along with this program; if not, write to the Free Software - # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - # - # Authors: - # Nitesh Pandit - # Kedar V. Khandeparkar - # - # ----------------------------------------------------------------------------- - - -SHELL = /bin/sh -prefix = /usr/local -includedir = /usr/src/include - -INSTALL = /usr/bin/install -c -INSTALL_PREFIX = /usr/local - -CC = gcc -LIBS = -lpthread -lm -LDLIBS=`mysql_config --cflags --libs` -CFLAGS=-Wall -g -fcommon `mysql_config --cflags --libs` - -SOURCES = \ - dbserver.c \ - recreate.c recreate.h \ - connections.c connections.h \ - parser.c parser.h \ - dallocate.c dallocate.h - -OBJECTS = dbserver.c recreate.o connections.o parser.o dallocate.o - -CLEAN_OBJECTS = recreate.o connections.o new_pmu_or_pdc.o parser.o dallocate.o cfg.bin - -PROGRAM = DBServer - -COMPILE = $(CC) - -$(PROGRAM): $(OBJECTS) - $(CC) $(OBJECTS) $(LDLIBS) $(LIBS) -o $@ - -%.o: %.c - $(COMPILE) $(CFLAGS) -c -w $< - -clean: - rm -f $(CLEAN_OBJECTS) $(PROGRAM) - -install: $(PROGRAM) - cp -f $(PROGRAM) $(INSTALL_PREFIX)/bin/$(PROGRAM) - -uninstall: - rm -f $(INSTALL_PREFIX)/bin/$(PROGRAM) diff --git a/DBServer/PHASOR_MEASUREMENTS.txt b/DBServer/PHASOR_MEASUREMENTS.txt deleted file mode 100644 index 9e25a64..0000000 --- a/DBServer/PHASOR_MEASUREMENTS.txt +++ /dev/null @@ -1,398 +0,0 @@ - 1,1,1657041650,840000,"P1 ",3995.759521,0.001298 - 1,1,1657041650,880000,"P1 ",3996.003906,0.001375 - 1,1,1657041650,920000,"P1 ",3995.575928,0.001222 - 1,1,1657041650,960000,"P1 ",3994.415283,0.000901 - 1,1,1657041651,0,"P1 ",3994.110107,0.000917 - 1,1,1657041651,40000,"P1 ",3994.354492,0.000978 - 1,1,1657041651,80000,"P1 ",3994.231689,0.000795 - 1,1,1657041651,120000,"P1 ",3995.453857,0.001191 - 1,1,1657041651,160000,"P1 ",3994.109619,0.000795 - 1,1,1657041651,200000,"P1 ",3994.293213,0.000947 - 1,1,1657041651,240000,"P1 ",3994.781982,0.001039 - 1,1,1657041651,280000,"P1 ",3996.126221,0.001390 - 1,1,1657041651,320000,"P1 ",3994.232178,0.000932 - 1,1,1657041651,360000,"P1 ",3995.026367,0.001130 - 1,1,1657041651,400000,"P1 ",3995.209473,0.001100 - 1,1,1657041651,440000,"P1 ",3994.048828,0.000886 - 1,1,1657041651,480000,"P1 ",3994.170654,0.000779 - 1,1,1657041651,520000,"P1 ",3994.292969,0.000825 - 1,1,1657041651,560000,"P1 ",3995.454102,0.001268 - 1,1,1657041651,600000,"P1 ",3994.170654,0.000810 - 1,1,1657041651,640000,"P1 ",3994.292969,0.000856 - 1,1,1657041651,680000,"P1 ",3994.354004,0.000871 - 1,1,1657041651,720000,"P1 ",3995.454346,0.001314 - 1,1,1657041651,760000,"P1 ",3994.537354,0.000947 - 1,1,1657041651,800000,"P1 ",3995.209473,0.001100 - 1,1,1657041651,840000,"P1 ",3995.026855,0.001207 - 1,1,1657041651,880000,"P1 ",3994.476562,0.000993 - 1,1,1657041651,920000,"P1 ",3995.209473,0.001130 - 1,1,1657041651,960000,"P1 ",3994.598877,0.001039 - 1,1,1657041652,0,"P1 ",3994.904541,0.001161 - 1,1,1657041652,40000,"P1 ",3994.170654,0.000779 - 1,1,1657041652,80000,"P1 ",3995.820557,0.001329 - 1,1,1657041652,120000,"P1 ",3994.049072,0.000932 - 1,1,1657041652,160000,"P1 ",3994.048828,0.000856 - 1,1,1657041652,200000,"P1 ",3995.270752,0.001161 - 1,1,1657041652,240000,"P1 ",3994.721191,0.001085 - 1,1,1657041652,280000,"P1 ",3995.881348,0.001268 - 1,1,1657041652,320000,"P1 ",3994.721191,0.001131 - 1,1,1657041652,360000,"P1 ",3995.332031,0.001268 - 1,1,1657041652,400000,"P1 ",3995.759521,0.001314 - 1,1,1657041652,440000,"P1 ",3994.904053,0.001039 - 1,1,1657041652,480000,"P1 ",3995.698730,0.001344 - 1,1,1657041652,520000,"P1 ",3995.148926,0.001222 - 1,1,1657041652,560000,"P1 ",3994.293457,0.000993 - 1,1,1657041652,600000,"P1 ",3996.126221,0.001390 - 1,1,1657041652,640000,"P1 ",3995.942627,0.001298 - 1,1,1657041652,680000,"P1 ",3995.881348,0.001268 - 1,1,1657041652,720000,"P1 ",3995.514893,0.001207 - 1,1,1657041652,760000,"P1 ",3993.926514,0.000810 - 1,1,1657041652,800000,"P1 ",3993.926758,0.000840 - 1,1,1657041652,840000,"P1 ",3995.331299,0.001130 - 1,1,1657041652,880000,"P1 ",3995.209717,0.001161 - 1,1,1657041652,920000,"P1 ",3995.271240,0.001283 - 1,1,1657041652,960000,"P1 ",3994.354492,0.000978 - 1,1,1657041653,0,"P1 ",3994.843262,0.001115 - 1,1,1657041653,40000,"P1 ",3995.331787,0.001222 - 1,1,1657041653,80000,"P1 ",3996.125977,0.001375 - 1,1,1657041653,120000,"P1 ",3994.599121,0.001115 - 1,1,1657041653,160000,"P1 ",3995.209961,0.001207 - 1,1,1657041653,200000,"P1 ",3995.697998,0.001207 - 1,1,1657041653,240000,"P1 ",3995.820312,0.001237 - 1,1,1657041653,280000,"P1 ",3995.942627,0.001329 - 1,1,1657041653,320000,"P1 ",3994.598877,0.001069 - 1,1,1657041653,360000,"P1 ",3993.926514,0.000810 - 1,1,1657041653,400000,"P1 ",3993.926758,0.000871 - 1,1,1657041653,440000,"P1 ",3996.125977,0.001344 - 1,1,1657041653,480000,"P1 ",3994.415527,0.001008 - 1,1,1657041653,520000,"P1 ",3994.904785,0.001207 - 1,1,1657041653,560000,"P1 ",3996.003662,0.001329 - 1,1,1657041653,600000,"P1 ",3994.537598,0.001008 - 1,1,1657041653,640000,"P1 ",3995.453613,0.001176 - 1,1,1657041653,680000,"P1 ",3995.331787,0.001222 - 1,1,1657041653,720000,"P1 ",3996.064697,0.001313 - 1,1,1657041653,760000,"P1 ",3995.942383,0.001252 - 1,1,1657041653,800000,"P1 ",3994.965332,0.001100 - 1,1,1657041653,840000,"P1 ",3995.576416,0.001329 - 1,1,1657041653,880000,"P1 ",3994.537354,0.000917 - 1,1,1657041653,920000,"P1 ",3995.270996,0.001191 - 1,1,1657041653,960000,"P1 ",3995.637207,0.001252 - 1,1,1657041654,0,"P1 ",3995.942627,0.001298 - 1,1,1657041654,40000,"P1 ",3995.759033,0.001222 - 1,1,1657041654,80000,"P1 ",3994.720703,0.000978 - 1,1,1657041654,120000,"P1 ",3995.271240,0.001283 - 1,1,1657041654,160000,"P1 ",3994.048828,0.000856 - 1,1,1657041654,200000,"P1 ",3995.087646,0.001161 - 1,1,1657041654,240000,"P1 ",3994.720703,0.000978 - 1,1,1657041654,280000,"P1 ",3995.026855,0.001207 - 1,1,1657041654,320000,"P1 ",3994.170898,0.000840 - 1,1,1657041654,360000,"P1 ",3994.904541,0.001161 - 1,1,1657041654,400000,"P1 ",3995.637695,0.001344 - 1,1,1657041654,440000,"P1 ",3995.698242,0.001237 - 1,1,1657041654,480000,"P1 ",3994.721191,0.001085 - 1,1,1657041654,520000,"P1 ",3994.781982,0.001039 - 1,1,1657041654,560000,"P1 ",3994.599121,0.001115 - 1,1,1657041654,600000,"P1 ",3995.515381,0.001298 - 1,1,1657041654,640000,"P1 ",3994.904541,0.001161 - 1,1,1657041654,680000,"P1 ",3995.148926,0.001222 - 1,1,1657041654,720000,"P1 ",3995.454102,0.001237 - 1,1,1657041654,760000,"P1 ",3994.415527,0.001008 - 1,1,1657041654,800000,"P1 ",3994.354736,0.001054 - 1,1,1657041654,840000,"P1 ",3994.231934,0.000825 - 1,1,1657041654,880000,"P1 ",3995.698486,0.001329 - 1,1,1657041654,920000,"P1 ",3995.575928,0.001191 - 1,1,1657041654,960000,"P1 ",3994.354004,0.000886 - 1,1,1657041655,0,"P1 ",3995.270508,0.001115 - 1,1,1657041655,40000,"P1 ",3995.821045,0.001390 - 1,1,1657041655,80000,"P1 ",3995.698242,0.001283 - 1,1,1657041655,120000,"P1 ",3994.232422,0.001008 - 1,1,1657041655,160000,"P1 ",3994.415283,0.000901 - 1,1,1657041655,200000,"P1 ",3995.087891,0.001207 - 1,1,1657041655,240000,"P1 ",3994.110107,0.000947 - 1,1,1657041655,280000,"P1 ",3996.186768,0.001298 - 1,1,1657041655,320000,"P1 ",3995.026611,0.001176 - 1,1,1657041655,360000,"P1 ",3995.453857,0.001222 - 1,1,1657041655,400000,"P1 ",3995.209473,0.001100 - 1,1,1657041655,440000,"P1 ",3995.698486,0.001329 - 1,1,1657041655,480000,"P1 ",3994.476562,0.000963 - 1,1,1657041655,520000,"P1 ",3994.720703,0.001008 - 1,1,1657041655,560000,"P1 ",3995.209473,0.001130 - 1,1,1657041655,600000,"P1 ",3994.049072,0.000932 - 1,1,1657041655,640000,"P1 ",3995.698242,0.001237 - 1,1,1657041655,680000,"P1 ",3995.943115,0.001390 - 1,1,1657041655,720000,"P1 ",3995.332031,0.001268 - 1,1,1657041655,760000,"P1 ",3995.942383,0.001252 - 1,1,1657041655,800000,"P1 ",3994.781982,0.001039 - 1,1,1657041655,840000,"P1 ",3995.759521,0.001298 - 1,1,1657041655,880000,"P1 ",3994.598633,0.000978 - 1,1,1657041655,920000,"P1 ",3995.453613,0.001146 - 1,1,1657041655,960000,"P1 ",3995.148682,0.001176 - 1,1,1657041656,0,"P1 ",3995.576416,0.001329 - 1,1,1657041656,40000,"P1 ",3995.820312,0.001283 - 1,1,1657041656,80000,"P1 ",3995.637451,0.001314 - 1,1,1657041656,120000,"P1 ",3995.942383,0.001252 - 1,1,1657041656,160000,"P1 ",3994.538086,0.001100 - 1,1,1657041656,200000,"P1 ",3994.782227,0.001115 - 1,1,1657041656,240000,"P1 ",3994.659668,0.000963 - 1,1,1657041656,280000,"P1 ",3994.170898,0.000871 - 1,1,1657041656,320000,"P1 ",3995.454346,0.001314 - 1,1,1657041656,360000,"P1 ",3995.698242,0.001237 - 1,1,1657041656,400000,"P1 ",3994.598633,0.001008 - 1,1,1657041656,440000,"P1 ",3995.759033,0.001222 - 1,1,1657041656,480000,"P1 ",3994.109863,0.000886 - 1,1,1657041656,520000,"P1 ",3995.698242,0.001283 - 1,1,1657041656,560000,"P1 ",3994.171387,0.000978 - 1,1,1657041656,600000,"P1 ",3995.820312,0.001252 - 1,1,1657041656,640000,"P1 ",3994.231934,0.000871 - 1,1,1657041656,680000,"P1 ",3994.293213,0.000947 - 1,1,1657041656,720000,"P1 ",3996.065186,0.001405 - 1,1,1657041656,760000,"P1 ",3994.354248,0.000947 - 1,1,1657041656,800000,"P1 ",3994.659668,0.000993 - 1,1,1657041656,840000,"P1 ",3995.942627,0.001329 - 1,1,1657041656,880000,"P1 ",3994.476562,0.000993 - 1,1,1657041656,920000,"P1 ",3995.454102,0.001268 - 1,1,1657041656,960000,"P1 ",3994.781982,0.001039 - 1,1,1657041657,0,"P1 ",3995.514648,0.001161 - 1,1,1657041657,40000,"P1 ",3996.065186,0.001405 - 1,1,1657041657,80000,"P1 ",3994.232178,0.000932 - 1,1,1657041657,120000,"P1 ",3995.942627,0.001298 - 1,1,1657041657,160000,"P1 ",3995.270996,0.001191 - 1,1,1657041657,200000,"P1 ",3994.781982,0.001069 - 1,1,1657041657,240000,"P1 ",3995.575928,0.001222 - 1,1,1657041657,280000,"P1 ",3995.454346,0.001314 - 1,1,1657041657,320000,"P1 ",3994.659424,0.000947 - 1,1,1657041657,360000,"P1 ",3994.415283,0.000932 - 1,1,1657041657,400000,"P1 ",3994.110107,0.000947 - 1,1,1657041657,440000,"P1 ",3996.308838,0.001313 - 1,1,1657041657,480000,"P1 ",3995.881836,0.001375 - 1,1,1657041657,520000,"P1 ",3995.088135,0.001237 - 1,1,1657041657,560000,"P1 ",3995.210205,0.001253 - 1,1,1657041657,600000,"P1 ",3995.087891,0.001207 - 1,1,1657041657,640000,"P1 ",3995.209473,0.001100 - 1,1,1657041657,680000,"P1 ",3994.110107,0.000947 - 1,1,1657041657,720000,"P1 ",3994.537354,0.000947 - 1,1,1657041657,760000,"P1 ",3995.026855,0.001207 - 1,1,1657041657,800000,"P1 ",3995.576172,0.001237 - 1,1,1657041657,840000,"P1 ",3995.697998,0.001207 - 1,1,1657041657,880000,"P1 ",3994.660400,0.001146 - 1,1,1657041657,920000,"P1 ",3995.393066,0.001237 - 1,1,1657041657,960000,"P1 ",3994.171143,0.000947 - 1,1,1657041658,0,"P1 ",3996.003906,0.001359 - 1,1,1657041658,40000,"P1 ",3995.698242,0.001283 - 1,1,1657041658,80000,"P1 ",3995.881836,0.001375 - 1,1,1657041658,120000,"P1 ",3994.048828,0.000886 - 1,1,1657041658,160000,"P1 ",3994.232422,0.000978 - 1,1,1657041658,200000,"P1 ",3994.720703,0.001008 - 1,1,1657041658,240000,"P1 ",3995.515137,0.001253 - 1,1,1657041658,280000,"P1 ",3995.209961,0.001207 - 1,1,1657041658,320000,"P1 ",3993.926514,0.000810 - 1,1,1657041658,360000,"P1 ",3994.598633,0.000978 - 1,1,1657041658,400000,"P1 ",3995.881348,0.001268 - 1,1,1657041658,440000,"P1 ",3995.392822,0.001207 - 1,1,1657041658,480000,"P1 ",3994.415283,0.000932 - 1,1,1657041658,520000,"P1 ",3994.170898,0.000871 - 1,1,1657041658,560000,"P1 ",3993.927002,0.000917 - 1,1,1657041658,600000,"P1 ",3994.598389,0.000932 - 1,1,1657041658,640000,"P1 ",3994.476318,0.000932 - 1,1,1657041658,680000,"P1 ",3995.698486,0.001329 - 1,1,1657041658,720000,"P1 ",3995.575928,0.001191 - 1,1,1657041658,760000,"P1 ",3994.965332,0.001100 - 1,1,1657041658,800000,"P1 ",3994.660156,0.001100 - 1,1,1657041658,840000,"P1 ",3995.881348,0.001268 - 1,1,1657041658,880000,"P1 ",3995.087646,0.001161 - 1,1,1657041658,920000,"P1 ",3993.865723,0.000825 - 1,1,1657041658,960000,"P1 ",3994.537354,0.000947 - 1,1,1657041659,0,"P1 ",3994.109863,0.000886 - 1,1,1657041659,40000,"P1 ",3994.354248,0.000947 - 1,1,1657041659,80000,"P1 ",3995.393311,0.001298 - 1,1,1657041659,120000,"P1 ",3994.965088,0.001039 - 1,1,1657041659,160000,"P1 ",3994.476318,0.000917 - 1,1,1657041659,200000,"P1 ",3994.537842,0.001054 - 1,1,1657041659,240000,"P1 ",3995.759277,0.001268 - 1,1,1657041659,280000,"P1 ",3995.942627,0.001298 - 1,1,1657041659,320000,"P1 ",3996.248047,0.001344 - 1,1,1657041659,360000,"P1 ",3994.598877,0.001039 - 1,1,1657041659,400000,"P1 ",3994.781982,0.001039 - 1,1,1657041659,440000,"P1 ",3993.987549,0.000810 - 1,1,1657041659,480000,"P1 ",3995.026367,0.001100 - 1,1,1657041659,520000,"P1 ",3996.247803,0.001329 - 1,1,1657041659,560000,"P1 ",3995.515381,0.001298 - 1,1,1657041659,600000,"P1 ",3994.904053,0.001039 - 1,1,1657041659,640000,"P1 ",3993.865723,0.000886 - 1,1,1657041659,680000,"P1 ",3995.881836,0.001375 - 1,1,1657041659,720000,"P1 ",3995.881836,0.001375 - 1,1,1657041659,760000,"P1 ",3996.125732,0.001329 - 1,1,1657041659,800000,"P1 ",3994.781982,0.001039 - 1,1,1657041659,840000,"P1 ",3995.759521,0.001314 - 1,1,1657041659,880000,"P1 ",3995.026367,0.001130 - 1,1,1657041659,920000,"P1 ",3994.476562,0.000963 - 1,1,1657041659,960000,"P1 ",3993.987793,0.000871 - 1,1,1657041660,0,"P1 ",3995.515137,0.001253 - 1,1,1657041660,40000,"P1 ",3995.576172,0.001237 - 1,1,1657041660,80000,"P1 ",3994.171143,0.000902 - 1,1,1657041660,120000,"P1 ",3995.881592,0.001313 - 1,1,1657041660,160000,"P1 ",3996.125732,0.001329 - 1,1,1657041660,200000,"P1 ",3995.759521,0.001314 - 1,1,1657041660,240000,"P1 ",3994.843506,0.001146 - 1,1,1657041660,280000,"P1 ",3995.453613,0.001146 - 1,1,1657041660,320000,"P1 ",3994.170898,0.000840 - 1,1,1657041660,360000,"P1 ",3995.943115,0.001405 - 1,1,1657041660,400000,"P1 ",3993.865723,0.000825 - 1,1,1657041660,440000,"P1 ",3994.599121,0.001115 - 1,1,1657041660,480000,"P1 ",3995.087402,0.001115 - 1,1,1657041660,520000,"P1 ",3995.943115,0.001390 - 1,1,1657041660,560000,"P1 ",3996.125977,0.001344 - 1,1,1657041660,600000,"P1 ",3994.110107,0.000947 - 1,1,1657041660,640000,"P1 ",3994.170654,0.000779 - 1,1,1657041660,680000,"P1 ",3994.782471,0.001146 - 1,1,1657041660,720000,"P1 ",3994.599121,0.001115 - 1,1,1657041660,760000,"P1 ",3995.698242,0.001237 - 1,1,1657041660,800000,"P1 ",3995.026855,0.001222 - 1,1,1657041660,840000,"P1 ",3994.415771,0.001039 - 1,1,1657041660,880000,"P1 ",3994.415771,0.001070 - 1,1,1657041660,920000,"P1 ",3995.759766,0.001375 - 1,1,1657041660,960000,"P1 ",3994.965576,0.001146 - 1,1,1657041661,0,"P1 ",3995.759033,0.001222 - 1,1,1657041661,40000,"P1 ",3995.637451,0.001298 - 1,1,1657041661,80000,"P1 ",3995.332031,0.001268 - 1,1,1657041661,120000,"P1 ",3994.476807,0.001039 - 1,1,1657041661,160000,"P1 ",3996.003906,0.001375 - 1,1,1657041661,200000,"P1 ",3994.537598,0.001008 - 1,1,1657041661,240000,"P1 ",3995.881348,0.001283 - 1,1,1657041661,280000,"P1 ",3995.392578,0.001161 - 1,1,1657041661,320000,"P1 ",3994.599121,0.001115 - 1,1,1657041661,360000,"P1 ",3994.292969,0.000886 - 1,1,1657041661,400000,"P1 ",3995.636963,0.001222 - 1,1,1657041661,440000,"P1 ",3994.659668,0.000993 - 1,1,1657041661,480000,"P1 ",3995.332031,0.001253 - 1,1,1657041661,520000,"P1 ",3994.782471,0.001146 - 1,1,1657041661,560000,"P1 ",3994.048828,0.000856 - 1,1,1657041661,600000,"P1 ",3995.392822,0.001207 - 1,1,1657041661,640000,"P1 ",3994.659668,0.000993 - 1,1,1657041661,680000,"P1 ",3994.965332,0.001100 - 1,1,1657041661,720000,"P1 ",3994.354492,0.000978 - 1,1,1657041661,760000,"P1 ",3995.270508,0.001115 - 1,1,1657041661,800000,"P1 ",3994.781982,0.001069 - 1,1,1657041661,840000,"P1 ",3994.109619,0.000795 - 1,1,1657041661,880000,"P1 ",3995.149170,0.001237 - 1,1,1657041661,920000,"P1 ",3995.576416,0.001329 - 1,1,1657041661,960000,"P1 ",3996.126221,0.001390 - 1,1,1657041662,0,"P1 ",3995.575928,0.001191 - 1,1,1657041662,40000,"P1 ",3994.170898,0.000840 - 1,1,1657041662,80000,"P1 ",3995.515137,0.001253 - 1,1,1657041662,120000,"P1 ",3995.209473,0.001130 - 1,1,1657041662,160000,"P1 ",3994.476074,0.000886 - 1,1,1657041662,200000,"P1 ",3995.393311,0.001298 - 1,1,1657041662,240000,"P1 ",3996.125977,0.001344 - 1,1,1657041662,280000,"P1 ",3994.843018,0.001024 - 1,1,1657041662,320000,"P1 ",3994.415771,0.001070 - 1,1,1657041662,360000,"P1 ",3994.415039,0.000871 - 1,1,1657041662,400000,"P1 ",3995.454102,0.001268 - 1,1,1657041662,440000,"P1 ",3993.926514,0.000810 - 1,1,1657041662,480000,"P1 ",3995.209473,0.001100 - 1,1,1657041662,520000,"P1 ",3994.598389,0.000932 - 1,1,1657041662,560000,"P1 ",3995.209473,0.001130 - 1,1,1657041662,600000,"P1 ",3996.004395,0.001420 - 1,1,1657041662,640000,"P1 ",3994.415283,0.000901 - 1,1,1657041662,680000,"P1 ",3995.087891,0.001207 - 1,1,1657041662,720000,"P1 ",3995.087891,0.001207 - 1,1,1657041662,760000,"P1 ",3994.537354,0.000947 - 1,1,1657041662,800000,"P1 ",3995.270996,0.001191 - 1,1,1657041662,840000,"P1 ",3994.660400,0.001146 - 1,1,1657041662,880000,"P1 ",3994.231934,0.000825 - 1,1,1657041662,920000,"P1 ",3994.476318,0.000932 - 1,1,1657041662,960000,"P1 ",3994.171143,0.000947 - 1,1,1657041663,0,"P1 ",3994.231934,0.000871 - 1,1,1657041663,40000,"P1 ",3994.232178,0.000901 - 1,1,1657041663,80000,"P1 ",3994.659668,0.000993 - 1,1,1657041663,120000,"P1 ",3994.537598,0.001008 - 1,1,1657041663,160000,"P1 ",3994.293457,0.000993 - 1,1,1657041663,200000,"P1 ",3994.415771,0.001039 - 1,1,1657041663,240000,"P1 ",3994.476807,0.001039 - 1,1,1657041663,280000,"P1 ",3994.659424,0.000947 - 1,1,1657041663,320000,"P1 ",3994.415527,0.001008 - 1,1,1657041663,360000,"P1 ",3995.270752,0.001161 - 1,1,1657041663,400000,"P1 ",3994.598389,0.000932 - 1,1,1657041663,440000,"P1 ",3994.109619,0.000795 - 1,1,1657041663,480000,"P1 ",3995.576416,0.001329 - 1,1,1657041663,520000,"P1 ",3995.209717,0.001161 - 1,1,1657041663,560000,"P1 ",3994.904541,0.001161 - 1,1,1657041663,600000,"P1 ",3996.125977,0.001375 - 1,1,1657041663,640000,"P1 ",3996.065186,0.001405 - 1,1,1657041663,680000,"P1 ",3995.026367,0.001130 - 1,1,1657041663,720000,"P1 ",3995.576172,0.001268 - 1,1,1657041663,760000,"P1 ",3995.271240,0.001237 - 1,1,1657041663,800000,"P1 ",3994.659912,0.001024 - 1,1,1657041663,840000,"P1 ",3995.942383,0.001252 - 1,1,1657041663,880000,"P1 ",3994.965820,0.001192 - 1,1,1657041663,920000,"P1 ",3994.049072,0.000932 - 1,1,1657041663,960000,"P1 ",3995.881836,0.001375 - 1,1,1657041664,0,"P1 ",3994.415527,0.000963 - 1,1,1657041664,40000,"P1 ",3995.087402,0.001085 - 1,1,1657041664,80000,"P1 ",3994.354248,0.000917 - 1,1,1657041664,120000,"P1 ",3994.110352,0.000963 - 1,1,1657041664,160000,"P1 ",3994.843262,0.001100 - 1,1,1657041664,200000,"P1 ",3994.904541,0.001176 - 1,1,1657041664,240000,"P1 ",3994.843506,0.001146 - 1,1,1657041664,280000,"P1 ",3995.820312,0.001237 - 1,1,1657041664,320000,"P1 ",3995.698242,0.001237 - 1,1,1657041664,360000,"P1 ",3993.804688,0.000825 - 1,1,1657041664,400000,"P1 ",3995.942383,0.001252 - 1,1,1657041664,440000,"P1 ",3995.576416,0.001329 - 1,1,1657041664,480000,"P1 ",3995.942383,0.001252 - 1,1,1657041664,520000,"P1 ",3996.247803,0.001329 - 1,1,1657041664,560000,"P1 ",3995.515381,0.001298 - 1,1,1657041664,600000,"P1 ",3995.637695,0.001344 - 1,1,1657041664,640000,"P1 ",3993.865723,0.000856 - 1,1,1657041664,680000,"P1 ",3994.292969,0.000856 - 1,1,1657041664,720000,"P1 ",3994.354004,0.000886 - 1,1,1657041664,760000,"P1 ",3993.743652,0.000840 - 1,1,1657041664,800000,"P1 ",3996.247803,0.001329 - 1,1,1657041664,840000,"P1 ",3994.415527,0.001008 - 1,1,1657041664,880000,"P1 ",3994.232422,0.001008 - 1,1,1657041664,920000,"P1 ",3994.476807,0.001070 - 1,1,1657041664,960000,"P1 ",3995.454102,0.001268 - 1,1,1657041665,0,"P1 ",3994.109619,0.000795 - 1,1,1657041665,40000,"P1 ",3994.232178,0.000932 - 1,1,1657041665,80000,"P1 ",3994.048828,0.000825 - 1,1,1657041665,120000,"P1 ",3994.721191,0.001131 - 1,1,1657041665,160000,"P1 ",3995.209473,0.001130 - 1,1,1657041665,200000,"P1 ",3995.270752,0.001161 - 1,1,1657041665,240000,"P1 ",3995.637451,0.001314 - 1,1,1657041665,280000,"P1 ",3995.514893,0.001207 - 1,1,1657041665,320000,"P1 ",3995.698242,0.001237 - 1,1,1657041665,360000,"P1 ",3995.332031,0.001268 - 1,1,1657041665,400000,"P1 ",3994.782471,0.001161 - 1,1,1657041665,440000,"P1 ",3995.942627,0.001329 - 1,1,1657041665,480000,"P1 ",3993.865723,0.000886 - 1,1,1657041665,520000,"P1 ",3995.026367,0.001100 - 1,1,1657041665,560000,"P1 ",3994.843506,0.001146 - 1,1,1657041665,600000,"P1 ",3995.942383,0.001252 - 1,1,1657041665,640000,"P1 ",3995.088135,0.001237 - 1,1,1657041665,680000,"P1 ",3995.576172,0.001237 - 1,1,1657041665,720000,"P1 ",3995.148682,0.001146 - 1,1,1657041665,760000,"P1 ",3995.087158,0.001069 - 1,1,1657041665,800000,"P1 ",3995.942627,0.001329 - 1,1,1657041665,840000,"P1 ",3995.943115,0.001405 - 1,1,1657041665,880000,"P1 ",3995.148926,0.001222 - 1,1,1657041665,920000,"P1 ",3995.820312,0.001283 - 1,1,1657041665,960000,"P1 ",3995.331543,0.001146 - 1,1,1657041666,0,"P1 ",3995.148926,0.001192 - 1,1,1657041666,40000,"P1 ",3994.354004,0.000840 - 1,1,1657041666,80000,"P1 ",3994.660400,0.001146 - 1,1,1657041666,120000,"P1 ",3994.354004,0.000871 - 1,1,1657041666,160000,"P1 ",3995.209717,0.001161 - 1,1,1657041666,200000,"P1 ",3994.170898,0.000840 - 1,1,1657041666,240000,"P1 ",3994.781738,0.001008 - 1,1,1657041666,280000,"P1 ",3995.148926,0.001222 - 1,1,1657041666,320000,"P1 ",3994.110352,0.000963 - 1,1,1657041666,360000,"P1 ",3995.576416,0.001329 - 1,1,1657041666,400000,"P1 ",3995.698242,0.001283 - 1,1,1657041666,440000,"P1 ",3994.720703,0.000978 - 1,1,1657041666,480000,"P1 ",3995.821045,0.001390 - 1,1,1657041666,520000,"P1 ",3995.148682,0.001176 - 1,1,1657041666,560000,"P1 ",3994.660156,0.001100 - 1,1,1657041666,600000,"P1 ",3995.881348,0.001283 - 1,1,1657041666,640000,"P1 ",3994.476074,0.000886 - 1,1,1657041666,680000,"P1 ",3995.698242,0.001283 - 1,1,1657041666,720000,"P1 ",3994.659912,0.001024 diff --git a/DBServer/RECEIVED_FRAME_TIME.txt b/DBServer/RECEIVED_FRAME_TIME.txt deleted file mode 100644 index 253f7be..0000000 --- a/DBServer/RECEIVED_FRAME_TIME.txt +++ /dev/null @@ -1,398 +0,0 @@ - 1,1,1657041650,880000,1657041650,880385,385 - 1,1,1657041650,920000,1657041650,920803,803 - 1,1,1657041650,960000,1657041650,961026,1026 - 1,1,1657041651,0,1657041651,1038,1038 - 1,1,1657041651,40000,1657041651,40772,772 - 1,1,1657041651,80000,1657041651,80650,650 - 1,1,1657041651,120000,1657041651,120590,590 - 1,1,1657041651,160000,1657041651,160639,639 - 1,1,1657041651,200000,1657041651,200644,644 - 1,1,1657041651,240000,1657041651,240673,673 - 1,1,1657041651,280000,1657041651,280682,682 - 1,1,1657041651,320000,1657041651,320720,720 - 1,1,1657041651,360000,1657041651,360638,638 - 1,1,1657041651,400000,1657041651,400630,630 - 1,1,1657041651,440000,1657041651,440695,695 - 1,1,1657041651,480000,1657041651,480704,704 - 1,1,1657041651,520000,1657041651,520670,670 - 1,1,1657041651,560000,1657041651,561026,1026 - 1,1,1657041651,600000,1657041651,601031,1031 - 1,1,1657041651,640000,1657041651,640596,596 - 1,1,1657041651,680000,1657041651,680637,637 - 1,1,1657041651,720000,1657041651,720672,672 - 1,1,1657041651,760000,1657041651,760687,687 - 1,1,1657041651,800000,1657041651,800702,702 - 1,1,1657041651,840000,1657041651,840667,667 - 1,1,1657041651,880000,1657041651,880593,593 - 1,1,1657041651,920000,1657041651,920727,727 - 1,1,1657041651,960000,1657041651,960833,833 - 1,1,1657041652,0,1657041652,652,652 - 1,1,1657041652,40000,1657041652,40957,957 - 1,1,1657041652,80000,1657041652,81033,1033 - 1,1,1657041652,120000,1657041652,121162,1162 - 1,1,1657041652,160000,1657041652,161194,1194 - 1,1,1657041652,200000,1657041652,200802,802 - 1,1,1657041652,240000,1657041652,240728,728 - 1,1,1657041652,280000,1657041652,280980,980 - 1,1,1657041652,320000,1657041652,321182,1182 - 1,1,1657041652,360000,1657041652,360960,960 - 1,1,1657041652,400000,1657041652,401137,1137 - 1,1,1657041652,440000,1657041652,440841,841 - 1,1,1657041652,480000,1657041652,481201,1201 - 1,1,1657041652,520000,1657041652,520792,792 - 1,1,1657041652,560000,1657041652,560853,853 - 1,1,1657041652,600000,1657041652,600959,959 - 1,1,1657041652,640000,1657041652,641064,1064 - 1,1,1657041652,680000,1657041652,680774,774 - 1,1,1657041652,720000,1657041652,720885,885 - 1,1,1657041652,760000,1657041652,760959,959 - 1,1,1657041652,800000,1657041652,800960,960 - 1,1,1657041652,840000,1657041652,841134,1134 - 1,1,1657041652,880000,1657041652,880842,842 - 1,1,1657041652,920000,1657041652,920964,964 - 1,1,1657041652,960000,1657041652,960970,970 - 1,1,1657041653,0,1657041653,1038,1038 - 1,1,1657041653,40000,1657041653,40969,969 - 1,1,1657041653,80000,1657041653,80964,964 - 1,1,1657041653,120000,1657041653,121187,1187 - 1,1,1657041653,160000,1657041653,160868,868 - 1,1,1657041653,200000,1657041653,200809,809 - 1,1,1657041653,240000,1657041653,240864,864 - 1,1,1657041653,280000,1657041653,280839,839 - 1,1,1657041653,320000,1657041653,320952,952 - 1,1,1657041653,360000,1657041653,361174,1174 - 1,1,1657041653,400000,1657041653,401188,1188 - 1,1,1657041653,440000,1657041653,440963,963 - 1,1,1657041653,480000,1657041653,481136,1136 - 1,1,1657041653,520000,1657041653,521185,1185 - 1,1,1657041653,560000,1657041653,560974,974 - 1,1,1657041653,600000,1657041653,601049,1049 - 1,1,1657041653,640000,1657041653,640935,935 - 1,1,1657041653,680000,1657041653,680718,718 - 1,1,1657041653,720000,1657041653,720961,961 - 1,1,1657041653,760000,1657041653,761141,1141 - 1,1,1657041653,800000,1657041653,801150,1150 - 1,1,1657041653,840000,1657041653,840964,964 - 1,1,1657041653,880000,1657041653,881141,1141 - 1,1,1657041653,920000,1657041653,921137,1137 - 1,1,1657041653,960000,1657041653,961005,1005 - 1,1,1657041654,0,1657041654,977,977 - 1,1,1657041654,40000,1657041654,40984,984 - 1,1,1657041654,80000,1657041654,81131,1131 - 1,1,1657041654,120000,1657041654,121132,1132 - 1,1,1657041654,160000,1657041654,161108,1108 - 1,1,1657041654,200000,1657041654,200798,798 - 1,1,1657041654,240000,1657041654,240944,944 - 1,1,1657041654,280000,1657041654,280989,989 - 1,1,1657041654,320000,1657041654,321120,1120 - 1,1,1657041654,360000,1657041654,360972,972 - 1,1,1657041654,400000,1657041654,401186,1186 - 1,1,1657041654,440000,1657041654,440974,974 - 1,1,1657041654,480000,1657041654,481186,1186 - 1,1,1657041654,520000,1657041654,521150,1150 - 1,1,1657041654,560000,1657041654,560986,986 - 1,1,1657041654,600000,1657041654,600965,965 - 1,1,1657041654,640000,1657041654,640962,962 - 1,1,1657041654,680000,1657041654,680721,721 - 1,1,1657041654,720000,1657041654,721120,1120 - 1,1,1657041654,760000,1657041654,761143,1143 - 1,1,1657041654,800000,1657041654,800993,993 - 1,1,1657041654,840000,1657041654,840810,810 - 1,1,1657041654,880000,1657041654,881183,1183 - 1,1,1657041654,920000,1657041654,921149,1149 - 1,1,1657041654,960000,1657041654,961146,1146 - 1,1,1657041655,0,1657041655,1048,1048 - 1,1,1657041655,40000,1657041655,40746,746 - 1,1,1657041655,80000,1657041655,81134,1134 - 1,1,1657041655,120000,1657041655,120852,852 - 1,1,1657041655,160000,1657041655,160962,962 - 1,1,1657041655,200000,1657041655,200753,753 - 1,1,1657041655,240000,1657041655,240639,639 - 1,1,1657041655,280000,1657041655,281009,1009 - 1,1,1657041655,320000,1657041655,321146,1146 - 1,1,1657041655,360000,1657041655,361160,1160 - 1,1,1657041655,400000,1657041655,400766,766 - 1,1,1657041655,440000,1657041655,440653,653 - 1,1,1657041655,480000,1657041655,480615,615 - 1,1,1657041655,520000,1657041655,520699,699 - 1,1,1657041655,560000,1657041655,560692,692 - 1,1,1657041655,600000,1657041655,600677,677 - 1,1,1657041655,640000,1657041655,640642,642 - 1,1,1657041655,680000,1657041655,680635,635 - 1,1,1657041655,720000,1657041655,720664,664 - 1,1,1657041655,760000,1657041655,760956,956 - 1,1,1657041655,800000,1657041655,800962,962 - 1,1,1657041655,840000,1657041655,840810,810 - 1,1,1657041655,880000,1657041655,880904,904 - 1,1,1657041655,920000,1657041655,920825,825 - 1,1,1657041655,960000,1657041655,960958,958 - 1,1,1657041656,0,1657041656,1191,1191 - 1,1,1657041656,40000,1657041656,40931,931 - 1,1,1657041656,80000,1657041656,81052,1052 - 1,1,1657041656,120000,1657041656,121131,1131 - 1,1,1657041656,160000,1657041656,161208,1208 - 1,1,1657041656,200000,1657041656,200836,836 - 1,1,1657041656,240000,1657041656,240958,958 - 1,1,1657041656,280000,1657041656,280826,826 - 1,1,1657041656,320000,1657041656,320648,648 - 1,1,1657041656,360000,1657041656,360705,705 - 1,1,1657041656,400000,1657041656,400408,408 - 1,1,1657041656,440000,1657041656,440656,656 - 1,1,1657041656,480000,1657041656,480798,798 - 1,1,1657041656,520000,1657041656,521136,1136 - 1,1,1657041656,560000,1657041656,560936,936 - 1,1,1657041656,600000,1657041656,601144,1144 - 1,1,1657041656,640000,1657041656,640966,966 - 1,1,1657041656,680000,1657041656,680963,963 - 1,1,1657041656,720000,1657041656,721128,1128 - 1,1,1657041656,760000,1657041656,761148,1148 - 1,1,1657041656,800000,1657041656,800389,389 - 1,1,1657041656,840000,1657041656,840651,651 - 1,1,1657041656,880000,1657041656,880275,275 - 1,1,1657041656,920000,1657041656,920389,389 - 1,1,1657041656,960000,1657041656,960738,738 - 1,1,1657041657,0,1657041657,659,659 - 1,1,1657041657,40000,1657041657,40883,883 - 1,1,1657041657,80000,1657041657,80839,839 - 1,1,1657041657,120000,1657041657,121165,1165 - 1,1,1657041657,160000,1657041657,161154,1154 - 1,1,1657041657,200000,1657041657,200870,870 - 1,1,1657041657,240000,1657041657,240973,973 - 1,1,1657041657,280000,1657041657,280995,995 - 1,1,1657041657,320000,1657041657,321192,1192 - 1,1,1657041657,360000,1657041657,360991,991 - 1,1,1657041657,400000,1657041657,401144,1144 - 1,1,1657041657,440000,1657041657,441147,1147 - 1,1,1657041657,480000,1657041657,480838,838 - 1,1,1657041657,520000,1657041657,520786,786 - 1,1,1657041657,560000,1657041657,560806,806 - 1,1,1657041657,600000,1657041657,600789,789 - 1,1,1657041657,640000,1657041657,640775,775 - 1,1,1657041657,680000,1657041657,680696,696 - 1,1,1657041657,720000,1657041657,720840,840 - 1,1,1657041657,760000,1657041657,761080,1080 - 1,1,1657041657,800000,1657041657,800828,828 - 1,1,1657041657,840000,1657041657,841151,1151 - 1,1,1657041657,880000,1657041657,881149,1149 - 1,1,1657041657,920000,1657041657,921155,1155 - 1,1,1657041657,960000,1657041657,961143,1143 - 1,1,1657041658,0,1657041658,868,868 - 1,1,1657041658,40000,1657041658,40971,971 - 1,1,1657041658,80000,1657041658,81149,1149 - 1,1,1657041658,120000,1657041658,120856,856 - 1,1,1657041658,160000,1657041658,161162,1162 - 1,1,1657041658,200000,1657041658,200834,834 - 1,1,1657041658,240000,1657041658,240826,826 - 1,1,1657041658,280000,1657041658,280912,912 - 1,1,1657041658,320000,1657041658,321145,1145 - 1,1,1657041658,360000,1657041658,360844,844 - 1,1,1657041658,400000,1657041658,401149,1149 - 1,1,1657041658,440000,1657041658,441051,1051 - 1,1,1657041658,480000,1657041658,481204,1204 - 1,1,1657041658,520000,1657041658,521216,1216 - 1,1,1657041658,560000,1657041658,560808,808 - 1,1,1657041658,600000,1657041658,600804,804 - 1,1,1657041658,640000,1657041658,640370,370 - 1,1,1657041658,680000,1657041658,680646,646 - 1,1,1657041658,720000,1657041658,720546,546 - 1,1,1657041658,760000,1657041658,761027,1027 - 1,1,1657041658,800000,1657041658,800822,822 - 1,1,1657041658,840000,1657041658,841063,1063 - 1,1,1657041658,880000,1657041658,880979,979 - 1,1,1657041658,920000,1657041658,921140,1140 - 1,1,1657041658,960000,1657041658,961202,1202 - 1,1,1657041659,0,1657041659,820,820 - 1,1,1657041659,40000,1657041659,40704,704 - 1,1,1657041659,80000,1657041659,80883,883 - 1,1,1657041659,120000,1657041659,121132,1132 - 1,1,1657041659,160000,1657041659,161143,1143 - 1,1,1657041659,200000,1657041659,200780,780 - 1,1,1657041659,240000,1657041659,240976,976 - 1,1,1657041659,280000,1657041659,280807,807 - 1,1,1657041659,320000,1657041659,320951,951 - 1,1,1657041659,360000,1657041659,360856,856 - 1,1,1657041659,400000,1657041659,401203,1203 - 1,1,1657041659,440000,1657041659,441135,1135 - 1,1,1657041659,480000,1657041659,481162,1162 - 1,1,1657041659,520000,1657041659,521209,1209 - 1,1,1657041659,560000,1657041659,561206,1206 - 1,1,1657041659,600000,1657041659,601136,1136 - 1,1,1657041659,640000,1657041659,641151,1151 - 1,1,1657041659,680000,1657041659,680730,730 - 1,1,1657041659,720000,1657041659,720970,970 - 1,1,1657041659,760000,1657041659,760306,306 - 1,1,1657041659,800000,1657041659,800855,855 - 1,1,1657041659,840000,1657041659,841151,1151 - 1,1,1657041659,880000,1657041659,880984,984 - 1,1,1657041659,920000,1657041659,920387,387 - 1,1,1657041659,960000,1657041659,960683,683 - 1,1,1657041660,0,1657041660,743,743 - 1,1,1657041660,40000,1657041660,40747,747 - 1,1,1657041660,80000,1657041660,80827,827 - 1,1,1657041660,120000,1657041660,121158,1158 - 1,1,1657041660,160000,1657041660,161145,1145 - 1,1,1657041660,200000,1657041660,201156,1156 - 1,1,1657041660,240000,1657041660,240961,961 - 1,1,1657041660,280000,1657041660,280958,958 - 1,1,1657041660,320000,1657041660,321198,1198 - 1,1,1657041660,360000,1657041660,360963,963 - 1,1,1657041660,400000,1657041660,401186,1186 - 1,1,1657041660,440000,1657041660,440918,918 - 1,1,1657041660,480000,1657041660,481146,1146 - 1,1,1657041660,520000,1657041660,521191,1191 - 1,1,1657041660,560000,1657041660,561198,1198 - 1,1,1657041660,600000,1657041660,601194,1194 - 1,1,1657041660,640000,1657041660,641145,1145 - 1,1,1657041660,680000,1657041660,680684,684 - 1,1,1657041660,720000,1657041660,720986,986 - 1,1,1657041660,760000,1657041660,761144,1144 - 1,1,1657041660,800000,1657041660,801119,1119 - 1,1,1657041660,840000,1657041660,841151,1151 - 1,1,1657041660,880000,1657041660,881195,1195 - 1,1,1657041660,920000,1657041660,920763,763 - 1,1,1657041660,960000,1657041660,960735,735 - 1,1,1657041661,0,1657041661,664,664 - 1,1,1657041661,40000,1657041661,40638,638 - 1,1,1657041661,80000,1657041661,80728,728 - 1,1,1657041661,120000,1657041661,120825,825 - 1,1,1657041661,160000,1657041661,160890,890 - 1,1,1657041661,200000,1657041661,200878,878 - 1,1,1657041661,240000,1657041661,240803,803 - 1,1,1657041661,280000,1657041661,280803,803 - 1,1,1657041661,320000,1657041661,320821,821 - 1,1,1657041661,360000,1657041661,360838,838 - 1,1,1657041661,400000,1657041661,400890,890 - 1,1,1657041661,440000,1657041661,440881,881 - 1,1,1657041661,480000,1657041661,480866,866 - 1,1,1657041661,520000,1657041661,520843,843 - 1,1,1657041661,560000,1657041661,560996,996 - 1,1,1657041661,600000,1657041661,601163,1163 - 1,1,1657041661,640000,1657041661,641142,1142 - 1,1,1657041661,680000,1657041661,680666,666 - 1,1,1657041661,720000,1657041661,720995,995 - 1,1,1657041661,760000,1657041661,760998,998 - 1,1,1657041661,800000,1657041661,801157,1157 - 1,1,1657041661,840000,1657041661,841040,1040 - 1,1,1657041661,880000,1657041661,880983,983 - 1,1,1657041661,920000,1657041661,921031,1031 - 1,1,1657041661,960000,1657041661,960990,990 - 1,1,1657041662,0,1657041662,1143,1143 - 1,1,1657041662,40000,1657041662,40984,984 - 1,1,1657041662,80000,1657041662,81164,1164 - 1,1,1657041662,120000,1657041662,121214,1214 - 1,1,1657041662,160000,1657041662,160973,973 - 1,1,1657041662,200000,1657041662,200972,972 - 1,1,1657041662,240000,1657041662,240862,862 - 1,1,1657041662,280000,1657041662,280817,817 - 1,1,1657041662,320000,1657041662,320714,714 - 1,1,1657041662,360000,1657041662,360821,821 - 1,1,1657041662,400000,1657041662,401095,1095 - 1,1,1657041662,440000,1657041662,440818,818 - 1,1,1657041662,480000,1657041662,480686,686 - 1,1,1657041662,520000,1657041662,520701,701 - 1,1,1657041662,560000,1657041662,560681,681 - 1,1,1657041662,600000,1657041662,600722,722 - 1,1,1657041662,640000,1657041662,640665,665 - 1,1,1657041662,680000,1657041662,680683,683 - 1,1,1657041662,720000,1657041662,720939,939 - 1,1,1657041662,760000,1657041662,760830,830 - 1,1,1657041662,800000,1657041662,800991,991 - 1,1,1657041662,840000,1657041662,840978,978 - 1,1,1657041662,880000,1657041662,881002,1002 - 1,1,1657041662,920000,1657041662,921038,1038 - 1,1,1657041662,960000,1657041662,960898,898 - 1,1,1657041663,0,1657041663,357,357 - 1,1,1657041663,40000,1657041663,40703,703 - 1,1,1657041663,80000,1657041663,80270,270 - 1,1,1657041663,120000,1657041663,120535,535 - 1,1,1657041663,160000,1657041663,160692,692 - 1,1,1657041663,200000,1657041663,200764,764 - 1,1,1657041663,240000,1657041663,240976,976 - 1,1,1657041663,280000,1657041663,280938,938 - 1,1,1657041663,320000,1657041663,321126,1126 - 1,1,1657041663,360000,1657041663,360980,980 - 1,1,1657041663,400000,1657041663,400765,765 - 1,1,1657041663,440000,1657041663,440449,449 - 1,1,1657041663,480000,1657041663,480648,648 - 1,1,1657041663,520000,1657041663,520824,824 - 1,1,1657041663,560000,1657041663,560659,659 - 1,1,1657041663,600000,1657041663,600698,698 - 1,1,1657041663,640000,1657041663,640802,802 - 1,1,1657041663,680000,1657041663,680732,732 - 1,1,1657041663,720000,1657041663,720797,797 - 1,1,1657041663,760000,1657041663,760823,823 - 1,1,1657041663,800000,1657041663,800808,808 - 1,1,1657041663,840000,1657041663,840800,800 - 1,1,1657041663,880000,1657041663,880789,789 - 1,1,1657041663,920000,1657041663,920802,802 - 1,1,1657041663,960000,1657041663,960792,792 - 1,1,1657041664,0,1657041664,1150,1150 - 1,1,1657041664,40000,1657041664,40801,801 - 1,1,1657041664,80000,1657041664,80816,816 - 1,1,1657041664,120000,1657041664,120789,789 - 1,1,1657041664,160000,1657041664,160779,779 - 1,1,1657041664,200000,1657041664,200699,699 - 1,1,1657041664,240000,1657041664,240710,710 - 1,1,1657041664,280000,1657041664,280730,730 - 1,1,1657041664,320000,1657041664,320831,831 - 1,1,1657041664,360000,1657041664,360776,776 - 1,1,1657041664,400000,1657041664,401208,1208 - 1,1,1657041664,440000,1657041664,440926,926 - 1,1,1657041664,480000,1657041664,480795,795 - 1,1,1657041664,520000,1657041664,520811,811 - 1,1,1657041664,560000,1657041664,560791,791 - 1,1,1657041664,600000,1657041664,600811,811 - 1,1,1657041664,640000,1657041664,640777,777 - 1,1,1657041664,680000,1657041664,680699,699 - 1,1,1657041664,720000,1657041664,720779,779 - 1,1,1657041664,760000,1657041664,760778,778 - 1,1,1657041664,800000,1657041664,801143,1143 - 1,1,1657041664,840000,1657041664,840846,846 - 1,1,1657041664,880000,1657041664,880913,913 - 1,1,1657041664,920000,1657041664,920986,986 - 1,1,1657041664,960000,1657041664,961161,1161 - 1,1,1657041665,0,1657041665,1208,1208 - 1,1,1657041665,40000,1657041665,40982,982 - 1,1,1657041665,80000,1657041665,81198,1198 - 1,1,1657041665,120000,1657041665,121147,1147 - 1,1,1657041665,160000,1657041665,160979,979 - 1,1,1657041665,200000,1657041665,201050,1050 - 1,1,1657041665,240000,1657041665,240989,989 - 1,1,1657041665,280000,1657041665,280970,970 - 1,1,1657041665,320000,1657041665,321213,1213 - 1,1,1657041665,360000,1657041665,361003,1003 - 1,1,1657041665,400000,1657041665,401137,1137 - 1,1,1657041665,440000,1657041665,441223,1223 - 1,1,1657041665,480000,1657041665,481222,1222 - 1,1,1657041665,520000,1657041665,521041,1041 - 1,1,1657041665,560000,1657041665,560964,964 - 1,1,1657041665,600000,1657041665,601208,1208 - 1,1,1657041665,640000,1657041665,641233,1233 - 1,1,1657041665,680000,1657041665,680716,716 - 1,1,1657041665,720000,1657041665,721169,1169 - 1,1,1657041665,760000,1657041665,761209,1209 - 1,1,1657041665,800000,1657041665,801031,1031 - 1,1,1657041665,840000,1657041665,840763,763 - 1,1,1657041665,880000,1657041665,880750,750 - 1,1,1657041665,920000,1657041665,920792,792 - 1,1,1657041665,960000,1657041665,960816,816 - 1,1,1657041666,0,1657041666,812,812 - 1,1,1657041666,40000,1657041666,40789,789 - 1,1,1657041666,80000,1657041666,80805,805 - 1,1,1657041666,120000,1657041666,121155,1155 - 1,1,1657041666,160000,1657041666,161160,1160 - 1,1,1657041666,200000,1657041666,201032,1032 - 1,1,1657041666,240000,1657041666,241004,1004 - 1,1,1657041666,280000,1657041666,280989,989 - 1,1,1657041666,320000,1657041666,320897,897 - 1,1,1657041666,360000,1657041666,360310,310 - 1,1,1657041666,400000,1657041666,400688,688 - 1,1,1657041666,440000,1657041666,441162,1162 - 1,1,1657041666,480000,1657041666,481150,1150 - 1,1,1657041666,520000,1657041666,521148,1148 - 1,1,1657041666,560000,1657041666,560984,984 - 1,1,1657041666,600000,1657041666,601148,1148 - 1,1,1657041666,640000,1657041666,641182,1182 - 1,1,1657041666,680000,1657041666,680739,739 - 1,1,1657041666,720000,1657041666,720966,966 - 1,1,1657041666,760000,1657041666,761309,1309 diff --git a/DBServer/Sample DBConnect.c b/DBServer/Sample DBConnect.c deleted file mode 100755 index e995d0a..0000000 --- a/DBServer/Sample DBConnect.c +++ /dev/null @@ -1,145 +0,0 @@ -/* ----------------------------------------------------------------------------- - * db.c & iPDC_DB_Queries - * - * iPDC - Phasor Data Concentrator - * - * Copyright (C) 2011 Nitesh Pandit - * Copyright (C) 2011 Kedar V. Khandeparkar - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * Authors: - * Kedar V. Khandeparkar - * Nitesh Pandit - * - * ----------------------------------------------------------------------------- */ - - -/**************************************** Begin of db.c *******************************************************/ - -#include -#include - -main() { /* Simple C program that connects to MySQL Database server*/ - - MYSQL *conn; - MYSQL_RES *res; - MYSQL_ROW row; - - char *server = "localhost"; - char *user = "root"; - char *password = "root"; /* set me first */ - char *database = "test"; - - conn = mysql_init(NULL); - - /* Connect to database */ - if (!mysql_real_connect(conn, server, - user, password, database, 0, NULL, 0)) { - fprintf(stderr, "%s\n", mysql_error(conn)); - exit(1); - } - - char cmd[40]; - int i=2; - sprintf(cmd, "select * from student"); - - /* send SQL query */ - if (mysql_query(conn, cmd)) { - fprintf(stderr, "%s\n", mysql_error(conn)); - exit(1); - } - - res = mysql_use_result(conn); - - /* output table name */ - printf("Data in student:\n"); - while ((row = mysql_fetch_row(res)) != NULL) - printf("%s \n", row[0]); - /* close connection */ - mysql_free_result(res); - mysql_close(conn); -} - - -/**************************************** Begins of iPDC_DB_Queries *******************************************************/ - -/* - - ANALOG - ANALOG_MEASUREMENTS - DIGITAL - DIGITAL_MEASUREMENTS - FREQUENCY_MEASUREMENTS - MAIN_CFG_TABLE - PHASOR - PHASOR_MEASUREMENTS - REVEIVED_FRAME_TIME - SUB_CFG_TABLE - - -----CFG - -SELECT * FROM MAIN_CFG_TABLE; -SELECT * FROM SUB_CFG_TABLE; -SELECT * FROM PHASOR; -SELECT * FROM ANALOG; -SELECT * FROM DIGITAL; - -SELECT * from PHASOR_MEASUREMENTS WHERE SOC = (SELECT MAX(SOC) FROM PHASOR_MEASUREMENTS); - -delete from MAIN_CFG_TABLE; -delete from SUB_CFG_TABLE; -delete from PHASOR; -delete from ANALOG; -delete from DIGITAL; -delete from PHASOR_MEASUREMENTS; -delete from FREQUENCY_MEASUREMENTS; -delete from ANALOG_MEASUREMENTS; -delete from DIGITAL_MEASUREMENTS; -delete from REVEIVED_FRAME_TIME; - -----DATA - -SELECT * FROM PHASOR_MEASUREMENTS ; -SELECT * FROM FREQUENCY_MEASUREMENTS; -SELECT * FROM ANALOG_MEASUREMENTS; -SELECT * FROM DIGITAL_MEASUREMENTS; -SELECT * FROM REVEIVED_FRAME_TIME; - -SELECT COUNT(*) FROM PHASOR_MEASUREMENTS ; -SELECT COUNT(*) FROM FREQUENCY_MEASUREMENTS; -SELECT COUNT(*) FROM ANALOG_MEASUREMENTS; -SELECT COUNT(*) FROM DIGITAL_MEASUREMENTS; - -// To verify the number of frames received per second from PMU Simulator. -SELECT COUNT(*) from PHASOR_MEASUREMENTS WHERE SOC = (SELECT MAX(SOC)-n FROM PHASOR_MEASUREMENTS); -SELECT COUNT(*) from ANALOG_MEASUREMENTS WHERE SOC = (SELECT MAX(SOC)-n FROM ANALOG_MEASUREMENTS); - -----DROP TABLE - -drop table MAIN_CFG_TABLE; -drop table SUB_CFG_TABLE; -drop table PHASOR; -drop table ANALOG; -drop table DIGITAL; -drop table PHASOR_MEASUREMENTS; -drop table FREQUENCY_MEASUREMENTS; -drop table ANALOG_MEASUREMENTS; -drop table DIGITAL_MEASUREMENTS; -drop table REVEIVED_FRAME_TIME; -*/ - -/**************************************** End of File *******************************************************/ diff --git a/DBServer/cfg.bin b/DBServer/cfg.bin deleted file mode 100644 index 54a4732c7e99888ab44682a66dac9dc3b786a34e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 94 zcmZ2w$PmZCm~^CYDZ}*WD-8et|7T!yR6qp`j0_Aw3?u^#QDvM^xe5#n;@5%7*uXj@ HBOe0*-U1N~ diff --git a/DBServer/connections.c b/DBServer/connections.c deleted file mode 100755 index 1209f3b..0000000 --- a/DBServer/connections.c +++ /dev/null @@ -1,271 +0,0 @@ -/* ----------------------------------------------------------------------------- - * connections.c - * - * iPDC - Phasor Data Concentrator - * - * Copyright (C) 2011 Nitesh Pandit - * Copyright (C) 2011 Kedar V. Khandeparkar - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * Authors: - * Nitesh Pandit - * Kedar V. Khandeparkar - * - * ----------------------------------------------------------------------------- */ - - -/* ---------------------------------------------------------------------------- */ -/* Functions defined in connections.c */ -/* -----------------------------------------------------------------------------*/ - -/* 1. void setup() */ -/* 2. void* DB_udp() */ -/* 3. void* DB_udphandler(void * udp_BUF) */ -/* 4. void DB_process_UDP(char* udp_BUF) */ - -/* ---------------------------------------------------------------------------- */ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "connections.h" -#include "parser.h" -#include "global.h" - -/* ---------------------------------------------------------------- */ -/* global variables */ -/* ---------------------------------------------------------------- */ - -pthread_mutex_t mutex_on_buffer; - -/* ---------------------------------------------------------------------------- */ -/* FUNCTION setup(): */ -/* ---------------------------------------------------------------------------- */ - -void setup(){ - - printf("Entering DBServer setup()\n"); - - /* MySQL data base parameters */ - server = "localhost"; - user = "root"; - password = "root"; /* Change this password value, if not the same in your case? */ - database = "iPDC"; - - /* MySQL data base connection */ - conn_data = mysql_init(NULL); - conn_cfg = mysql_init(NULL); - - if(conn_data == NULL) { - - printf("No sufficient memory\n"); - exit(1); - } - - if(conn_cfg == NULL) { - - printf("No sufficient memory\n"); - exit(1); - } - - /* Connect to database */ - if (!mysql_real_connect(conn_data, server, - user, password, database, 0, NULL, 0)) { - - fprintf(stderr, "%s\n", mysql_error(conn_data)); - exit(1); - } - - if (!mysql_real_connect(conn_cfg, server, - user, password, database, 0, NULL, 0)) { - - fprintf(stderr, "%s\n", mysql_error(conn_cfg)); - exit(1); - } - - /* Create UDP socket and bind to port */ - int yes; - if ((DB_sockfd = socket(AF_INET, SOCK_DGRAM, 0)) == -1) { - - perror("socket"); - exit(1); - - } else { - - printf("DB Socket:Sucessfully created\n"); - - } - - if (setsockopt(DB_sockfd,SOL_SOCKET,SO_REUSEADDR,&yes,sizeof(int)) == -1) { - perror("setsockopt"); - exit(1); - } - - DB_server_addr.sin_family = AF_INET; // host byte order - DB_server_addr.sin_port = htons(DBPORT); // short, network byte order - DB_server_addr.sin_addr.s_addr = INADDR_ANY; // automatically fill with my IP - memset(&(DB_server_addr.sin_zero),'\0', 8); // zero the rest of the struct - - if (bind(DB_sockfd, (struct sockaddr *)&DB_server_addr, - sizeof(DB_server_addr)) == -1) { - perror("bind"); - exit(1); - - } else { - - printf("DB Socket Bind :Sucessfull\n"); - } - - printf("\nDB Server Listening on port %d\n",DBPORT); - - DB_addr_len = sizeof(struct sockaddr); - - DB_udp(); - mysql_close(conn_cfg); - mysql_close(conn_data); - -} - -/* ---------------------------------------------------------------------------- */ -/* FUNCTION udp(): */ -/* It creates a Pthread for each received UDP data. */ -/* ---------------------------------------------------------------------------- */ - - -void DB_udp(){ - - // UDP threads are created for each received UDP message in 'detached' mode. Thus allowing any number of threads to be created. - int err; - pthread_attr_t attr; - pthread_attr_init(&attr); - - if((err = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED))) { // In the detached state, the thread resources are - // immediately freed when it terminates, but - perror(strerror(err)); // pthread_join(3) cannot be used to synchronize - exit(1); // on the thread termination. - - } - - if((err = pthread_attr_setschedpolicy(&attr,SCHED_FIFO))) { // Shed policy = SCHED_FIFO (realtime, first-in first-out) - - perror(strerror(err)); - exit(1); - } - - - /* UDP data Received */ - while(1) { - - if ((numbytes = recvfrom(DB_sockfd,buffer, MAXBUFLEN-1, 0,(struct sockaddr *)&their_addr, (socklen_t *)&DB_addr_len)) == -1) { - // Main if - perror("recvfrom"); - exit(1); - - } else { /* New datagram has been received */ - - pthread_t t; - int tt; - unsigned char *udp_BUF; - udp_BUF = malloc(MAXBUFLEN*sizeof(unsigned char)); - - if(!udp_BUF) { - - printf("No space for udp_BUF\n"); - exit(1); - } - - printf("UDP Server got packet from %s\n",inet_ntoa(their_addr.sin_addr)); - printf("packet is %d bytes long.\n",numbytes); - buffer[numbytes] = '\0'; - - /* Copy the udp_buf data to a local variable */ - pthread_mutex_lock(&mutex_on_buffer); - copy_cbyc(udp_BUF,buffer,MAXBUFLEN); - memset(buffer, '\0', MAXBUFLEN); - pthread_mutex_unlock(&mutex_on_buffer); - - /* Creates a new thread for each received UDP message */ - if((tt = pthread_create(&t,&attr,DB_udphandler,(void *)udp_BUF))) { - - perror(strerror(tt)); - exit(1); - } - - } // Main if ends - - } // while ends - - pthread_attr_destroy(&attr); -} - -/* ---------------------------------------------------------------------------- */ -/* FUNCTION udphandler(): */ -/* It internally calls process_UDP(). */ -/* ---------------------------------------------------------------------------- */ - -void* DB_udphandler(void * udp_BUF) { - - DB_process_UDP((unsigned char*)udp_BUF); - - free((unsigned char*)udp_BUF); - - pthread_exit(NULL); /* Exit the thread once the task is done. */ - -} - -/* ---------------------------------------------------------------------------- */ -/* FUNCTION process_UDP(): */ -/* This function Processes the frames as per their type(command, data, config). */ -/* ---------------------------------------------------------------------------- */ - -void DB_process_UDP(unsigned char* udp_BUF){ - - int stat_status,i; - unsigned char c = udp_BUF[1]; - c <<= 1; - c >>= 5; - if(c == 0x00){ /* If data frame */ - - printf("\nData frame reveived\n"); - stat_status = dataparser(udp_BUF); - printf("Return from Data Parser\n"); - - } else if(c == 0x03) { /* If configuration frame */ - - printf("\nConfiguration frame reveived\n"); - cfgparser(udp_BUF); - printf("Return from CFG\n"); - - - } else { - - printf("Erroneous frame\n"); - - } - fflush(stdout); -} - -/**************************************** End of File *******************************************************/ diff --git a/DBServer/connections.h b/DBServer/connections.h deleted file mode 100755 index 3ec106a..0000000 --- a/DBServer/connections.h +++ /dev/null @@ -1,57 +0,0 @@ -/* ----------------------------------------------------------------------------- - * connections.h - * - * iPDC - Phasor Data Concentrator - * - * Copyright (C) 2011 Nitesh Pandit - * Copyright (C) 2011 Kedar V. Khandeparkar - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * Authors: - * Nitesh Pandit - * Kedar V. Khandeparkar - * - * ----------------------------------------------------------------------------- */ - - -#include -#include - -/* ---------------------------------------------------------------- */ -/* global variable */ -/* ---------------------------------------------------------------- */ - -#define DBPORT 9000 -#define MAXBUFLEN 2000 - -int DB_sockfd; //socket descriptor -struct sockaddr_in DB_server_addr,their_addr; -int DB_addr_len,numbytes; -unsigned char buffer[MAXBUFLEN]; - -/* ---------------------------------------------------------------- */ -/* Function prototypes */ -/* ---------------------------------------------------------------- */ - -void setup(); - -void DB_udp(); - -void* DB_udphandler(void * udp_BUF); - -void DB_process_UDP(unsigned char* udp_BUF); - -/**************************************** End of File *******************************************************/ diff --git a/DBServer/dallocate.c b/DBServer/dallocate.c deleted file mode 100755 index 64cdf0b..0000000 --- a/DBServer/dallocate.c +++ /dev/null @@ -1,112 +0,0 @@ -/* ----------------------------------------------------------------------------- - * dallocate.c - * - * iPDC - Phasor Data Concentrator - * - * Copyright (C) 2011 Nitesh Pandit - * Copyright (C) 2011 Kedar V. Khandeparkar - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * Authors: - * Nitesh Pandit - * Kedar V. Khandeparkar - * - * ----------------------------------------------------------------------------- */ - - -#include -#include -#include -#include "parser.h" -#include "dallocate.h" -#include "global.h" - -/* ------------------------------------------------------------------------------------ */ -/* Functions defined in dallocate.c */ -/* ------------------------------------------------------------------------------------ */ - -/* 1. void free_cfgframe_object(struct cfg_frame *cfg) */ -/* 2. void free_2darray(char** array, int x) */ - -/* ------------------------------------------------------------------------------------ */ - - -/* -------------------------------------------------------------*/ -/* FUNCTION free_cfgframe_object(): */ -/* It frees memory allocated to cfg objects. */ -/* ------------------------------------------------------------ */ - -void free_cfgframe_object(struct cfg_frame *cfg) { - - int j = 0; - struct dgnames *t_dgnames,*r_dgnames; - printf("Inside free_cfgframe_object()\n"); - - while(jnum_pmu) { - - if(cfg->pmu[j]->phnmr != 0) - free_2darray(cfg->pmu[j]->cnext->phnames,cfg->pmu[j]->phnmr); - if(cfg->pmu[j]->annmr != 0) - free_2darray(cfg->pmu[j]->cnext->angnames,cfg->pmu[j]->annmr); - - if(cfg->pmu[j]->dgnmr != 0) { - - t_dgnames = cfg->pmu[j]->cnext->first; - while(t_dgnames != NULL) { - - r_dgnames = t_dgnames->dg_next; - free_2darray(t_dgnames->dgn,16); - t_dgnames = r_dgnames; - - } - } - - if(cfg->pmu[j]->dgnmr != 0) - free_2darray(cfg->pmu[j]->dgunit,cfg->pmu[j]->dgnmr); - - j++; - } // End of While - - free(cfg); -} - -/* -------------------------------------------------------------*/ -/* FUNCTION free_2darray: */ -/* It frees memory allocated to 2D Arrays. */ -/* -------------------------------------------------------------*/ - -void free_2darray_l(long int **array, int x){ - - int i; - for(i=0; i - * Kedar V. Khandeparkar - * - * ----------------------------------------------------------------------------- */ - - -void free_cfgframe_object(struct cfg_frame *cfg); // Frees memory allocated to cfg objects - -void free_2darray_l(long int** array, int x); // frees memory allocated to 2D arrays - -void free_2darray(unsigned char** array, int x); // frees memory allocated to 2D arrays - -/**************************************** End of File *******************************************************/ - diff --git a/DBServer/dbserver.c b/DBServer/dbserver.c deleted file mode 100755 index e55608d..0000000 --- a/DBServer/dbserver.c +++ /dev/null @@ -1,52 +0,0 @@ -/* ----------------------------------------------------------------------------- - * dbserver.c - * - * iPDC - Phasor Data Concentrator - * - * Copyright (C) 2011 Nitesh Pandit - * Copyright (C) 2011 Kedar V. Khandeparkar - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * Authors: - * Nitesh Pandit - * Kedar V. Khandeparkar - * - * ----------------------------------------------------------------------------- */ - - -#include -#include -#include -#include -#include -#include -#include "connections.h" -#include "parser.h" -#include "recreate.h" - -/* ---------------------------------------------------------------- */ -/* main program starts here */ -/* ---------------------------------------------------------------- */ - -int main(void) { - - system("clear"); - recreate_cfg_objects() ; - setup(); - return 0; -} - -/**************************************** End of File *******************************************************/ diff --git a/DBServer/global.h b/DBServer/global.h deleted file mode 100755 index 86063c5..0000000 --- a/DBServer/global.h +++ /dev/null @@ -1,59 +0,0 @@ -/* ----------------------------------------------------------------------------- - * global.h - * - * iPDC - Phasor Data Concentrator - * - * Copyright (C) 2011 Nitesh Pandit - * Copyright (C) 2011 Kedar V. Khandeparkar - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * Authors: - * Nitesh Pandit - * Kedar V. Khandeparkar - * - * ----------------------------------------------------------------------------- */ - - -#include -#include - - -/* ---------------------------------------------------------------- */ -/* Database variables */ -/* ---------------------------------------------------------------- */ - -char *server; -char *user; -char *password ; -char *database ; -int BUFF_LEN; - -MYSQL *conn_data; // Connection to database for data insertion -MYSQL *conn_cfg; // Connection to database for cfg insertion - -pthread_mutex_t mutex_cfg; // To lock cfg objects -pthread_mutex_t mutex_file; // To lock cfg.txt -pthread_mutex_t mutex_MYSQL_CONN_ON_DATA; // To lock 'conn_data' connection for DATA insertion -pthread_mutex_t mutex_MYSQL_CONN_ON_CFG; // To lock 'conn_cfg' connection for CFG insertion - -pthread_mutex_t mutex_phasor_buffer; -char *phasorBuff; -char *frequencyBuff; -char *digitalBuff; -char *analogBuff; -char *delayBuff; - -/**************************************** End of File *******************************************************/ diff --git a/DBServer/parser.c b/DBServer/parser.c deleted file mode 100755 index 515e15f..0000000 --- a/DBServer/parser.c +++ /dev/null @@ -1,1837 +0,0 @@ -/* ----------------------------------------------------------------------------- - * parser.c - * - * iPDC - Phasor Data Concentrator - * - * Copyright (C) 2011 Nitesh Pandit - * Copyright (C) 2011 Kedar V. Khandeparkar - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * Authors: - * Nitesh Pandit - * Kedar V. Khandeparkar - * - * ----------------------------------------------------------------------------- */ - - -/* ---------------------------------------------------------------------------- */ -/* Functions defined in parser.c */ -/* -----------------------------------------------------------------------------*/ - -/* 1. void cfgparser(char []) */ -/* 2. int remove_old_cfg(char[]) */ -/* 3. void cfginsert(struct cfg_frame *) */ -/* 4. void dataparser(char[]) */ -/* 5. int check_statword(char stat[]) */ -/* 6. void hexTobin(char []) */ -/* 7. void hexToAscii(char []) */ - -/* ---------------------------------------------------------------------------- */ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "parser.h" -#include "global.h" -#include "dallocate.h" -#include "connections.h" - -const int PI = 3.14; - -/* ---------------------------------------------------------------------------- */ -/* FUNCTION cfgparser(): */ -/* It creates configuration objects for the received configuration frames. */ -/* Configuration frame is also written in the file `cfg.bin`. */ -/* If the object is already present, it will replace in cfg_frame LL and */ -/* also in the file `cfg.bin` by calling remove_old_cfg(). */ -/* ---------------------------------------------------------------------------- */ - -void cfgparser(unsigned char st[]){ - - FILE *fp; - unsigned char *s; - int match = 0,dgchannels,i,j, phtype, antype; - struct cfg_frame *cfg; - struct channel_names *cn; - unsigned long int l_phunit,l_anunit; - - unsigned char *sync,*frame_size,*idcode_h,*soc,*fracsec,*time_base,*num_pmu,*stn,*idcode_l,*format,*phnmr,*annmr,*dgnmr; - unsigned char *fnom,*cfg_cnt,*data_rate,*buf; - - sync = malloc(3*sizeof(unsigned char)); - frame_size = malloc(3*sizeof(unsigned char)); - idcode_h= malloc(3*sizeof(unsigned char)); - soc = malloc(5*sizeof(unsigned char)); - fracsec = malloc(5*sizeof(unsigned char)); - time_base = malloc(5*sizeof(unsigned char)); - num_pmu = malloc(3*sizeof(unsigned char)); - stn = malloc(17*sizeof(unsigned char)); - idcode_l = malloc(3*sizeof(unsigned char)); - format = malloc(5*sizeof(unsigned char)); - phnmr = malloc(3*sizeof(unsigned char)); - annmr = malloc(3*sizeof(unsigned char)); - dgnmr = malloc(3*sizeof(unsigned char)); - - fnom = malloc(3*sizeof(unsigned char)); - cfg_cnt = malloc(3*sizeof(unsigned char)); - data_rate = malloc(3*sizeof(unsigned char)); - buf = malloc(9*sizeof(unsigned char)); - - memset(sync,'\0',3); - memset(frame_size,'\0',3); - memset(idcode_h,'\0',3); - memset(soc,'\0',3); - memset(fracsec,'\0',5); - memset(time_base,'\0',5); - memset(num_pmu,'\0',3); - memset(stn,'\0',17); - memset(idcode_l,'\0',3); - memset(format,'\0',3); - memset(phnmr,'\0',3); - memset(annmr,'\0',3); - memset(dgnmr,'\0',3); - - memset(fnom,'\0',3); - memset(cfg_cnt ,'\0',3); - memset(data_rate,'\0',3); - memset(buf,'\0',9); - - /******************** PARSING BEGINGS *******************/ - - pthread_mutex_lock(&mutex_file); - - fp = fopen("cfg.bin","ab"); //Store configuration in a file - - if (fp == NULL) - printf("File doesn't exist\n"); - - cfg = malloc(sizeof(struct cfg_frame)); - if(!cfg) { - printf("No enough memory for cfg\n"); - } - - printf("Inside cfgparser()\n"); - s = st; - - //Copy sync word to file - copy_cbyc (sync,(unsigned char *)s,2); - sync[2] = '\0'; - s = s + 2; - - // Separate the FRAME SIZE - copy_cbyc (frame_size,(unsigned char *)s,2); - frame_size[2]='\0'; - cfg->framesize = to_intconvertor(frame_size); - printf("FRAME SIZE %d\n",cfg->framesize); - s = s + 2; - - size_t result; - - result = fwrite(st, sizeof(unsigned char),cfg->framesize, fp); - printf("No of bytes written %ld, into the cfg file.\n",(long int)result); - - unsigned long fileLen; - fseek(fp, 0, SEEK_END); - fileLen = ftell(fp); - fseek(fp, 0, SEEK_SET); - printf("FILE LENGTH %ld\n",fileLen); - - - //SEPARATE IDCODE - copy_cbyc (idcode_h,(unsigned char *)s,2); - idcode_h[2] = '\0'; - cfg->idcode = to_intconvertor(idcode_h); - printf("ID Code %d\n",cfg->idcode); - s = s + 2; - - //SEPARATE SOC - copy_cbyc (soc,(unsigned char *)s,4); - soc[4] = '\0'; - cfg->soc = to_long_int_convertor(soc); - printf("SOC %ld\n",cfg->soc); - s =s + 4; - - //SEPARATE FRACSEC - copy_cbyc (fracsec,(unsigned char *)s,4); - fracsec[4] = '\0'; - cfg->fracsec = to_long_int_convertor(fracsec); - printf("FracSec %ld\n",cfg->fracsec); - s = s + 4; - - //SEPARATE TIMEBASE - copy_cbyc (time_base,(unsigned char *)s,4); - time_base[4]='\0'; - cfg->time_base = to_long_int_convertor(time_base); - printf("Time Base %ld\n",cfg->time_base); - s = s + 4; - - //SEPARATE PMU NUM - copy_cbyc (num_pmu,(unsigned char *)s,2); - num_pmu[2] = '\0'; - cfg->num_pmu = to_intconvertor(num_pmu); - printf("Number of PMU's %d\n",cfg->num_pmu); - s = s + 2; - - // Allocate Memeory For Each PMU - cfg->pmu = malloc(cfg->num_pmu* sizeof(struct for_each_pmu *)); - if(!cfg->pmu) { - printf("Not enough memory pmu[][]\n"); - exit(1); - } - - for (i = 0; i < cfg->num_pmu; i++) { - cfg->pmu[i] = malloc(sizeof(struct for_each_pmu)); - } - - j = 0; - - ///WHILE EACH PMU IS HANDLED - while(jnum_pmu) { - - //SEPARATE STATION NAME - memset(cfg->pmu[j]->stn,'\0',17); - copy_cbyc (cfg->pmu[j]->stn,(unsigned char *)s,16); - cfg->pmu[j]->stn[16] = '\0'; - - printf("STATION NAME %s\n",cfg->pmu[j]->stn); - s = s + 16; - - //SEPARATE IDCODE - copy_cbyc (idcode_l,(unsigned char *)s,2); - idcode_l[2]='\0'; - cfg->pmu[j]->idcode = to_intconvertor(idcode_l); - printf("ID Code %d\n",cfg->pmu[j]->idcode); - s = s + 2; - - //SEPARATE DATA FORMAT - copy_cbyc ((unsigned char *)cfg->pmu[j]->data_format,(unsigned char *)s,2); - cfg->pmu[j]->data_format[2]='\0'; - //printf("PMU format %s\n",cfg->pmu[j]->data_format); - s = s + 2; - - unsigned char hex = cfg->pmu[j]->data_format[1]; - hex <<= 4; - - // Extra field has been added to identify polar,rectangular,floating/fixed point - cfg->pmu[j]->fmt = malloc(sizeof(struct format)); - if((hex & 0x80) == 0x80) cfg->pmu[j]->fmt->freq = 1; else cfg->pmu[j]->fmt->freq = 0; - if((hex & 0x40) == 0x40 ) cfg->pmu[j]->fmt->analog = 1; else cfg->pmu[j]->fmt->analog = 0; - if((hex & 0x20) == 0x20) cfg->pmu[j]->fmt->phasor = 1; else cfg->pmu[j]->fmt->phasor = 0; - if((hex & 0x10) == 0x10) cfg->pmu[j]->fmt->polar = 1; else cfg->pmu[j]->fmt->polar = 0; - - //SEPARATE PHASORS - copy_cbyc (phnmr,(unsigned char *)s,2); - phnmr[2]='\0'; - cfg->pmu[j]->phnmr = to_intconvertor(phnmr); - printf("Phasors %d\n",cfg->pmu[j]->phnmr); - s = s + 2; - - //SEPARATE ANALOGS - copy_cbyc (annmr,(unsigned char *)s,2); - annmr[2]='\0'; - cfg->pmu[j]->annmr = to_intconvertor(annmr); - printf("Analogs %d\n",cfg->pmu[j]->annmr); - s = s + 2; - - //SEPARATE DIGITALS - copy_cbyc (dgnmr,(unsigned char *)s,2); - dgnmr[2]='\0'; - cfg->pmu[j]->dgnmr = to_intconvertor(dgnmr); - printf("Digitals %d\n",cfg->pmu[j]->dgnmr); - s = s + 2; - - cn = malloc(sizeof(struct channel_names)); - cn->first = NULL; - - ////SEPARATE PHASOR NAMES - if(cfg->pmu[j]->phnmr != 0){ - cn->phtypes = malloc((cfg->pmu[j]->phnmr) * sizeof(unsigned char*)); - cn->phnames = malloc((cfg->pmu[j]->phnmr) * sizeof(unsigned char*)); - if(!cn->phnames) { - printf("Not enough memory cfg->pmu[j]->cn->phnames[][]\n"); - exit(1); - } - - for (i = 0; i < cfg->pmu[j]->phnmr; i++) { - - cn->phnames[i] = malloc(17*sizeof(unsigned char)); - memset(cn->phnames[i],'\0',17); - cn->phtypes[i] = malloc(2*sizeof(unsigned char)); - memset(cn->phtypes[i],'\0',2); - - } - - cfg->pmu[j]->phunit = malloc(cfg->pmu[j]->phnmr*sizeof(float*)); - if(!cfg->pmu[j]->phunit) { - printf("Not enough memory cfg.pmu[j]->phunit[][]\n"); - exit(1); - } - - for (i = 0; i < cfg->pmu[j]->phnmr; i++) { - cfg->pmu[j]->phunit[i] = malloc(sizeof(float)); - } - - - i = 0;//Index for PHNAMES - while(ipmu[j]->phnmr){ - - copy_cbyc (cn->phnames[i],(unsigned char *)s,16); - cn->phnames[i][16] = '\0'; - printf("Phnames %s\n",cn->phnames[i]); - s = s + 16; - i++; - } - } - - //SEPARATE ANALOG NAMES - if(cfg->pmu[j]->annmr != 0){ - cn->antypes = malloc((cfg->pmu[j]->annmr)*sizeof(unsigned char*)); - cn->angnames = malloc((cfg->pmu[j]->annmr)*sizeof(unsigned char*)); - if(!cn->angnames) { - - printf("Not enough memory cfg->pmu[j]->cn->phnames[][]\n"); - exit(1); - } - - for (i = 0; i < cfg->pmu[j]->annmr; i++) { - - cn->angnames[i] = malloc(17*sizeof(unsigned char)); - memset(cn->angnames[i],'\0',17); - cn->antypes[i] = malloc(5*sizeof(unsigned char)); - memset(cn->antypes[i],'\0',5); - } - - cfg->pmu[j]->anunit = malloc(cfg->pmu[j]->annmr*sizeof(float*)); - if(!cfg->pmu[j]->anunit) { - printf("Not enough memory cfg.pmu[j]->anunit[][]\n"); - exit(1); - } - - for (i = 0; i < cfg->pmu[j]->annmr; i++) { - cfg->pmu[j]->anunit[i] = malloc(sizeof(float)); - } - - i = 0;//Index for ANGNAMES - - while(ipmu[j]->annmr){ - copy_cbyc (cn->angnames[i],(unsigned char *)s,16); - cn->angnames[i][16]='\0'; - printf("ANGNAMES %s\n",cn->angnames[i]); - s = s + 16; - i++; - } - } - - - if(cfg->pmu[j]->dgnmr != 0){ - - cfg->pmu[j]->dgunit = malloc(cfg->pmu[j]->dgnmr*sizeof(unsigned char*)); - if(!cfg->pmu[j]->dgunit) { - - printf("Not enough memory cfg->pmu[j]->dgunit[][]\n"); - exit(1); - } - - for (i = 0; i < cfg->pmu[j]->dgnmr; i++) { - - cfg->pmu[j]->dgunit[i] = malloc(5); - } - } - - i = 0; - int di;//Index for number of dgwords - - struct dgnames *q; - - while(i < cfg->pmu[j]->dgnmr) { - - struct dgnames *temp1 = malloc(sizeof(struct dgnames)); - temp1->dgn = malloc(16*sizeof(unsigned char *)); - if(!temp1->dgn) { - - printf("Not enough memory temp1->dgn\n"); - exit(1); - } - - for (di = 0; di < 16; di++) { - - temp1->dgn[di] = malloc(17*sizeof(unsigned char)); - - } - - temp1->dg_next = NULL; - - for(dgchannels = 0;dgchannels < 16;dgchannels++){ - - memset(temp1->dgn[dgchannels],'\0',16); - copy_cbyc (temp1->dgn[dgchannels],(unsigned char *)s,16); - temp1->dgn[dgchannels][16] = '\0'; - s += 16; - printf("%s\n",temp1->dgn[dgchannels]); - } - - if(cn->first == NULL){ - cn->first = q = temp1; - - } else { - - while(q->dg_next!=NULL){ - q = q->dg_next; - } - q->dg_next = temp1; - } - - i++; - } //DGWORD WHILE ENDS - - cfg->pmu[j]->cnext = cn;//Assign to pointers - - ///PHASOR FACTORS - if(cfg->pmu[j]->phnmr != 0){ - - i = 0; - while(i < cfg->pmu[j]->phnmr){ //Separate the Phasor conversion factors - - memset(buf,'\0',9); - copy_cbyc (buf,(unsigned char *)s,1); - buf[1] = '\0'; - s = s + 1; - phtype = to_intconvertor1(buf); - copy_cbyc (buf,(unsigned char *)s,3); - buf[3] = '\0'; - s = s + 3; - l_phunit = to_long_int_convertor1(buf); - - if (phtype == 0) - { - cfg->pmu[j]->cnext->phtypes[i] = "V"; - if (cfg->pmu[j]->fmt->phasor == 0) - { - *cfg->pmu[j]->phunit[i] = l_phunit * 1e-5; - } - else - { - *cfg->pmu[j]->phunit[i] = 1; - } - } - else if (phtype == 1) - { - cfg->pmu[j]->cnext->phtypes[i] = "I"; - if (cfg->pmu[j]->fmt->phasor == 0) - { - *cfg->pmu[j]->phunit[i] = l_phunit * 1e-5; - } - else - { - *cfg->pmu[j]->phunit[i] = 1; - } - } - else - { - perror("Invalid first byte in PHUNIT - probably error in PMU"); - } - - printf("Phasor Factor %d = %f\n",i,*cfg->pmu[j]->phunit[i]); - i++; - } - }//if for PHASOR Factors ends - - //ANALOG FACTORS - if(cfg->pmu[j]->annmr != 0){ - - i=0; - while(ipmu[j]->annmr){ //Separate the Phasor conversion factors - - memset(buf,'\0',9); - copy_cbyc (buf,(unsigned char *)s,1); - buf[1] = '\0'; - s = s + 1; - - antype = to_intconvertor1(buf); - switch(antype) - { - case 0 : cfg->pmu[j]->cnext->antypes[i] = "POW"; - break; - case 1 : cfg->pmu[j]->cnext->antypes[i] = "RMS"; - break; - case 2 : cfg->pmu[j]->cnext->antypes[i] = "PEAK"; - break; - default: perror("Invalid first byte in ANUNIT?"); - break; - } - - copy_cbyc (buf,(unsigned char *)s,3); - buf[3] = '\0'; - s = s + 3; - l_anunit = to_long_int_convertor1(buf); - - if (cfg->pmu[j]->fmt->analog == 0) - { - *cfg->pmu[j]->anunit[i] = l_anunit * 1e-5; // Assumed factor of 1e5 in iPDC - } - else - { - *cfg->pmu[j]->anunit[i] = 1; - } - - printf("Analog Factor %d = %f\n",i,*cfg->pmu[j]->anunit[i]); - i++; - } - - } // if for ANALOG FActtors ends - - ///DIGITAL FACTORS - if(cfg->pmu[j]->dgnmr != 0){ - - i = 0; - while(i < cfg->pmu[j]->dgnmr ){ //Separate the Digital conversion factors - - copy_cbyc(cfg->pmu[j]->dgunit[i],(unsigned char *)s,4); - cfg->pmu[j]->dgunit[i][4] = '\0'; - printf("DGWORD %s\n",cfg->pmu[j]->dgunit[i]); - s += 4; - i++; - } - } //if for Digital Words FActtors ends - - copy_cbyc (fnom,(unsigned char *)s,2); - fnom[2]='\0'; - cfg->pmu[j]->fnom = to_intconvertor(fnom); - printf("FREQUENCY %d\n",cfg->pmu[j]->fnom); - s = s + 2; - - copy_cbyc (cfg_cnt,(unsigned char *)s,2); - cfg_cnt[2] = '\0'; - cfg->pmu[j]->cfg_cnt = to_intconvertor(cfg_cnt); - printf("CFG CHANGE COUNT %d\n",cfg->pmu[j]->cfg_cnt); - s = s + 2; - j++; - }//While for PMU number ends - - copy_cbyc (data_rate,(unsigned char *)s,2); - data_rate[2] = '\0'; - cfg->data_rate = to_intconvertor(data_rate); - printf("Data Rate %d\n",cfg->data_rate); - s += 2; - cfg->cfgnext = NULL; - - // Adjust the configuration object pointers - - // Lock the mutex_cfg - pthread_mutex_lock(&mutex_cfg); - - // Index is kept to replace the cfgfirst if it matches - int index = 0; - - if (cfgfirst == NULL) { // Main if - printf("1\n"); - cfgfirst = cfg; - fclose(fp); - - } else { - - struct cfg_frame *temp_cfg = cfgfirst,*tprev_cfg; - tprev_cfg = temp_cfg; - - //Check if the configuration frame already exists - while(temp_cfg!=NULL){ - - if(cfg->idcode == temp_cfg->idcode) { - - printf("CFG PRESENT NEED TO REPLACE\n"); - match = 1; - break; - - } else { - - index++; - tprev_cfg = temp_cfg; - temp_cfg = temp_cfg->cfgnext; - - } - }// While ends - - if(match) { - - if(!index) { - - // Replace the cfgfirst - cfg->cfgnext = cfgfirst->cfgnext; - free_cfgframe_object(cfgfirst); - cfgfirst = cfg; - - // Get the new value of the CFG frame - fclose(fp); - remove_old_cfg(cfg->idcode,st); - - } else { - - // Replace in between cfg - tprev_cfg->cfgnext = cfg; - cfg->cfgnext = temp_cfg->cfgnext; - free_cfgframe_object(temp_cfg); - fclose(fp); - remove_old_cfg(cfg->idcode,st); - } - - } else { // No match and not first cfg - - tprev_cfg->cfgnext = cfg; - fclose(fp); - } - - } //Main if - - cfginsert(cfg); // DATABASE INSERTION - pthread_mutex_unlock(&mutex_cfg); - pthread_mutex_unlock(&mutex_file); - - free(sync); - free(frame_size); - free(idcode_h); - free(soc); - free(fracsec); - free(time_base); - free(num_pmu); - free(stn); - free(idcode_l); - free(format); - free(phnmr); - free(annmr); - free(dgnmr); - free(fnom); - free(cfg_cnt); - free(data_rate); - free(buf); -} - - -/* ---------------------------------------------------------------------------- */ -/* FUNCTION remove_old_cfg(): */ -/* It removes the old configuration frame from the file `cfg.bin` and replaces */ -/* it with new configuration frame at same position in the file. */ -/* ---------------------------------------------------------------------------- */ - -void remove_old_cfg(int idcode,unsigned char frame[]) { // Begins - - FILE *file,*newfile; - int result; - unsigned int idCODE,framesize; - unsigned char *s,id[3],*line,frame_len[2]; - unsigned long fileLen; - - file = fopen("cfg.bin","rb"); - newfile = fopen("ncfg.bin","wb"); - if (file != NULL) { - - //Get file length - fseek(file, 0, SEEK_END); - fileLen = ftell(file); - fseek(file, 0, SEEK_SET); - printf("BEFORE REMOVAL OF OLDFRAME FILE LEN %ld\n",fileLen); - - while (fileLen != 0) /* Till the EOF */{ - - fseek (file,2 ,SEEK_CUR); - fread(frame_len, sizeof(unsigned char),2, file); - fseek (file,-4 ,SEEK_CUR); - - framesize = to_intconvertor(frame_len); - line = malloc(framesize*sizeof(unsigned char)); - memset(line,'\0',sizeof(line)); - fread(line, sizeof(unsigned char),framesize,file); - s = line; - s += 4; - //match IDCODE in cfg.bin file - copy_cbyc (id,s,2); - id[2] = '\0'; - idCODE = to_intconvertor(id); - - if(idCODE == idcode) { - - printf("MATCH the new cfg with old cfg in file cfg.bin?\n"); - break; - - } else { - - //Place rest of lines in the new file - fwrite(line, sizeof(unsigned char),framesize,newfile); - free(line); - fileLen -= framesize; - } - }//While ends - - // The new cfg is copied in the ncfg.bin file - unsigned int len; - unsigned char *p = frame; - p += 2; - copy_cbyc (frame_len,p,2); - len = to_intconvertor(frame_len); - fwrite(frame, sizeof(unsigned char),len,newfile); - - // If cfg.bin file still contains data copy it to ncfg.bin - while (fileLen != 0) /* Till the EOF */{ - - fseek (file,2 ,SEEK_CUR); - fread(frame_len, sizeof(unsigned char),2, file); - fseek (file,-4 ,SEEK_CUR); - - framesize = to_intconvertor(frame_len); - line = malloc(framesize*sizeof(unsigned char)); - memset(line,'\0',sizeof(line)); - fread(line, sizeof(unsigned char),framesize,file); - - if(!ncmp_cbyc(line,frame,framesize)) { - - //This skips the last line of the file that contains already added cfg - //hence we dont copy this line to ncfg.bin - break; - - } else { - - fwrite(frame, sizeof(unsigned char),framesize,newfile); - free(line); - fileLen -= framesize; - } - - } - - //File renaming - fclose (file); - fclose(newfile); - - if( remove( "cfg.bin" ) != 0 ) - perror( "Error deleting file" ); - result= rename("ncfg.bin","cfg.bin"); - if ( result == 0 ) - fputs ("File successfully renamed",stdout); - else - perror( "Error renaming file" ); - - } else { - - perror ("cfg.bin"); /* why didn't the file open? */ - - } -} - - -/* ---------------------------------------------------------------------------- */ -/* FUNCTION cfginsert(): */ -/* It inserts/updates the configuration frames in the configuration tables. */ -/* ---------------------------------------------------------------------------- */ - -void cfginsert(struct cfg_frame *cfg){ - - int i,j,k; - char *cmd,*cmd2; - MYSQL_RES *res1,*res2,*res3,*res4; - - printf("INSIDE CFG INSERT\n"); - - cmd = malloc(1000); - cmd2 = malloc(500); - memset(cmd,'\0',1000); //For update queries - memset(cmd2,'\0',500); //For insert queries - - pthread_mutex_lock(&mutex_MYSQL_CONN_ON_CFG); - - sprintf(cmd2, "SELECT * FROM MAIN_CFG_TABLE WHERE PDC_ID = %d",cfg->idcode); - - - if (mysql_query(conn_cfg,cmd2)) { - - fprintf(stderr, "%s\n", mysql_error(conn_cfg)); - exit(1); - } - - res1 = mysql_use_result(conn_cfg); - if(mysql_fetch_row(res1)== NULL) { - - mysql_free_result(res1); - printf("No Entry Make Insert into table\n"); - memset(cmd,'\0',1000); - sprintf(cmd, "INSERT INTO MAIN_CFG_TABLE VALUES(%d,%ld,%ld,%ld,%d,%d)",cfg->idcode,cfg->soc,cfg->fracsec, - cfg->time_base,cfg->num_pmu,cfg->data_rate); - if (mysql_query(conn_cfg, cmd)) { - - fprintf(stderr, "%s\n", mysql_error(conn_cfg)); - exit(1); - } - printf("%s\n",cmd); - - j = 0; - while(j < cfg->num_pmu){ - - memset(cmd,'\0',1000); - - sprintf(cmd,"INSERT INTO SUB_CFG_TABLE(PDC_ID,PMU_ID,SOC,FRACSEC,STN,PHNMR,ANNMR,DGNMR,FNOM) VALUES(%d,%d,%ld,%ld,\"%s\",%d,%d,%d,%d)",cfg->idcode,cfg->pmu[j]->idcode,cfg->soc,cfg->fracsec,cfg->pmu[j]->stn,cfg->pmu[j]->phnmr,cfg->pmu[j]->annmr,cfg->pmu[j]->dgnmr,(cfg->pmu[j]->fnom > 0) ? 50 : 60); - - if (mysql_query(conn_cfg, cmd)) { - - fprintf(stderr, "%s\n", mysql_error(conn_cfg)); - exit(1); - } - printf("%s\n",cmd); - - if(cfg->pmu[j]->phnmr != 0){ - for(i = 0;ipmu[j]->phnmr;i++) { - - memset(cmd,'\0',1000); - - sprintf(cmd,"INSERT INTO PHASOR(PDC_ID,PMU_ID,PHASOR_NAMES,PHASOR_TYPE,PHUNITS) VALUES (%d,%d,\"%s\",\"%s\",%f)",cfg->idcode,cfg->pmu[j]->idcode,cfg->pmu[j]->cnext->phnames[i],cfg->pmu[j]->cnext->phtypes[i],*cfg->pmu[j]->phunit[i]); - - if (mysql_query(conn_cfg, cmd)) { - - fprintf(stderr, "%s\n", mysql_error(conn_cfg)); - exit(1); - } - printf("%s\n",cmd); - } - } - - if(cfg->pmu[j]->annmr != 0){ - for(i = 0;ipmu[j]->annmr;i++) { - - memset(cmd,'\0',1000); - - sprintf(cmd,"INSERT INTO ANALOG(PDC_ID,PMU_ID,ANALOG_NAMES,ANALOG_TYPE,ANUNITS) VALUES(%d,%d,\"%s\",\"%s\",%f)",cfg->idcode,cfg->pmu[j]->idcode,cfg->pmu[j]->cnext->angnames[i],cfg->pmu[j]->cnext->antypes[i],*cfg->pmu[j]->anunit[i]); - - if (mysql_query(conn_cfg, cmd)) { - - fprintf(stderr, "%s\n", mysql_error(conn_cfg)); - exit(1); - } - printf("%s\n",cmd); - } - } - - if(cfg->pmu[j]->dgnmr != 0){ - - unsigned long int dunit; - struct dgnames *temp_dnames = cfg->pmu[j]->cnext->first; - for(i = 0;ipmu[j]->dgnmr;i++) { - - for(k = 0;k<16;k++) { - - dunit = to_long_int_convertor(cfg->pmu[j]->dgunit[i]); - memset(cmd,'\0',1000); - - sprintf(cmd,"INSERT INTO DIGITAL(PDC_ID,PMU_ID,DIGITAL_NAMES,DIGITAL_WORD) VALUES(%d,%d,\"%s\",%u)",cfg->idcode,cfg->pmu[j]->idcode,temp_dnames->dgn[k],(unsigned int)dunit); - - if (mysql_query(conn_cfg, cmd)) { - - fprintf(stderr, "%s\n", mysql_error(conn_cfg)); - exit(1); - } - printf("%s\n",cmd); - } - - temp_dnames = temp_dnames->dg_next; - } - } - - j++; - } - - } else { - - // update - mysql_free_result(res1); - - printf("Update the existing entry in table\n"); - memset(cmd,'\0',1000); - - sprintf(cmd, "UPDATE MAIN_CFG_TABLE SET SOC = %ld,FRACSEC = %ld,TIMEBASE = %ld,NUM_OF_PMU = %d,DATA_RATE = %d WHERE PDC_ID = %d",cfg->soc,cfg->fracsec,cfg->time_base,cfg->num_pmu,cfg->data_rate,cfg->idcode); - - if (mysql_query(conn_cfg,cmd)) { - - fprintf(stderr, "%s\n", mysql_error(conn_cfg)); - exit(1); - } - mysql_query(conn_cfg, "COMMIT"); - printf("%s\n",cmd); - - int j = 0; - while(j < cfg->num_pmu){ - - memset(cmd2,'\0',500); - - sprintf(cmd2, "SELECT * FROM SUB_CFG_TABLE WHERE PDC_ID = %d AND PMU_ID = %d AND STN = \"%s\"",cfg->idcode,cfg->pmu[j]->idcode,cfg->pmu[j]->stn); - - if (mysql_query(conn_cfg, cmd2)) { - - fprintf(stderr, "%s\n", mysql_error(conn_cfg)); - exit(1); - } - res2 = mysql_use_result(conn_cfg); - printf("%s\n",cmd2); - - if(mysql_fetch_row(res2)== NULL) { - - mysql_free_result(res2); - memset(cmd,'\0',1000); - - sprintf(cmd,"INSERT INTO SUB_CFG_TABLE(PDC_ID,PMU_ID,SOC,FRACSEC,STN,PHNMR,ANNMR,DGNMR,FNOM) VALUES(%d,%d,%ld,%ld,\"%s\",%d,%d,%d,%d)",cfg->idcode,cfg->pmu[j]->idcode,cfg->soc,cfg->fracsec,cfg->pmu[j]->stn,cfg->pmu[j]->phnmr,cfg->pmu[j]->annmr,cfg->pmu[j]->dgnmr,(cfg->pmu[j]->fnom > 0) ? 50 : 60); - - if (mysql_query(conn_cfg, cmd)) { - - fprintf(stderr, "%s\n", mysql_error(conn_cfg)); - exit(1); - } - printf("%s\n",cmd); - - } else { - - mysql_free_result(res2); - memset(cmd,'\0',1000); - - sprintf(cmd, "UPDATE SUB_CFG_TABLE SET PHNMR = %d,ANNMR = %d,DGNMR = %d,FNOM = %d WHERE PDC_ID = %d AND PMU_ID = %d AND STN = \"%s\"",cfg->pmu[j]->phnmr,cfg->pmu[j]->annmr,cfg->pmu[j]->dgnmr,(cfg->pmu[j]->fnom > 0) ? 50 : 60,cfg->idcode,cfg->pmu[j]->idcode,cfg->pmu[j]->stn); - - if (mysql_query(conn_cfg, cmd)) { - - fprintf(stderr, "%s\n", mysql_error(conn_cfg)); - exit(1); - } - - mysql_query(conn_cfg, "COMMIT"); - printf("%s\n",cmd); - } - - if(cfg->pmu[j]->phnmr !=0){ - for(i = 0;ipmu[j]->phnmr;i++) { - - memset(cmd2,'\0',500); - - sprintf(cmd2, "SELECT * FROM PHASOR WHERE PDC_ID = %d AND PMU_ID = %d AND PHASOR_NAMES = \"%s\"",cfg->idcode,cfg->pmu[j]->idcode,cfg->pmu[j]->cnext->phnames[i]); - - if (mysql_query(conn_cfg, cmd2)) { - - fprintf(stderr, "%s\n", mysql_error(conn_cfg)); - exit(1); - } - printf("%s\n",cmd2); - - res3 = mysql_use_result(conn_cfg); - if(mysql_fetch_row(res3)== NULL) { - - mysql_free_result(res3); - memset(cmd,'\0',1000); - - sprintf(cmd,"INSERT INTO PHASOR(PDC_ID,PMU_ID,PHASOR_NAMES,PHASOR_TYPE,PHUNITS) VALUES (%d,%d,\"%s\",\"%s\",%f)",cfg->idcode,cfg->pmu[j]->idcode,cfg->pmu[j]->cnext->phnames[i],cfg->pmu[j]->cnext->phtypes[i],*cfg->pmu[j]->phunit[i]); - - if (mysql_query(conn_cfg, cmd)) { - - fprintf(stderr, "%s\n", mysql_error(conn_cfg)); - exit(1); - } - printf("%s\n",cmd); - - } else { - - mysql_free_result(res3); - memset(cmd,'\0',1000); - sprintf(cmd,"UPDATE PHASOR SET PHUNITS = %f, PHASOR_TYPE = \"%s\" WHERE PDC_ID = %d AND PMU_ID = %d AND PHASOR_NAMES = \"%s\"",*cfg->pmu[j]->phunit[i],cfg->pmu[j]->cnext->phtypes[i],cfg->idcode,cfg->pmu[j]->idcode,cfg->pmu[j]->cnext->phnames[i]); - - if (mysql_query(conn_cfg, cmd)) { - - fprintf(stderr, "%s\n", mysql_error(conn_cfg)); - exit(1); - } - mysql_query(conn_cfg, "COMMIT"); - printf("%s\n",cmd); - - } - } - } // Phasors - - if(cfg->pmu[j]->annmr !=0){ - - for(i = 0;ipmu[j]->annmr;i++) { - - memset(cmd2,'\0',500); - - sprintf(cmd2, "SELECT * FROM ANALOG WHERE PDC_ID = %d AND PMU_ID = %d AND ANALOG_NAMES = \"%s\"",cfg->idcode,cfg->pmu[j]->idcode,cfg->pmu[j]->cnext->angnames[i]); - - if (mysql_query(conn_cfg, cmd2)) { - - fprintf(stderr, "%s\n", mysql_error(conn_cfg)); - exit(1); - } - printf("%s\n",cmd2); - - res4 = mysql_use_result(conn_cfg); - if(mysql_fetch_row(res4)== NULL) { - - mysql_free_result(res4); - memset(cmd,'\0',1000); - - sprintf(cmd,"INSERT INTO ANALOG(PDC_ID,PMU_ID,ANALOG_NAMES,ANALOG_TYPE,ANUNITS) VALUES(%d,%d,\"%s\",\"%s\",%f)",cfg->idcode,cfg->pmu[j]->idcode,cfg->pmu[j]->cnext->angnames[i],cfg->pmu[j]->cnext->antypes[i],*cfg->pmu[j]->anunit[i]); - - if (mysql_query(conn_cfg, cmd)) { - - fprintf(stderr, "%s\n", mysql_error(conn_cfg)); - exit(1); - } - printf("%s\n",cmd); - - } else { - - mysql_free_result(res4); - memset(cmd,'\0',1000); - - sprintf(cmd,"UPDATE ANALOG SET ANUNITS = %f, ANALOG_TYPE = \"%s\" WHERE PDC_ID = %d AND PMU_ID = %d AND ANALOG_NAMES = \"%s\"",*cfg->pmu[j]->anunit[i],cfg->pmu[j]->cnext->antypes[i],cfg->idcode,cfg->pmu[j]->idcode,cfg->pmu[j]->cnext->angnames[i]); - - if (mysql_query(conn_cfg, cmd)) { - - fprintf(stderr, "%s\n", mysql_error(conn_cfg)); - exit(1); - } - mysql_query(conn_cfg, "COMMIT"); - printf("%s\n",cmd); - } - } - } // Analog - j++; - - } // while ends - - } // Update else ends - - pthread_mutex_unlock(&mutex_MYSQL_CONN_ON_CFG); - free(cmd); - free(cmd2); -} - - -/* ---------------------------------------------------------------------------- */ -/* FUNCTION dataparser(): */ -/* Parses the data frames. It searches for configuration objects that matches */ -/* with the IDCODE and then inserts into data tables. */ -/* ---------------------------------------------------------------------------- */ - -int dataparser(unsigned char data[]) { - - struct cfg_frame *temp_cfg; - int match = 0,i,j = 0; - int stat_status,config_change = 0; - unsigned int t_id,num_pmu,phnmr,annmr,dgnmr; - float fp_r,fp_i,fp_real,fp_imaginary,fp_analogs; - long int f_r,f_i,f_analogs,f_freq,f_dfreq,l_soc,l_fracsec; - short int s_analogs, s_freq, s_dfreq; - float fp_freq,fp_dfreq; - - unsigned char *sync,*framesize,*idcode,*soc,*fracsec,*timequality,*stat,*phasors,*analogs,*digital,*freq,*dfreq,*d; - unsigned char *fp_left,*fp_right; - unsigned char *f_left,*f_right; - char *cmd; - - cmd = malloc(500); - sync = malloc(3*sizeof(unsigned char)); - framesize = malloc(3*sizeof(unsigned char)); - idcode = malloc(3*sizeof(unsigned char)); - soc = malloc(5*sizeof(unsigned char)); - fracsec = malloc(5*sizeof(unsigned char)); - timequality = malloc(2*sizeof(unsigned char)); - stat = malloc(3*sizeof(unsigned char)); - phasors = malloc(9*sizeof(unsigned char)); - analogs = malloc(5*sizeof(unsigned char)); - digital = malloc(3*sizeof(unsigned char)); - freq = malloc(5*sizeof(unsigned char)); - dfreq = malloc(5*sizeof(unsigned char)); - - memset(cmd,'\0',500); - memset(sync,'\0',3); - memset(framesize,'\0',3); - memset(idcode,'\0',3); - memset(soc,'\0',5); - memset(fracsec,'\0',5); - memset(timequality,'\0',2); - memset(stat,'\0',3); - memset(phasors,'\0',9); - memset(analogs,'\0',5); - memset(digital,'\0',3); - memset(freq,'\0',5); - memset(dfreq,'\0',5); - - fp_left = malloc(5); - fp_right = malloc(5); - f_left = malloc(3); - f_right = malloc(3); - - memset(fp_left,'\0',5); - memset(fp_right,'\0',5); - memset(f_left,'\0',3); - memset(f_right,'\0',3); - - d = data; - - //Skip SYN - d += 2; - - //SEPARATE FRAMESIZE - copy_cbyc (framesize,d,2); - framesize[2] = '\0'; - d += 2; - - //SEPARATE IDCODE - copy_cbyc (idcode,d,2); - idcode[2] ='\0'; - d += 2; - - pthread_mutex_lock(&mutex_cfg); - // Check for the IDCODE in Configuration Frame - temp_cfg = cfgfirst; - t_id = to_intconvertor(idcode); - printf("ID Code %d\n",t_id); - - while(temp_cfg != NULL){ - - if(t_id == temp_cfg->idcode) { - - match = 1; - break; - - } else { - - temp_cfg = temp_cfg->cfgnext; - - } - } - pthread_mutex_unlock(&mutex_cfg); - - pthread_mutex_lock(&mutex_MYSQL_CONN_ON_DATA); - - if(match){ // idcode matches with cfg idcode - - printf("Inside DATAPARSER, data frame and matched with CFG.\n"); - - // Allocate Memeory For Each PMU - num_pmu = temp_cfg->num_pmu; - - //Copy SOC - copy_cbyc (soc,d,4); - soc[4] = '\0'; - l_soc = to_long_int_convertor(soc); - d += 4; - - //Copy FRACSEC - //First seprate the first Byte of Time Quality Flags - copy_cbyc (timequality,d,1); - timequality[1] = '\0'; - d += 1; - - //First seprate the next 3-Byte of Actual Fraction of Seconds - copy_cbyc (fracsec,d,3); - fracsec[3] = '\0'; - l_fracsec = to_long_int_convertor1(fracsec); - l_fracsec = roundf((l_fracsec*1e6)/(temp_cfg->time_base)); - d += 3; - - // Separate the data for each PMU - while(j < num_pmu) { - - copy_cbyc (stat,d,2); - stat[2] = '\0'; - d += 2; - - // Check Stat Word for each data block - stat_status = check_statword(stat); - - - // If the data has not arrived - if(stat_status == 16) { - - memset(stat,'\0',3); - j++; - continue; - - } else if((stat_status == 14)||(stat_status == 10)) { - - memset(stat,'\0',3); - config_change = stat_status; - j++; - continue; - } - - // Extract PHNMR, DGNMR, ANNMR - phnmr = temp_cfg->pmu[j]->phnmr; - annmr = temp_cfg->pmu[j]->annmr; - dgnmr = temp_cfg->pmu[j]->dgnmr; - - pthread_mutex_lock(&mutex_phasor_buffer); - - //Phasors - if(phnmr != 0) { - - if(temp_cfg->pmu[j]->fmt->phasor == 1) { // Floating - - for(i = 0;ipmu[j]->fmt->polar == 1) { // POLAR - - /*fp_real = fp_r*cos(f_i); - fp_imaginary = fp_r*sin(f_i); - - Commented by Gopal on 8th Aug 2012. - We want to store polar values in the table */ - - fp_real = fp_r; - fp_imaginary = fp_i; - } - else // RECTANGULAR - { - fp_real = hypotf(fp_r,fp_i); - fp_imaginary = atan2f(fp_i, fp_r); - } - - memset(cmd,'\0',500); - sprintf(cmd," %d,%d,%ld,%ld,\"%s\",%f,%f\n",temp_cfg->idcode,temp_cfg->pmu[j]->idcode,l_soc,l_fracsec,temp_cfg->pmu[j]->cnext->phnames[i],fp_real,fp_imaginary); - - dataCollectInBuffer(cmd, phasorBuff, 1); - } - } - else { // Fixed point - - for(i = 0;i < phnmr; i++){ - - memset(f_left,'\0',3); - memset(f_right,'\0',3); - copy_cbyc (f_left,d,2); - f_left[2] = '\0'; - d += 2; - - copy_cbyc(f_right,d,2); - f_right[2] = '\0'; - d += 2; - - f_r = to_intconvertor(f_left); - f_i = to_intconvertor(f_right); - - if(temp_cfg->pmu[j]->fmt->polar == 1) { // POLAR - - fp_real = *temp_cfg->pmu[j]->phunit[i] *f_r; - fp_imaginary = f_i*1e-4; // Angle is in 10^4 radians - } - else // RACTANGULAR - { - fp_r = *temp_cfg->pmu[j]->phunit[i] *f_r; - fp_i = *temp_cfg->pmu[j]->phunit[i] *f_i; - - fp_real = hypotf(fp_r,fp_i); - fp_imaginary = atan2f(fp_i, fp_r); - } - - memset(cmd,'\0',500); - sprintf(cmd," %d,%d,%ld,%ld,\"%s\",%f,%f\n",temp_cfg->idcode,temp_cfg->pmu[j]->idcode,l_soc,l_fracsec,temp_cfg->pmu[j]->cnext->phnames[i],fp_real,fp_imaginary); - - dataCollectInBuffer(cmd, phasorBuff,1); - } - } - }// Phasors Insertion ends - - //Freq - if(temp_cfg->pmu[j]->fmt->freq == 1) { // FLOATING - - memset(freq,'\0',5); - copy_cbyc (freq,d,4); - freq[4] = '\0'; - d += 4; - - memset(dfreq,'\0',5); - copy_cbyc (dfreq,d,4); - dfreq[4] = '\0'; - d += 4; - - fp_freq = decode_ieee_single(freq); - fp_dfreq = decode_ieee_single(dfreq); - - } else { // FIXED - - memset(freq,'\0',5); - copy_cbyc (freq,d,2); - freq[2] = '\0'; - d += 2; - - memset(dfreq,'\0',5); - copy_cbyc (dfreq,d,2); - dfreq[2] = '\0'; - d += 2; - s_freq = to_intconvertor(freq); - s_dfreq = to_intconvertor(dfreq); - - fp_freq = s_freq*1e-3; // freq is in mHz deviation from nominal - if (temp_cfg->pmu[j]->fnom == 0) - fp_freq = 60 + fp_freq; - else - fp_freq = 50 + fp_freq; - fp_dfreq = s_dfreq*1e-2; // dfreq is 100 times hz/sec - } - - memset(cmd,'\0',500); - sprintf(cmd," %d,%d,%ld,%ld,%f,%f\n",temp_cfg->idcode,temp_cfg->pmu[j]->idcode,l_soc,l_fracsec,fp_freq,fp_dfreq); - - dataCollectInBuffer(cmd, frequencyBuff,2); // Freq Insert Ends - - //Analogs - if(annmr != 0) { - - if(temp_cfg->pmu[j]->fmt->analog == 1) { // FLOATING - - for(i = 0; i < annmr; i++){ - - memset(analogs,'\0',5); - copy_cbyc(analogs,d,4); - d += 4; - analogs[4] = '\0'; - - fp_analogs = decode_ieee_single(analogs); - fp_analogs = *temp_cfg->pmu[j]->anunit[i]*fp_analogs;; - memset(cmd,'\0',500); - - sprintf(cmd," %d,%d,%ld,%ld,\"%s\",%f\n",temp_cfg->idcode,temp_cfg->pmu[j]->idcode,l_soc,l_fracsec,temp_cfg->pmu[j]->cnext->angnames[i],fp_analogs); - - dataCollectInBuffer(cmd, analogBuff,3); - } - - } else { // FIXED - - for(i = 0; i < annmr; i++){ - - memset(analogs,'\0',5); - copy_cbyc (analogs,d,2); - d += 2; - - analogs[2] = '\0'; - s_analogs = to_intconvertor(analogs); - fp_analogs = *temp_cfg->pmu[j]->anunit[i]*s_analogs ; - - memset(cmd,'\0',500); - sprintf(cmd," %d,%d,%ld,%ld,\"%s\",%f\n",temp_cfg->idcode,temp_cfg->pmu[j]->idcode,l_soc,l_fracsec,temp_cfg->pmu[j]->cnext->angnames[i],fp_analogs); - - dataCollectInBuffer(cmd, analogBuff,3); - } - } - } // Insertion for Analog done here. - - // Digital - if(dgnmr != 0) { - - unsigned int dgword; - - for(i = 0; iidcode,temp_cfg->pmu[j]->idcode,l_soc,l_fracsec,dgword); - - dataCollectInBuffer(cmd, digitalBuff,4); - } - } // Insertion for Digital done here. - - struct timeval tv; - long local_soc, local_fsec,ms_diff,s_diff; - - /* Obtain the time of day, and convert it to a tm struct. */ - gettimeofday (&tv, NULL); - - local_soc = tv.tv_sec; - local_fsec = tv.tv_usec; - s_diff = (tv.tv_sec - l_soc); - ms_diff = (tv.tv_usec - l_fracsec); - - // Formula to calculate the exact delay in micro between data frame inside-time and - // system receive time at which that data frame received. - ms_diff = ((s_diff == 0) ? ((ms_diff > 0) ? ms_diff : -1*ms_diff) : ((s_diff == 1) ? (1000000-l_fracsec+tv.tv_usec) : ((1000000*(s_diff-1))+(1000000-l_fracsec+tv.tv_usec)))); - - memset(cmd,'\0',500); - sprintf(cmd," %d,%d,%ld,%ld,%ld,%ld,%ld\n",temp_cfg->idcode,temp_cfg->pmu[j]->idcode,l_soc,l_fracsec,local_soc,local_fsec,ms_diff); - dataCollectInBuffer(cmd, delayBuff,5); - - pthread_mutex_unlock(&mutex_phasor_buffer); - j++; - } //While ends - - } else { - - printf("NO CFG for data frames\n"); - } - - pthread_mutex_unlock(&mutex_MYSQL_CONN_ON_DATA); - - free(cmd); - free(sync); - free(framesize); - free(idcode); - free(soc); - free(fracsec); - free(timequality); - free(stat); - free(phasors); - free(analogs); - free(digital); - free(freq); - free(dfreq); - - free(fp_left); - free(fp_right); - free(f_left); - free(f_right); - - if((config_change == 14) ||(config_change == 10)) - return config_change; - else return stat_status; -} - - -/* ---------------------------------------------------------------------------- */ -/* FUNCTION check_statword(): */ -/* Check the STAT word of the data frames for any change in the data block. */ -/* Some of the prime errors are handled. */ -/* ---------------------------------------------------------------------------- */ - -int check_statword(unsigned char stat[]) { - - int ret = 0; - - if(stat[0] == 0x0f) { - - // DEVELOPERS has used these bits as an indication for PMU data that has not arrived/missing data frames - ret = 16; - return ret; - - } else if ((stat[0] & 0x04) == 0x04) { - - printf("Configuration Change error\n"); - ret = 10; - return ret; - - } else if ((stat[0] & 0x40) == 0x40) { - - printf("PMU error including configuration error\n"); - ret = 14; - return ret; - - } else if((stat[0] & 0x80) == 0x80) { - - printf("Data invalid\n"); - ret = 15; - return ret; - - } else if ((stat[0] & 0x20) == 0x20) { - - printf("PMU Sync error\n"); - ret = 13; - return ret; - - } else if ((stat[0] & 0x10) == 0x10) { - - printf("Data sorting error\n"); - ret = 12; - return ret; - - } else if ((stat[0] & 0x08) == 0x08) { - - printf("PMU Trigger error\n"); - ret = 11; - return ret; - - } - - printf("Return from STAT Word checking %d.\n",ret); - return ret; -} - - -/* ---------------------------------------------------------------------------- */ -/* FUNCTION to_intconvertor(): */ -/* ---------------------------------------------------------------------------- */ - -unsigned int to_intconvertor(unsigned char array[]) { - - unsigned int n; - n = array[0]; - n <<= 8; - n |= array[1]; - return n; -} - - -/* ---------------------------------------------------------------------------- */ -/* FUNCTION to_intconvertor1(): */ -/* Written by Gopal to convert just 1 byte to int */ -/* ---------------------------------------------------------------------------- */ - -unsigned int to_intconvertor1(unsigned char array[]) { - - unsigned int n; - n = array[0]; - return n; -} - - -/* ---------------------------------------------------------------------------- */ -/* FUNCTION to_long_int_convertor(): */ -/* ---------------------------------------------------------------------------- */ - -unsigned long int to_long_int_convertor(unsigned char array[]) { - - unsigned long int n; - n = array[0]; - n <<= 8; - n |= array[1]; - n <<= 8; - n |= array[2]; - n <<= 8; - n |= array[3]; - return n; - -} - - -/* ---------------------------------------------------------------------------- */ -/* FUNCTION to_long_int_convertor1(): */ -/* Written by Gopal to convert just 3 bytes to long int */ -/* ---------------------------------------------------------------------------- */ - -unsigned long int to_long_int_convertor1(unsigned char array[]) { - - unsigned long int n; - n = array[0]; - n <<= 8; - n |= array[1]; - n <<= 8; - n |= array[2]; - return n; - -} - - -/* ---------------------------------------------------------------------------- */ -/* FUNCTION decode_ieee_single(): */ -/* ---------------------------------------------------------------------------- */ - -float decode_ieee_single(const void *v) { - - const unsigned char *data = v; - int s, e; - unsigned long src; - long f; - float value; - - src = ((unsigned long)data[0] << 24) | - ((unsigned long)data[1] << 16) | - ((unsigned long)data[2] << 8) | - ((unsigned long)data[3]); - - s = (src & 0x80000000UL) >> 31; - e = (src & 0x7F800000UL) >> 23; - f = (src & 0x007FFFFFUL); - - if (e == 255 && f != 0) { - /* NaN (Not a Number) */ - value = DBL_MAX; - - } else if (e == 255 && f == 0 && s == 1) { - /* Negative infinity */ - value = -DBL_MAX; - } else if (e == 255 && f == 0 && s == 0) { - /* Positive infinity */ - value = DBL_MAX; - } else if (e > 0 && e < 255) { - /* Normal number */ - f += 0x00800000UL; - if (s) f = -f; - value = ldexp(f, e - 150); - } else if (e == 0 && f != 0) { - /* Denormal number */ - if (s) f = -f; - value = ldexp(f, -149); - } else if (e == 0 && f == 0 && s == 1) { - /* Negative zero */ - value = 0; - } else if (e == 0 && f == 0 && s == 0) { - /* Positive zero */ - value = 0; - } else { - /* Never happens */ - printf("s = %d, e = %d, f = %lu\n", s, e, f); - assert(!"Woops, unhandled case in decode_ieee_single()"); - } - - return value; -} - - -/* ---------------------------------------------------------------------------- */ -/* FUNCTION copy_cbyc(): */ -/* ---------------------------------------------------------------------------- */ - -void copy_cbyc(unsigned char dst[],unsigned char *s,int size) { - - int i; - for(i = 0; i< size; i++) - dst[i] = *(s + i); -} - - -/* ---------------------------------------------------------------------------- */ -/* FUNCTION ncmp_cbyc(): */ -/* ---------------------------------------------------------------------------- */ - -int ncmp_cbyc(unsigned char dst[],unsigned char src[],int size) { - - int i,flag = 0; - for(i = 0; i< size; i++) { - - if(dst[i] != src[i]) { - - flag = 1; - break; - } - } - return flag; -} - - - -void dataCollectInBuffer(char *cmd, char *buffer, int type) -{ - - int err; - if((BUFF_LEN - strlen(buffer)) < strlen(cmd)) { - - char *ttt; - ttt = malloc((BUFF_LEN+1)*sizeof(unsigned char)); - memset(ttt,'\0',BUFF_LEN+1); - strncpy(ttt,buffer,BUFF_LEN+1); - memset(buffer,'\0',BUFF_LEN); - strncpy(buffer,cmd,strlen(cmd)); - pthread_attr_t attr; - pthread_attr_init(&attr); - pthread_t thread1; - - - if((err = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED))) { // In the detached state, the thread resources are - // immediately freed when it terminates, but - perror(strerror(err)); // pthread_join(3) cannot be used to synchronize - exit(1); // on the thread termination. - } - - //int er; - struct DataBuff *buf=malloc(sizeof(struct DataBuff)); - buf->data = ttt; - buf->type = type; - if((err = pthread_create(&thread1,&attr,dataWriteInFile,(void *)buf))) { - - perror(strerror(err)); - exit(1); - } - - } else { - strcat(buffer,cmd); - } -} - - -/* ---------------------------------------------------------------------------- */ -/* FUNCTION dataWriteInFile(): */ -/* */ -/* ---------------------------------------------------------------------------- */ - -void* dataWriteInFile(void * temp_buff) { - - FILE *p,*f,*a,*d,*e; - - struct DataBuff *buf = (struct DataBuff*)temp_buff; - char *phasorFile = "PHASOR_MEASUREMENTS.txt"; - char *freqFile = "FREQUENCY_MEASUREMENTS.txt"; - char *analogFile = "ANALOG_MEASUREMENTS.txt"; - char *digitalFile = "DIGITAL_MEASUREMENTS.txt"; - char *frameDelay = "RECEIVED_FRAME_TIME.txt"; - - if(buf->type == 1) { - - p = fopen(phasorFile,"w"); - fprintf(p,buf->data); - fclose(p); - - f = fopen(freqFile,"w"); - fprintf(f,frequencyBuff); - memset(frequencyBuff,'\0',BUFF_LEN); - fclose(f); - - a = fopen(analogFile,"w"); - fprintf(a,analogBuff); - memset(analogBuff,'\0',BUFF_LEN); - fclose(a); - - d = fopen(digitalFile,"w"); - fprintf(d,digitalBuff); - memset(digitalBuff,'\0',BUFF_LEN); - fclose(d); - - e = fopen(frameDelay,"w"); - fprintf(e,delayBuff); - memset(delayBuff,'\0',BUFF_LEN); - fclose(e); - - } else if(buf->type == 2) { - - f = fopen(freqFile,"w"); - fprintf(f,buf->data); - fclose(f); - - p = fopen(phasorFile,"w"); - fprintf(p,phasorBuff); - memset(phasorBuff,'\0',BUFF_LEN); - fclose(p); - - a = fopen(analogFile,"w"); - fprintf(a,analogBuff); - memset(analogBuff,'\0',BUFF_LEN); - fclose(a); - - d = fopen(digitalFile,"w"); - fprintf(d,digitalBuff); - memset(digitalBuff,'\0',BUFF_LEN); - fclose(d); - - e = fopen(frameDelay,"w"); - fprintf(e,delayBuff); - memset(delayBuff,'\0',BUFF_LEN); - fclose(e); - - } else if(buf->type == 3) { - - a = fopen(analogFile,"w"); - fprintf(a,buf->data); - fclose(a); - - p = fopen(phasorFile,"w"); - fprintf(p,phasorBuff); - memset(phasorBuff,'\0',BUFF_LEN); - fclose(p); - - f = fopen(freqFile,"w"); - fprintf(f,frequencyBuff); - memset(frequencyBuff,'\0',BUFF_LEN); - fclose(f); - - d = fopen(digitalFile,"w"); - fprintf(d,digitalBuff); - memset(digitalBuff,'\0',BUFF_LEN); - fclose(d); - - e = fopen(frameDelay,"w"); - fprintf(e,delayBuff); - memset(delayBuff,'\0',BUFF_LEN); - fclose(e); - - } else if(buf->type == 4) { - - d = fopen(digitalFile,"w"); - fprintf(d,buf->data); - fclose(d); - - p = fopen(phasorFile,"w"); - fprintf(p,phasorBuff); - memset(phasorBuff,'\0',BUFF_LEN); - fclose(p); - - f = fopen(freqFile,"w"); - fprintf(f,frequencyBuff); - memset(frequencyBuff,'\0',BUFF_LEN); - fclose(f); - - a = fopen(analogFile,"w"); - fprintf(d,analogBuff); - memset(analogBuff,'\0',BUFF_LEN); - fclose(d); - - e = fopen(frameDelay,"w"); - fprintf(e,delayBuff); - memset(delayBuff,'\0',BUFF_LEN); - fclose(e); - - } else if(buf->type == 5) { - - d = fopen(digitalFile,"w"); - fprintf(d,buf->data); - fclose(d); - - p = fopen(phasorFile,"w"); - fprintf(p,phasorBuff); - memset(phasorBuff,'\0',BUFF_LEN); - fclose(p); - - f = fopen(freqFile,"w"); - fprintf(f,frequencyBuff); - memset(frequencyBuff,'\0',BUFF_LEN); - fclose(f); - - a = fopen(analogFile,"w"); - fprintf(d,analogBuff); - memset(analogBuff,'\0',BUFF_LEN); - fclose(d); - - e = fopen(frameDelay,"w"); - fprintf(e,delayBuff); - memset(delayBuff,'\0',BUFF_LEN); - fclose(e); - } - - system("mysqlimport --local --fields-terminated-by=\, --fields-enclosed-by=\\\" -uroot -proot iPDC PHASOR_MEASUREMENTS.txt"); - system("mysqlimport --local --fields-terminated-by=\, --fields-enclosed-by=\\\" -uroot -proot iPDC FREQUENCY_MEASUREMENTS.txt"); - system("mysqlimport --local --fields-terminated-by=\, --fields-enclosed-by=\\\" -uroot -proot iPDC ANALOG_MEASUREMENTS.txt"); - system("mysqlimport --local --fields-terminated-by=\, --fields-enclosed-by=\\\" -uroot -proot iPDC DIGITAL_MEASUREMENTS.txt"); - system("mysqlimport --local --fields-terminated-by=\, --fields-enclosed-by=\\\" -uroot -proot iPDC RECEIVED_FRAME_TIME.txt"); - -// system("./upDateTable.sh"); - printf("wrote to database\n"); - - free((unsigned char*)temp_buff); - - pthread_exit(NULL); /* Exit the thread once the task is done. */ - -} - -/**************************************** End of File *******************************************************/ diff --git a/DBServer/parser.h b/DBServer/parser.h deleted file mode 100755 index ce1cc19..0000000 --- a/DBServer/parser.h +++ /dev/null @@ -1,137 +0,0 @@ -/* ----------------------------------------------------------------------------- - * parser.h - * - * iPDC - Phasor Data Concentrator - * - * Copyright (C) 2011 Nitesh Pandit - * Copyright (C) 2011 Kedar V. Khandeparkar - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * Authors: - * Nitesh Pandit - * Kedar V. Khandeparkar - * - * ----------------------------------------------------------------------------- */ - - -#define MAXBUFLEN 2000 - - -/* ---------------------------------------------------------------- */ -/* Data Structure prototypes */ -/* ---------------------------------------------------------------- */ - -/* ---------------------------------------------------------------- */ -/* Configuartion Frame Data Structure */ -/* ---------------------------------------------------------------- */ - -struct cfg_frame { - - unsigned int framesize; - unsigned int idcode; - unsigned long int soc; - unsigned long int fracsec; - unsigned long int time_base; - unsigned int num_pmu; - struct for_each_pmu **pmu; - unsigned int data_rate; - struct cfg_frame *cfgnext; - -}*cfgfirst; - - -struct for_each_pmu{ - - unsigned char stn[17]; - unsigned int idcode; - char data_format[3]; - struct format *fmt; - unsigned int phnmr; - unsigned int annmr; - unsigned int dgnmr; - struct channel_names *cnext; - float **phunit; - float **anunit; - unsigned char **dgunit; - unsigned int fnom; - unsigned int cfg_cnt; -}; - -struct channel_names { - - unsigned char **phnames; - unsigned char **angnames; - unsigned char **phtypes; - unsigned char **antypes; - struct dgnames *first; -}; - -struct dgnames { - - unsigned char **dgn; // Stores 16 digital names for each word - struct dgnames *dg_next; -}; - -// This struct is added to help find out whether the measurements are floating/fixed, polar/rectangular . -struct format{ - - unsigned int freq; - unsigned int analog; - unsigned char phasor; - unsigned char polar; -}; - -struct DataBuff{ - - unsigned char *data; - unsigned int type; -}; - - -/* ---------------------------------------------------------------- */ -/* Function prototypes */ -/* ---------------------------------------------------------------- */ - - -void cfgparser(unsigned char []); - -void cfginsert(struct cfg_frame *); - -int dataparser(unsigned char data[]); - -char* hexTobin(char s); - -int check_statword(unsigned char stat[]); - -void remove_old_cfg(int idcode,unsigned char frame[]); - -unsigned int to_intconvertor(unsigned char array[]); - -unsigned int to_intconvertor1(unsigned char array[]); //Added by gopal -- to_intconvertor1 - -unsigned long int to_long_int_convertor(unsigned char * array); - -unsigned long int to_long_int_convertor1(unsigned char * array); //Added by gopal -- to_long_int_convertor1 - -float decode_ieee_single(const void *v); - -void copy_cbyc(unsigned char dst[],unsigned char *s,int size); - -int ncmp_cbyc(unsigned char dst[],unsigned char src[],int size); - -void* dataWriteInFile(void * temp_buff); - -/**************************************** End of File *******************************************************/ diff --git a/DBServer/recreate.c b/DBServer/recreate.c deleted file mode 100755 index 97bde7c..0000000 --- a/DBServer/recreate.c +++ /dev/null @@ -1,645 +0,0 @@ -/* ----------------------------------------------------------------------------- - * recreate.c - * - * iPDC - Phasor Data Concentrator - * - * Copyright (C) 2011 Nitesh Pandit - * Copyright (C) 2011 Kedar V. Khandeparkar - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * Authors: - * Nitesh Pandit - * Kedar V. Khandeparkar - * - * ----------------------------------------------------------------------------- */ - - -#include -#include -#include -#include -#include "parser.h" -#include "global.h" -#include "recreate.h" - - -/* ---------------------------------------------------------------------*/ -/* Functions defined in recreate.c */ -/* ---------------------------------------------------------------------*/ - -/* 1. recreate_cfg_objects() */ -/* 2. void init_cfgparser() */ - -/* -------------------------------------------------------------------- */ - - - -/* ---------------------------------------------------------------------------- */ -/* FUNCTION recreate_cfg_objects(): */ -/* It re-creates Configuration Objects from file cfg.bin if the ./server */ -/* program is stopped abruptly. It internally calls init_cfgparser() */ -/* ---------------------------------------------------------------------------- */ - -void recreate_cfg_objects(){ - - /* ---------------------------------------------------------------- */ - /* Initialize Global Mutex Variable from global.h */ - /* ---------------------------------------------------------------- */ - - pthread_mutex_init(&mutex_file, NULL); - pthread_mutex_init(&mutex_cfg, NULL); - pthread_mutex_init(&mutex_MYSQL_CONN_ON_DATA, NULL); - pthread_mutex_init(&mutex_MYSQL_CONN_ON_CFG, NULL); - pthread_mutex_init(&mutex_phasor_buffer,NULL); - - BUFF_LEN = 25000; - phasorBuff = malloc(BUFF_LEN*sizeof(unsigned char)); - frequencyBuff = malloc(BUFF_LEN*sizeof(unsigned char)); - analogBuff = malloc(BUFF_LEN*sizeof(unsigned char)); - digitalBuff = malloc(BUFF_LEN*sizeof(unsigned char)); - delayBuff = malloc(BUFF_LEN*sizeof(unsigned char)); - - memset(phasorBuff,'\0',BUFF_LEN); - memset(frequencyBuff,'\0',BUFF_LEN); - memset(analogBuff,'\0',BUFF_LEN); - memset(digitalBuff,'\0',BUFF_LEN); - memset(delayBuff,'\0',BUFF_LEN); - - static const char filename[] = "cfg.bin"; - - FILE *file = fopen (filename,"rb"); - unsigned char *line,frame_len[2]; - unsigned int framesize; - unsigned long fileLen; - - if (file != NULL) { - - //Get file length - fseek(file, 0, SEEK_END); - fileLen = ftell(file); - fseek(file, 0, SEEK_SET); - printf("FILE LEN LEFT %ld\n",fileLen); - printf("Creating objects for entries in cfg.bin\n"); - - while (fileLen != 0) /* Till the EOF */{ - - fseek (file,2 ,SEEK_CUR); - fread(frame_len, sizeof(unsigned char),2, file); - fseek (file,-4 ,SEEK_CUR); - - framesize = to_intconvertor(frame_len); - line = malloc(framesize*sizeof(unsigned char)); - memset(line,'\0',sizeof(line)); - fread(line, sizeof(unsigned char),framesize,file); - init_cfgparser(line); - free(line); - fileLen -= framesize; - } - fclose (file); - - } else { - perror (filename); /* why didn't the file open? */ - } -} - - -/* ---------------------------------------------------------------------------- */ -/* FUNCTION init_cfgparser(): */ -/* It is called by recreate_cfg_object() to read the file `cfg.bin` */ -/* and create cfg objects in the memory */ -/* ---------------------------------------------------------------------------- */ - -void init_cfgparser(unsigned char st[]){ - - unsigned char *s; - int cfglen = 0; - int i,j,k,dgchannels, phtype, antype; - struct cfg_frame *cfg; - struct channel_names *cn; - unsigned long int l_phunit,l_anunit; - - unsigned char *sync,*frame_size,*idcode_h,*soc,*fracsec,*time_base,*num_pmu,*stn,*idcode_l,*format,*phnmr,*annmr,*dgnmr; - unsigned char *fnom,*cfg_cnt,*data_rate,*buf; - - sync = malloc(3*sizeof(unsigned char)); - frame_size = malloc(3*sizeof(unsigned char)); - idcode_h= malloc(3*sizeof(unsigned char)); - soc = malloc(5*sizeof(unsigned char)); - fracsec = malloc(5*sizeof(unsigned char)); - time_base = malloc(5*sizeof(unsigned char)); - num_pmu = malloc(3*sizeof(unsigned char)); - stn = malloc(17*sizeof(unsigned char)); - idcode_l = malloc(3*sizeof(unsigned char)); - format = malloc(5*sizeof(unsigned char)); - phnmr = malloc(3*sizeof(unsigned char)); - annmr = malloc(3*sizeof(unsigned char)); - dgnmr = malloc(3*sizeof(unsigned char)); - - fnom = malloc(3*sizeof(unsigned char)); - cfg_cnt = malloc(3*sizeof(unsigned char)); - data_rate = malloc(3*sizeof(unsigned char)); - buf = malloc(9*sizeof(unsigned char)); - - memset(sync,'\0',3); - memset(frame_size,'\0',3); - memset(idcode_h,'\0',3); - memset(soc,'\0',3); - memset(fracsec,'\0',5); - memset(time_base,'\0',5); - memset(num_pmu,'\0',3); - memset(stn,'\0',17); - memset(idcode_l,'\0',3); - memset(format,'\0',3); - memset(phnmr,'\0',3); - memset(annmr,'\0',3); - memset(dgnmr,'\0',3); - - memset(fnom,'\0',3); - memset(cfg_cnt ,'\0',3); - memset(data_rate,'\0',3); - memset(buf,'\0',9); - - - /******************** PARSING BEGINGS *******************/ - - pthread_mutex_lock(&mutex_file); - - cfg = malloc(sizeof(struct cfg_frame)); - if(!cfg) { - printf("No enough memory for cfg\n"); - } - - printf("Inside INIT cfgparser()\n"); - s = st; - - //Copy sync word to file - copy_cbyc (sync,s,2); - sync[2] = '\0'; - s = s + 2; - - // Separate the FRAME SIZE - copy_cbyc (frame_size,(unsigned char *)s,2); - frame_size[2]='\0'; - cfg->framesize = to_intconvertor(frame_size); - printf("FRAME SIZE %d\n",cfg->framesize); - s = s + 2; - cfglen += 2; - - //SEPARATE IDCODE - copy_cbyc (idcode_h,(unsigned char *)s,2); - idcode_h[2] = '\0'; - cfg->idcode = to_intconvertor(idcode_h); - printf("ID Code %d\n",cfg->idcode); - s = s + 2; - cfglen += 2; - - //SEPARATE SOC - copy_cbyc (soc,(unsigned char *)s,4); - soc[4] = '\0'; - sscanf((unsigned int *)soc,"%x", (unsigned int *)&cfg->soc); - printf("SOC %ld\n",cfg->soc); - s =s + 4; - cfglen += 4; - - //SEPARATE FRACSEC - copy_cbyc (fracsec,(unsigned char *)s,4); - fracsec[4] = '\0'; - cfg->fracsec = to_long_int_convertor(fracsec); - printf("FracSec %ld\n",cfg->fracsec); - s = s + 4; - cfglen += 4; - - //SEPARATE TIMEBASE - copy_cbyc (time_base,(unsigned char *)s,4); - time_base[4]='\0'; - cfg->time_base = to_long_int_convertor(time_base); - printf("Time Base %ld\n",cfg->time_base); - s = s + 4; - cfglen += 4; - - //SEPARATE PMU NUM - copy_cbyc (num_pmu,(unsigned char *)s,2); - num_pmu[2] = '\0'; - cfg->num_pmu = to_intconvertor(num_pmu); - printf("Number of PMU's %d\n",cfg->num_pmu); - s = s + 2; - cfglen += 2; - - // Allocate Memeory For Each PMU - cfg->pmu = malloc(cfg->num_pmu* sizeof(struct for_each_pmu *)); - if(!cfg->pmu) { - printf("Not enough memory pmu[][]\n"); - exit(1); - } - - for (i = 0; i < cfg->num_pmu; i++) { - cfg->pmu[i] = malloc(sizeof(struct for_each_pmu)); - } - - j = 0; - - ///WHILE EACH PMU IS HANDLED - while(jnum_pmu) { - - //SEPARATE STATION NAME - memset(cfg->pmu[j]->stn,'\0',17); - copy_cbyc (cfg->pmu[j]->stn,(unsigned char *)s,16); - cfg->pmu[j]->stn[16] = '\0'; - - printf("STATION NAME %s\n",cfg->pmu[j]->stn); - s = s + 16; - cfglen += 16; - - //SEPARATE IDCODE - copy_cbyc (idcode_l,(unsigned char *)s,2); - idcode_l[2]='\0'; - cfg->pmu[j]->idcode = to_intconvertor(idcode_l); - printf("ID Code %d\n",cfg->pmu[j]->idcode); - s = s + 2; - cfglen += 2; - - //SEPARATE DATA FORMAT - copy_cbyc ((unsigned char *)cfg->pmu[j]->data_format,(unsigned char *)s,2); - cfg->pmu[j]->data_format[2]='\0'; - s = s + 2; - cfglen += 2; - - unsigned char hex = cfg->pmu[j]->data_format[1]; - hex <<= 4; - - // Extra field has been added to identify polar,rectangular,floating/fixed point - cfg->pmu[j]->fmt = malloc(sizeof(struct format)); - if((hex & 0x80) == 0x80) cfg->pmu[j]->fmt->freq = 1; else cfg->pmu[j]->fmt->freq = 0; - if((hex & 0x40) == 0x40 ) cfg->pmu[j]->fmt->analog = 1; else cfg->pmu[j]->fmt->analog = 0; - if((hex & 0x20) == 0x20) cfg->pmu[j]->fmt->phasor = 1; else cfg->pmu[j]->fmt->phasor = 0; - if((hex & 0x10) == 0x10) cfg->pmu[j]->fmt->polar = 1; else cfg->pmu[j]->fmt->polar = 0; - - //SEPARATE PHASORS - copy_cbyc (phnmr,(unsigned char *)s,2); - phnmr[2]='\0'; - cfg->pmu[j]->phnmr = to_intconvertor(phnmr); - printf("Phasors %d\n",cfg->pmu[j]->phnmr); - s = s + 2; - cfglen += 2; - - //SEPARATE ANALOGS - copy_cbyc (annmr,(unsigned char *)s,2); - annmr[2]='\0'; - cfg->pmu[j]->annmr = to_intconvertor(annmr); - printf("Analogs %d\n",cfg->pmu[j]->annmr); - s = s + 2; - cfglen += 2; - - //SEPARATE DIGITALS - copy_cbyc (dgnmr,(unsigned char *)s,2); - dgnmr[2]='\0'; - cfg->pmu[j]->dgnmr = to_intconvertor(dgnmr); - printf("Digitals %d\n",cfg->pmu[j]->dgnmr); - s = s + 2; - cfglen += 2; - - cn = malloc(sizeof(struct channel_names)); - cn->first = NULL; - - ////SEPARATE PHASOR NAMES - if(cfg->pmu[j]->phnmr != 0){ - cn->phtypes = malloc((cfg->pmu[j]->phnmr) * sizeof(unsigned char*)); - cn->phnames = malloc((cfg->pmu[j]->phnmr) * sizeof(char*)); - if(!cn->phnames) { - printf("Not enough memory cfg->pmu[j]->cn->phnames[][]\n"); - exit(1); - } - - for (i = 0; i < cfg->pmu[j]->phnmr; i++) { - - cn->phnames[i] = malloc(17*sizeof(char)); - memset(cn->phnames[i],'\0',17); - cn->phtypes[i] = malloc(2*sizeof(unsigned char)); - memset(cn->phtypes[i],'\0',2); - - } - - cfg->pmu[j]->phunit = malloc(cfg->pmu[j]->phnmr*sizeof(float*)); - if(!cfg->pmu[j]->phunit) { - printf("Not enough memory cfg.pmu[j]->phunit[][]\n"); - exit(1); - } - - for (i = 0; i < cfg->pmu[j]->phnmr; i++) { - cfg->pmu[j]->phunit[i] = malloc(sizeof(float)); - } - - - i = 0;//Index for PHNAMES - while(ipmu[j]->phnmr){ - - copy_cbyc (cn->phnames[i],(unsigned char *)s,16); - cn->phnames[i][16] = '\0'; - printf("Phnames %s\n",cn->phnames[i]); - s = s + 16; - cfglen += 16; - i++; - } - } - - //SEPARATE ANALOG NAMES - if(cfg->pmu[j]->annmr != 0){ - cn->antypes = malloc((cfg->pmu[j]->annmr)*sizeof(unsigned char*)); - cn->angnames = malloc((cfg->pmu[j]->annmr)*sizeof(char*)); - if(!cn->angnames) { - - printf("Not enough memory cfg->pmu[j]->cn->phnames[][]\n"); - exit(1); - } - - for (i = 0; i < cfg->pmu[j]->annmr; i++) { - - cn->angnames[i] = malloc(17*sizeof(char)); - memset(cn->angnames[i],'\0',17); - cn->antypes[i] = malloc(5*sizeof(unsigned char)); - memset(cn->antypes[i],'\0',5); - } - - cfg->pmu[j]->anunit = malloc(cfg->pmu[j]->annmr*sizeof(float*)); - if(!cfg->pmu[j]->anunit) { - printf("Not enough memory cfg.pmu[j]->anunit[][]\n"); - exit(1); - } - - for (i = 0; i < cfg->pmu[j]->annmr; i++) { - cfg->pmu[j]->anunit[i] = malloc(sizeof(float)); - } - - i = 0;//Index for ANGNAMES - - while(ipmu[j]->annmr){ - copy_cbyc (cn->angnames[i],(unsigned char *)s,16); - cn->angnames[i][16]='\0'; - printf("ANGNAMES %s\n",cn->angnames[i]); - s = s + 16; - cfglen += 16; - i++; - } - } - - - if(cfg->pmu[j]->dgnmr != 0){ - - cfg->pmu[j]->dgunit = malloc(cfg->pmu[j]->dgnmr*sizeof(char*)); - if(!cfg->pmu[j]->dgunit) { - - printf("Not enough memory cfg->pmu[j]->dgunit[][]\n"); - exit(1); - } - - for (i = 0; i < cfg->pmu[j]->dgnmr; i++) { - - cfg->pmu[j]->dgunit[i] = malloc(5); - } - } - - int di; //Index for number of dgwords - struct dgnames *q; - i = 0; - - while(i < cfg->pmu[j]->dgnmr) { - - struct dgnames *temp1 = malloc(sizeof(struct dgnames)); - temp1->dgn = malloc(16*sizeof(unsigned char *)); - if(!temp1->dgn) { - - printf("Not enough memory temp1->dgn\n"); - exit(1); - } - - for (di = 0; di < 16; di++) { - - temp1->dgn[di] = malloc(17*sizeof(unsigned char)); - - } - - temp1->dg_next = NULL; - - for(dgchannels = 0;dgchannels < 16;dgchannels++){ - - memset(temp1->dgn[dgchannels],'\0',16); - copy_cbyc (temp1->dgn[dgchannels],(unsigned char *)s,16); - temp1->dgn[dgchannels][16] = '\0'; - s += 16; - cfglen += 16; - k = 0; - printf("%s\n",temp1->dgn[dgchannels]); - } - - if(cn->first == NULL){ - cn->first = q = temp1; - - } else { - - while(q->dg_next!=NULL){ - q = q->dg_next; - } - q->dg_next = temp1; - } - - i++; - } //DGWORD WHILE ENDS - - cfg->pmu[j]->cnext = cn;//Assign to pointers - - ///PHASOR FACTORS - if(cfg->pmu[j]->phnmr != 0){ - - i = 0; - while(i < cfg->pmu[j]->phnmr){ //Separate the Phasor conversion factors - - memset(buf,'\0',9); - copy_cbyc (buf,(unsigned char *)s,1); - buf[1] = '\0'; - s = s + 1; - cfglen += 1; - phtype = to_intconvertor1(buf); - copy_cbyc (buf,(unsigned char *)s,3); - buf[3] = '\0'; - s = s + 3; - cfglen += 3; - l_phunit = to_long_int_convertor1(buf); - - if (phtype == 0) - { - cfg->pmu[j]->cnext->phtypes[i] = "V"; - - if (cfg->pmu[j]->fmt->phasor == 0) - { - *cfg->pmu[j]->phunit[i] = l_phunit * 1e-5; - } - else - { - *cfg->pmu[j]->phunit[i] = 1; - } - } - else if (phtype == 1) - { - cfg->pmu[j]->cnext->phtypes[i] = "I"; - - if (cfg->pmu[j]->fmt->phasor == 0) - { - *cfg->pmu[j]->phunit[i] = l_phunit * 1e-5; - } - else - { - *cfg->pmu[j]->phunit[i] = 1; - } - } - else - { - perror("Invalid first byte in PHUNIT - probably error in PMU"); - } - - printf("Phasor Factor %d = %f\n",i,*cfg->pmu[j]->phunit[i]); - i++; - } - }//if for PHASOR Factors ends - - //ANALOG FACTORS - if(cfg->pmu[j]->annmr != 0){ - - i=0; - while(ipmu[j]->annmr){ //Separate the Phasor conversion factors - - memset(buf,'\0',9); - copy_cbyc (buf,(unsigned char *)s,1); - buf[1] = '\0'; - s = s + 1; - cfglen += 1; - - antype = to_intconvertor1(buf); - switch(antype) - { - case 0 : cfg->pmu[j]->cnext->antypes[i] = "POW"; - break; - case 1 : cfg->pmu[j]->cnext->antypes[i] = "RMS"; - break; - case 2 : cfg->pmu[j]->cnext->antypes[i] = "PEAK"; - break; - default: perror("Invalid first byte in ANUNIT?"); - break; - } - copy_cbyc (buf,(unsigned char *)s,3); - buf[3] = '\0'; - s = s + 3; - cfglen += 3; - l_anunit = to_long_int_convertor1(buf); - - if (cfg->pmu[j]->fmt->analog == 0) - { - *cfg->pmu[j]->anunit[i] = l_anunit * 1e-5; // Assumed factor of 1e5 in iPDC - } - else - { - *cfg->pmu[j]->anunit[i] = 1; - } - - printf("Analog Factor %d = %f\n",i,*cfg->pmu[j]->anunit[i]); - i++; - } - - } // if for ANALOG FActtors ends - - ///INCOMPLETE - if(cfg->pmu[j]->dgnmr != 0){ - - i = 0; - while(i < cfg->pmu[j]->dgnmr ){ //Separate the Phasor conversion factors - - copy_cbyc(cfg->pmu[j]->dgunit[i],s,4); - cfg->pmu[j]->dgunit[i][4] = '\0'; - printf("DGWORD %s\n",cfg->pmu[j]->dgunit[i]); - s += 4; - cfglen += 4; - i++; - } - } //if for Digital Words FActtors ends - - copy_cbyc (fnom,(unsigned char *)s,2); - fnom[2]='\0'; - cfg->pmu[j]->fnom = to_intconvertor(fnom); - printf("FREQUENCY %d\n",cfg->pmu[j]->fnom); - s = s + 2; - cfglen += 2; - - copy_cbyc (cfg_cnt,(unsigned char *)s,2); - cfg_cnt[2] = '\0'; - cfg->pmu[j]->cfg_cnt = to_intconvertor(cfg_cnt); - printf("CFG CHANGE COUNT %d\n",cfg->pmu[j]->cfg_cnt); - s = s + 2; - cfglen += 2; - j++; - }//While for PMU number ends - - copy_cbyc (data_rate,(unsigned char *)s,2); - data_rate[2] = '\0'; - cfg->data_rate = to_intconvertor(data_rate); - printf("Data Rate %d\n",cfg->data_rate); - s += 2; - cfglen += 2; - cfg->cfgnext = NULL; - - // Adjust the configuration object pointers - // Lock the mutex_cfg - pthread_mutex_lock(&mutex_cfg); - - if (cfgfirst == NULL) { // Main if - - cfgfirst = cfg; - - } else { - - struct cfg_frame *temp_cfg = cfgfirst; - - //Check if the configuration frame already exists - while(temp_cfg->cfgnext != NULL){ - - temp_cfg = temp_cfg->cfgnext; - - }// While ends - temp_cfg->cfgnext = cfg; - - } //Main if - - pthread_mutex_unlock(&mutex_cfg); - pthread_mutex_unlock(&mutex_file); - - free(sync); - free(frame_size); - free(idcode_h); - free(soc); - free(fracsec); - free(time_base); - free(num_pmu); - free(stn); - free(idcode_l); - free(format); - free(phnmr); - free(annmr); - free(dgnmr); - free(fnom); - free(cfg_cnt); - free(data_rate); - free(buf); -} - -/**************************************** End of File *******************************************************/ diff --git a/DBServer/recreate.h b/DBServer/recreate.h deleted file mode 100755 index 763cd99..0000000 --- a/DBServer/recreate.h +++ /dev/null @@ -1,38 +0,0 @@ -/* ----------------------------------------------------------------------------- - * recreate.c - * - * iPDC - Phasor Data Concentrator - * - * Copyright (C) 2011 Nitesh Pandit - * Copyright (C) 2011 Kedar V. Khandeparkar - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * Authors: - * Nitesh Pandit - * Kedar V. Khandeparkar - * - * ----------------------------------------------------------------------------- */ - - -/* ---------------------------------------------------------------- */ -/* Function prototypes */ -/* ---------------------------------------------------------------- */ - -void recreate_cfg_objects(); - -void init_cfgparser(unsigned char []); - -/**************************************** End of File *******************************************************/