瀏覽代碼

合并分支

zzj 6 年之前
父節點
當前提交
c245978370
共有 11 個文件被更改,包括 23 次插入3724 次删除
  1. 16 16
      Makefile
  2. 2 2
      Makefile.am
  3. 0 1290
      Makefile.in
  4. 二進制
      a.out
  5. 0 178
      c2.cpp
  6. 0 1181
      config.log
  7. 0 1057
      config.status
  8. 二進制
      db_api.tar
  9. 5 0
      message.h
  10. 二進制
      tar.tar.gz
  11. 二進制
      visit

+ 16 - 16
Makefile

@@ -150,20 +150,20 @@ distuninstallcheck_listfiles = find . -type f -print
 am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
   | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
 distcleancheck_listfiles = find . -type f -print
-ACLOCAL = ${SHELL} /home/lemon/resource/ya-serv/missing --run aclocal-1.12
+ACLOCAL = ${SHELL} /home/zzj/ya-src/ya-serv/missing --run aclocal-1.12
 AMTAR = $${TAR-tar}
-AUTOCONF = ${SHELL} /home/lemon/resource/ya-serv/missing --run autoconf
-AUTOHEADER = ${SHELL} /home/lemon/resource/ya-serv/missing --run autoheader
-AUTOMAKE = ${SHELL} /home/lemon/resource/ya-serv/missing --run automake-1.12
+AUTOCONF = ${SHELL} /home/zzj/ya-src/ya-serv/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/zzj/ya-src/ya-serv/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/zzj/ya-src/ya-serv/missing --run automake-1.12
 AWK = gawk
 CC = gcc
 CCDEPMODE = depmode=gcc3
-CFLAGS = -g -O2
+CFLAGS = -g
 CPP = gcc -E
 CPPFLAGS = 
 CXX = g++
 CXXDEPMODE = depmode=gcc3
-CXXFLAGS = -g -O2
+CXXFLAGS = -g
 CYGPATH_W = echo
 DEFS = 
 DEPDIR = .deps
@@ -180,9 +180,9 @@ INSTALL_SCRIPT = ${INSTALL}
 INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
 LDFLAGS = 
 LIBOBJS = 
-LIBS = -lzlog -lev 
+LIBS = -lev 
 LTLIBOBJS = 
-MAKEINFO = ${SHELL} /home/lemon/resource/ya-serv/missing --run makeinfo
+MAKEINFO = ${SHELL} /home/zzj/ya-src/ya-serv/missing --run makeinfo
 MKDIR_P = /bin/mkdir -p
 OBJEXT = o
 PACKAGE = yals
@@ -197,10 +197,10 @@ SET_MAKE =
 SHELL = /bin/sh
 STRIP = 
 VERSION = 1.0
-abs_builddir = /home/lemon/resource/ya-serv
-abs_srcdir = /home/lemon/resource/ya-serv
-abs_top_builddir = /home/lemon/resource/ya-serv
-abs_top_srcdir = /home/lemon/resource/ya-serv
+abs_builddir = /home/zzj/ya-src/ya-serv
+abs_srcdir = /home/zzj/ya-src/ya-serv
+abs_top_builddir = /home/zzj/ya-src/ya-serv
+abs_top_srcdir = /home/zzj/ya-src/ya-serv
 ac_ct_CC = gcc
 ac_ct_CXX = g++
 am__include = include
@@ -220,7 +220,7 @@ host_alias =
 htmldir = ${docdir}
 includedir = ${prefix}/include
 infodir = ${datarootdir}/info
-install_sh = ${SHELL} /home/lemon/resource/ya-serv/install-sh
+install_sh = ${SHELL} /home/zzj/ya-src/ya-serv/install-sh
 libdir = ${exec_prefix}/lib
 libexecdir = ${exec_prefix}/libexec
 localedir = ${datarootdir}/locale
@@ -229,7 +229,7 @@ mandir = ${datarootdir}/man
 mkdir_p = $(MKDIR_P)
 oldincludedir = /usr/include
 pdfdir = ${docdir}
-prefix = /usr/local
+prefix = /home/zzj/ya-src/ya-serv/../dist
 program_transform_name = s,x,x,
 psdir = ${docdir}
 sbindir = ${exec_prefix}/sbin
@@ -247,8 +247,8 @@ 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.cpp  site_area.h area.h area.cpp
 
-AM_CPPFLAGS = -Wall -pthread -m64 -std=c++11 -fPIC -I${prefix}/include -I./src -I$(prefix)/mysql/include -I../include/websocketpp -I../include
-AM_LDFLAGS = -Wall -pthread -m64 -std=c++11 -fPIC -L${prefix}/lib  -L$(prefix)/mysql/lib
+AM_CPPFLAGS = -Wall -pthread -m64 -std=c++11 -fPIC -I${prefix}/include -I./src -I/usr/local/mysql/include -I../include/websocketpp -I../include
+AM_LDFLAGS = -Wall -pthread -m64 -std=c++11 -fPIC -L${prefix}/lib  -L/usr/local/mysql/lib
 yals_SOURCES = ${AM_SOURCES} main.cpp 
 yals_CPPFLAGS = ${AM_CPPFLAGS} 
 yals_LDFLAGS = ${AM_LDFLAGS}  -lzlog -lrt -lboost_system -lboost_thread -lmysqlclient

+ 2 - 2
Makefile.am

@@ -9,8 +9,8 @@ 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.cpp  site_area.h area.h area.cpp
 
