root / trunk / code / projects / colonet / server / includes / PositionMonitor.h @ 550
History | View | Annotate | Download (831 Bytes)
1 | 436 | jknichel | /**
|
---|---|---|---|
2 | * @file PositionMonitor.h
|
||
3 | *
|
||
4 | * @author Jason Knichel
|
||
5 | *
|
||
6 | * @date 2/4/08
|
||
7 | */
|
||
8 | |||
9 | #ifndef POSITIONMONITOR_H
|
||
10 | #define POSITIONMONITOR_H
|
||
11 | |||
12 | 447 | emarinel | #include <map> |
13 | 436 | jknichel | #include <vision.h> |
14 | 449 | jknichel | using namespace std; |
15 | 436 | jknichel | |
16 | 447 | emarinel | using namespace std; |
17 | |||
18 | 436 | jknichel | class PositionMonitor { |
19 | public:
|
||
20 | 447 | emarinel | PositionMonitor(void);
|
21 | ~PositionMonitor(void);
|
||
22 | 436 | jknichel | |
23 | 508 | emarinel | void run(void); |
24 | 513 | emarinel | //int stopMonitoring(void);
|
25 | 447 | emarinel | int updatePositions(void); |
26 | 513 | emarinel | |
27 | 455 | emarinel | int assignRealId(int old_id, int real_id); |
28 | 447 | emarinel | map<int, VisionPosition> getAllRobotPositions(void); |
29 | 443 | emarinel | int getRobotPosition(int robot_id, int* xbuf, int* ybuf); |
30 | 518 | emarinel | int getNumVisibleRobots(void); |
31 | VisionPosition getFirstPosition(void);
|
||
32 | 443 | emarinel | |
33 | 436 | jknichel | private:
|
34 | 449 | jknichel | map<int, VisionPosition> positionMap;
|
35 | 534 | jknichel | map<int, int> deleteBufferMap; |
36 | 458 | jknichel | bool isProbablySameRobot(VisionPosition p1, VisionPosition p2);
|
37 | int newIdToAssign;
|
||
38 | 508 | emarinel | pthread_mutex_t position_map_lock; |
39 | 436 | jknichel | }; |
40 | |||
41 | #endif |