CentralManagerService.cpp 2.23 KB
Newer Older
bucyril's avatar
bucyril committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//    The service that manages the context of the student groups.
//    Copyright (C) 2017  Cyrill Burgener, Marco Mueller, Philipp Friedli
//
//    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 3 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, see <http://www.gnu.org/licenses/>.

17
#include <stdlib.h>
bucyril's avatar
bucyril committed
18
19
#include "ros/ros.h"
#include "d_fall_pps/CentralManager.h"
20
21
#include "d_fall_pps/CrazyflieContext.h"
#include "d_fall_pps/CrazyflieDB.h"
22
23
24
25
26

#include "d_fall_pps/CMRead.h"
#include "d_fall_pps/CMQuery.h"
#include "d_fall_pps/CMUpdate.h"
#include "d_fall_pps/CMCommand.h"
bucyril's avatar
bucyril committed
27
28

using namespace d_fall_pps;
29
using namespace std;
bucyril's avatar
bucyril committed
30

31
32
33
34
35
36
37
38
39
//reads crazyflie db from the file specified in params
/*CrazyflieDB readCrazyflieDB() {
	return 0;
}*/

//writes crazyflie db to the file specified in params
void writeCrazyflieDB(CrazyflieDB& cfDB) {

}
40
41

bool cmRead(CMRead::Request &request, CMRead::Response &response) {
bucyril's avatar
bucyril committed
42

phfriedl's avatar
phfriedl committed
43
44
	return true;
}
bucyril's avatar
bucyril committed
45

46
bool cmQuery(CMQuery::Request &request, CMQuery::Response &response) {
bucyril's avatar
bucyril committed
47

48
49
	return true;
}
bucyril's avatar
bucyril committed
50

51
bool cmUpdate(CMUpdate::Request &request, CMUpdate::Response &response) {
bucyril's avatar
bucyril committed
52

53
	return true;
54
55
56
57
58
59
}

bool cmCommand(CMCommand::Request &request, CMCommand::Response &response) {

	return true;
}
bucyril's avatar
bucyril committed
60
61
62
63
64
65

int main(int argc, char* argv[]) {
    ros::init(argc, argv, "CentralManagerService");

    ros::NodeHandle nodeHandle("~");

66
67
68
69
70
    ros::ServiceServer readService = nodeHandle.advertiseService("Read", cmRead);
    ros::ServiceServer queryService = nodeHandle.advertiseService("Query", cmQuery);
    ros::ServiceServer updateService = nodeHandle.advertiseService("Update", cmUpdate);
    ros::ServiceServer commandService = nodeHandle.advertiseService("Command", cmCommand);

bucyril's avatar
bucyril committed
71
72
73
74
75
    ROS_INFO("CentralManagerService ready");
    ros::spin();

    return 0;
}