-AM_CPPFLAGS=-Wall -pthread -m64 -std=c++11 -fPIC -I${prefix}/include -I./src -I$(prefix)/mysql/include -I../include/websocketpp -I../include
-AM_LDFLAGS= -Wall -pthread -m64 -std=c++11 -fPIC -L${prefix}/lib  -L$(prefix)/mysql/lib
+AM_CPPFLAGS=-Wall -pthread -m64 -std=c++11 -fPIC -I${prefix}/include -I./src -I/usr/local/mysql/include -I../include/websocketpp -I../include
+AM_LDFLAGS= -Wall -pthread -m64 -std=c++11 -fPIC -L${prefix}/lib  -L/usr/local/mysql/lib
 
 yals_SOURCES=${AM_SOURCES} main.cpp 
 yals_CPPFLAGS=${AM_CPPFLAGS} 

File diff suppressed because it is too large
+ 0 - 1290
Makefile.in


二進制
a.out


+ 0 - 178
c2.cpp

@@ -1,178 +0,0 @@
-
-struct area
-{
-	uint32_t    m_id;
-	std::string m_name;
-	std::atomic<int> m_card_count;
-
-	int id();
-	std::string name();
-	int  get_card_count();
-
-	double get_limit_speed();
-	double get_limit_time_second();
-	double get_limit_card_count();
-
-
-	virtual int type()=0;//site:0,normal:1
-
-	void inc_card_count(int deta)
-	{
-	}
-
-	virtual void on_hover(int card_id,const point&pt)=0;
-	virtual void on_enter(int card_id,std::shared_ptr<area> prev,const point&pt)=0;
-	virtual void on_leave(int card_id,std::shared_ptr<area> next,const point&pt)=0;
-
-	virtual ~area(){}
-};
-
-struct normal_area:area
-{
-	std::vector<point> m_bound;
-};
-
-struct site_area:area
-{
-	int32_t   m_site_id;
-};
-
-struct area_main
-{
-	std::vector<std::shared_ptr<area>> m_normal_list,m_site_list;
-
-	std::shared_ptr<area> get_site_area(int site_id);
-
-	std::shared_ptr<area> get_normal_area(int id);
-	std::vector<std::shared_ptr<area>> get_normal_area(const point&pt);
-
-	static std::shared_ptr<area_main> instance();
-};
-
-struct area_hover
-{
-	std::shared_ptr<area>  m_area;
-	time_t m_enter_time,m_last_time;
-
-	void reset()
-	{
-		m_last_time=time(0);
-	}
-
-	void reset(std::shared_ptr<area> a, time_t enter_time=0)
-	{
-		m_area=a;
-		if(enter_time) 
-		{
-			m_enter_time=m_last_time=enter_time;
-		}
-		else
-		{
-			m_last_time=time(0);
-		}
-	}
-
-	bool operator == (const area_hover&o)const
-	{
-		return m_area->id()==o->m_area->id();
-	}
-	bool operator < (const area_hover&o)const
-	{
-		return m_area->id()<o->m_area->id();
-	}
-};
-
-struct card_area_tool
-{
-	area_hover m_site;
-	std::vector<area_hover> m_normal;
-	point  m_last_point;
-
-	void on_point(int card_id,int site_id,const point&pt,double speed)
-	{
-		//处理分站类型的区域
-		std::shared_ptr<area> a=area_main::instance()->get_site_area(site_id);
-		if(pt.empty())//解算前
-		{
-			if(m_site==nullptr)
-			{
-				a->on_enter(card_id,nullptr);
-			}
-			else
-			{
-				if(*m_site==*a) { }
-				else//离开分站范围,进入新的分站范围
-				{
-					m_site->on_leave(card_id,a);
-					a->on_enter(card_id,m_site);
-					m_site=a;
-				}
-			}
-			return;
-		}
-
-
-		std::vector<std::shared_ptr<area>> areas=get_normal_area(pt);//找出所有的区域
-		for(a:m_site-areas)//离开的区域
-		{
-			a.on_leave();
-			
-
-
-
-			area *a=area_main_inst->get_normal_area(pt);
-			on_site_area_point(a,card_id);
-		}
-	}
-
-	//插入进入新分站记录 //离开分站时更新记录//本版本只在数据库生成记录
-	void on_site_area_point(a,card_id,site_id,speed)
-	{
-		if(enter) do_att_biz(a,card_id);
-	}
-
-	//人卡考勤
-	void do_att_biz(a,card_id)
-	{
-	
-	
-	}
-
-	//生成卡进入区域、在区域活跃和离开区域的调用
-	void on_normal_area_point(a,card_id,pt,speed)
-	{
-		if(hover) do_hover_biz(a,card_id,pt,speed);
-		if(enter) do_enter_biz(a,card_id,pt,speed);
-	}
-
-	//检测是否超时
-	void on_timer(card_id)
-	{
-	
-	}
-
-	void do_hover_biz(a,card_id,pt,speed)
-	{
-		//区域超时超时检测
-		//区域超速检测
-		//电子围栏检测
-	}
-
-	void do_enter_biz(a,card_id,pt,speed)
-	{
-		//当前区域超员检测
-		//车卡考勤逻辑检测
-		//电子围栏检测
-	}
-};
-
-struct person_card:card
-{
-	card_area_tool*m_area_tool;
-
-	void on_point(int site_id,const point&pt,double speed)
-	{
-		m_area_tool->on_point(m_id,site_id,pt,speed);
-	}
-};
-

File diff suppressed because it is too large
+ 0 - 1181
config.log


File diff suppressed because it is too large
+ 0 - 1057
config.status


二進制
db_api.tar


+ 5 - 0
message.h

@@ -26,6 +26,11 @@ struct message_locinfo
 
 	void zero_this();
     void load(zistream&is,bool tdoa);
+
+	int64_t long_id()const 
+	{
+		return (((int64_t)m_card_type)<<32)|m_card_id;
+	}
 };
 
 //tdoa分站同步数据

二進制
tar.tar.gz


二進制
visit