yct 3 tahun lalu
induk
melakukan
7849d33957

+ 3 - 1
CMakeLists.txt

@@ -46,6 +46,7 @@ target_link_libraries(parkspace_test
         nnxx
         nanomsg
         ${PROTOBUF_LIBRARIES}
+        ${PCL_LIBRARIES}
         /usr/local/lib/libglog.a
         /usr/local/lib/libgflags.a
         libmysqlcppconn.so
@@ -61,6 +62,7 @@ target_link_libraries(parkspace_client
         nnxx
         nanomsg
         ${PROTOBUF_LIBRARIES}
+        ${PCL_LIBRARIES}
         /usr/local/lib/libglog.a
         /usr/local/lib/libgflags.a
         )
@@ -77,4 +79,4 @@ target_link_libraries(parkspace_client
 #        /usr/local/lib/libglog.a
 #        /usr/local/lib/libgflags.a
 #        libmysqlcppconn.so pthread
-#        )
+#        )

+ 2 - 2
communication/communication.pb.h

@@ -8,12 +8,12 @@
 
 #include <google/protobuf/stubs/common.h>
 
-#if GOOGLE_PROTOBUF_VERSION < 3006000
+#if GOOGLE_PROTOBUF_VERSION < 3006001
 #error This file was generated by a newer version of protoc which is
 #error incompatible with your Protocol Buffer headers.  Please update
 #error your headers.
 #endif
-#if 3006000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#if 3006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
 #error This file was generated by an older version of protoc which is
 #error incompatible with your Protocol Buffer headers.  Please
 #error regenerate this file with a newer version of protoc.

+ 2 - 2
message/message_base.pb.h

@@ -8,12 +8,12 @@
 
 #include <google/protobuf/stubs/common.h>
 
-#if GOOGLE_PROTOBUF_VERSION < 3006000
+#if GOOGLE_PROTOBUF_VERSION < 3006001
 #error This file was generated by a newer version of protoc which is
 #error incompatible with your Protocol Buffer headers.  Please update
 #error your headers.
 #endif
-#if 3006000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#if 3006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
 #error This file was generated by an older version of protoc which is
 #error incompatible with your Protocol Buffer headers.  Please
 #error regenerate this file with a newer version of protoc.

+ 2 - 2
message/parkspace_allocation_message.pb.h

@@ -8,12 +8,12 @@
 
 #include <google/protobuf/stubs/common.h>
 
-#if GOOGLE_PROTOBUF_VERSION < 3006000
+#if GOOGLE_PROTOBUF_VERSION < 3006001
 #error This file was generated by a newer version of protoc which is
 #error incompatible with your Protocol Buffer headers.  Please update
 #error your headers.
 #endif
-#if 3006000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#if 3006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
 #error This file was generated by an older version of protoc which is
 #error incompatible with your Protocol Buffer headers.  Please
 #error regenerate this file with a newer version of protoc.

+ 2 - 2
parkspace_allocation/database_communication_configuration.pb.h

@@ -8,12 +8,12 @@
 
 #include <google/protobuf/stubs/common.h>
 
-#if GOOGLE_PROTOBUF_VERSION < 3006000
+#if GOOGLE_PROTOBUF_VERSION < 3006001
 #error This file was generated by a newer version of protoc which is
 #error incompatible with your Protocol Buffer headers.  Please update
 #error your headers.
 #endif
-#if 3006000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#if 3006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
 #error This file was generated by an older version of protoc which is
 #error incompatible with your Protocol Buffer headers.  Please
 #error regenerate this file with a newer version of protoc.

+ 1 - 0
parkspace_allocation/parkspace_communicator.cpp

@@ -88,6 +88,7 @@ Error_manager Parkspace_communicator::check_msg(Communication_message* p_msg)
 {
 	
     //通过 p_msg->get_message_type() 和 p_msg->get_receiver() 判断这条消息是不是车位请求消息.
+
     if(p_msg->get_receiver() == Communication_message::Communicator::eParkspace)
     {
         switch(p_msg->get_message_type())

+ 3 - 2
parkspace_allocation/parkspace_manager.cpp

@@ -349,8 +349,8 @@ void Parkspace_manager:: execute_for_allocate(message::Car_info car_info, int te
             {
                 t_error.set_error_code(PARKSPACE_ALLOCATOR_ALLOCATE_FAILED);
                 t_error.set_error_level(message::Error_level::MINOR_ERROR);
-                t_error.set_error_description(error.get_error_description());
-                LOG(INFO) << "  				分配车位失败,该单元无可供目标车辆停车的车位! ";
+                t_error.set_error_description(error.get_error_description().append("车辆类型:").append(std::to_string(t_car_type)));
+                LOG(INFO) << "  				分配车位失败,该单元无可供目标车辆停车的车位! 车辆类型:"<<t_car_type;
             }
             else
             {
@@ -443,6 +443,7 @@ void Parkspace_manager::execute_for_confirm_alloc(message::Parkspace_confirm_all
 		}
 		else
 		{
+            confirm_alloc_space_info.mutable_car_info()->CopyFrom(request.confirm_parkspace_info_ex(i).car_info());
 			error = confirm_alloc_function(confirm_alloc_space_info);
 			if ( error != SUCCESS )
 			{

+ 2 - 2
setting/communication.prototxt

@@ -8,7 +8,7 @@ communication_parameters
 #   connect_string_vector:"tcp://192.168.2.125:9876"
 #   connect_string_vector:"tcp://192.168.2.166:1234"
 
-    bind_string:"tcp://192.168.2.127:30008"
-    connect_string_vector:"tcp://192.168.2.127:30000"
+    bind_string:"tcp://192.168.1.233:30008"
+    connect_string_vector:"tcp://192.168.1.233:30000"
 }
 

+ 1 - 1
setting/database_communication.prototxt

@@ -13,7 +13,7 @@ database_communication_configurations
     db_ip:"127.0.0.1",
     db_port:3306,
     db_username:"zx",
-    db_passwd:"123456",
+    db_passwd:"zx123456",
     db_name:"chutian_parkspace",
     db_conn_pool_size:5
 }