Browse Source

添加了一些区域的使用注释

zzj 6 years ago
parent
commit
8f7a633044
4 changed files with 9 additions and 3 deletions
  1. 1 1
      Makefile.am
  2. 2 1
      area.cpp
  3. 2 0
      area.h
  4. 4 1
      site_area.h

+ 1 - 1
Makefile.am

@@ -7,7 +7,7 @@ AM_SOURCES= $(SRC_IN) src/sio_client.cpp src/sio_socket.cpp src/internal/sio_cli
 select_tool.h select_tool.cpp line_fit.h line_fit.cpp card_path.h card_path.cpp loc_point.h loc_point.cpp ant.cpp ant.h card.cpp card.h clock.h \
 crc.cpp crc.h io_buf.h line.h loc_tool.cpp loc_tool.h message.cpp \
 message_file.h message.h net-service.cpp net-service.h point.cpp point.h tdoa_sync.cpp tdoa_sync.h \
-worker.cpp worker.h zio.h zloop.h znet.cpp znet.h zstream.h site_area_hover.cpp  site_area_hover.h 
+worker.cpp worker.h zio.h zloop.h znet.cpp znet.h zstream.h site_area.cpp  site_area.h area.h area.cpp
 
 AM_CPPFLAGS=-Wall -pthread -m64 -std=c++11 -fPIC -I${prefix}/include -I./src -I/usr/local/mysql/include
 AM_LDFLAGS= -Wall -pthread -m64 -std=c++11 -fPIC -L${prefix}/lib  -L$(prefix)/mysql/lib -L/usr/local/mysql/lib

+ 2 - 1
area.cpp

@@ -12,7 +12,8 @@ struct area_impl
 	{
 	}
 
-	void on_hover(int card_id,const point&pt)
+
+	void on_hover(int card_id,std::shared_ptr<area_hover>&c,double speed)
 	{
 	
 	}

+ 2 - 0
area.h

@@ -81,6 +81,8 @@ struct area_hover
 	}
 };
 
+//每张卡包含一个对象
+//在解析出数据点时,调用on_point
 struct area_tool
 {
 	std::vector<std::shared_ptr<area_hover>> m_clist;

+ 4 - 1
site_area.h

@@ -1,12 +1,15 @@
 #ifndef __SITE_AREA_HOVER_HPP__
 #define __SITE_AREA_HOVER_HPP__
 #include <point.h>
-//每张卡包含这样一个对象,保存最后一个分站区域
+//每张卡包含这样一个对象,保存最后一个分站区域;只有tof一维有这个需求
 //1、记录卡进出分站的时间,地点
 //2、用于考勤
 struct site_area_hover
 {
 	site_area_hover();
+	//调用时机:
+	//1、tof一维收到第一个数据点时,以pt=0调用
+	//2、数据点解析完毕之后调用
 	void on_point(int card_id,int site_id,const point*pt);
 private:
 	void enter_site(int card_id,int enter_site);