From 053ea80067be51c3449675e2fde64e6bb6e0a232 Mon Sep 17 00:00:00 2001 From: jackfiled Date: Thu, 12 May 2022 15:32:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BA=86=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E5=8F=98=E9=87=8F=E7=9A=84=E6=B3=A8=E9=87=8A=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E4=BA=86=E6=A6=82=E8=A6=81=E8=AE=BE=E8=AE=A1=E4=B9=A6?= =?UTF-8?q?=E7=9A=84=E7=94=BB=E5=9B=BE=E6=96=87=E6=A1=A3=20=E5=AE=8C?= =?UTF-8?q?=E5=96=84=E4=BA=86.gitignore?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 10 +++++++++- docs/概要设计书/auto_pilot_bus.drawio | 1 + docs/概要设计书/模块结构图.png | Bin 0 -> 12299 bytes include/bus_io.h | 9 +++------ include/query.h | 7 +++++++ include/rail.h | 3 +++ test/io_test.cpp | 5 +++++ 7 files changed, 28 insertions(+), 7 deletions(-) create mode 100644 docs/概要设计书/auto_pilot_bus.drawio create mode 100644 docs/概要设计书/模块结构图.png diff --git a/.gitignore b/.gitignore index a7ac0f8..eaac8ba 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,11 @@ +# 项目的构建文件夹 build/ + +# VSCode的配置文件夹 .vscode/ -.idea/ \ No newline at end of file + +# CLion的配置文件夹 +.idea/ + +# draw.io的缓存文件 +*.bkp \ No newline at end of file diff --git a/docs/概要设计书/auto_pilot_bus.drawio b/docs/概要设计书/auto_pilot_bus.drawio new file mode 100644 index 0000000..20f548a --- /dev/null +++ b/docs/概要设计书/auto_pilot_bus.drawio @@ -0,0 +1 @@ +7VhNc5swEP01HJsBhGl8bGy3PbQznTozbU8d1WxAGYGIELHpr68UVgbZ8UfGTsK0PVn7tJKW95ZnDR6Z5KsPkpbZZ5EA90I/WXlk6oVh4JNL/WOQpkXiKGiBVLKkhfwOmLPfYFciWrMEKsRaSAnBFStdcCGKAhbKwaiUYumm3QieOEBJU3DKMMB8QTlspX1jicoQjf1e+kdgaYZHj+1ETm0yAlVGE7HsQWTmkYkUQrWjfDUBbshzeXm/Y3ZdmIRCHbPg+maS1mnz9Srnd9nsdppW8vpNjLWpxj4wJPr5MRRSZSIVBeWzDr2Soi4SMLv6OupyPglRajDQ4C0o1aCYtFZCQ5nKOc7qgmXz3ay/GNnwB273EExXTtRg1NZqCtxJAUKVqOUC9jy3bSUqU1B78sK1ULrDQeSg69HrJHCq2L1bB8VWS9d5uPSdlLTpJZSCFarq7fzFADoB3xoSj9sd8Z0JI0dZPWh3tFGvtA56UP8JnXD5vxP2dgI5sRN66j1dHNz3nvIaT/LCmCtDphmlZpRTVlwsLK6P6aa2pO2EMyosM6ZgXtIHnpbax12R8GyQClb76d6mBxdE0UZHW3tf9jzVGmXWs9PYfy5Gw3+038/iaFuWFbx1BY7CDeHa9wtXbWh3BvcKxq8h57llOcKGAv9E/U56a9Z3mb+e5h1+9kI077Z7Yj1dX3iVFJyDdE2fDMb0SeB6AgkfMX3/EdMfPZfpkyN4/VVXP5kYKqexPzROx0dweleDbIZKaRDs+Ot6NUrt5ehQnw6VURJGBxkdvyihe+7Pa9okZXyojI78wz16JkZ12H2TaK9n3ZcdMvsD \ No newline at end of file diff --git a/docs/概要设计书/模块结构图.png b/docs/概要设计书/模块结构图.png new file mode 100644 index 0000000000000000000000000000000000000000..53c6405f4d42054b1d7ced9643b92315fd589dd9 GIT binary patch literal 12299 zcmeHt2T;?|)@O)ODHe*TG-(1NEg^&ehTdy{5SnxnTIfA=5D=B3QUsKMsPv-rCPfA5 zh=7QIs0d0^=~BeK(f8)P@0;D(ot@p8ot_Jp=+d zuC1kJ41qwg5D3j-+9P0Oclpo`c%$(%)>MI1400|&Acyt+)y@4qf}LF5i4Xy#>fa{; zNw|xbpT7W7O+Zpo-JR&@@9X6W9>KVW7s1uZ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teYxid!!=?3 z{PR>1*WXnH=Ok|LI`Umfi>x&Y>#X>-#4IKI(yB72e;_8j`oMa>ez|qHrx&MH3#tM_ zc(ymPZu7-s@vHCOzeiM?sF}Ebn)NuxIfR*$$aYWfUEvZ|7?TQp`q6iIYRP`M=Gn!b zAJxO7MLEZ3JCo|zI+l;5t{fJXRKbmRPgih$e`1@ zXK8Uy<7DG_IEGa6sd5uuftAtrIRXOWsa%bpO$NKh&0UdH8?{ zICe+M2Y1c9)>{Z{wCl^`{BUJB_8)$|O{6H6!fpm#;XO9rb7=IUDsbKR3;o2|J1nk7 zS)X#Vx+)LW?+QsJz1OYoC>3gOvi zLGd~b0#l#_(F)5bNt8{zX`^HD zs&9)5rpcaS{iXT&j_ zsrob;-hYwbcfjO%f30CsZr8+UFsc{4BJNYd5MY=l1i@7sQ|Lgp}Z*S?ayG=MB#9dyOb=2SE6^#49|TCWa%>-B?r@aukvwz`2@ Jg^FFwe*?>#NxA?4 literal 0 HcmV?d00001 diff --git a/include/bus_io.h b/include/bus_io.h index 8bac72d..a140e72 100644 --- a/include/bus_io.h +++ b/include/bus_io.h @@ -35,18 +35,15 @@ rail_node_t* ReadConfigFile(); /** * 读取标准输入流中的输入 - * @param up_queries 上车的请求队列 - * @param down_queries 下车的请求队列 + * @param inputString 输入的字符串 * @return 当前读取的状态 */ -read_state_t ReadInput(up_bus_t* up_queries, down_bus_t* down_queries); +read_state_t ReadInput(char* inputString); /** * 打印当前的状态 - * @param up_queries 上车的请求队列 - * @param down_queries 下车的请求队列 * @param rails 轨道链表 */ -void PrintState(up_bus_t* up_queries, down_bus_t* down_queries, rail_node_t* rails); +void PrintState(); #endif //AUTO_PILOT_BUS_BUS_IO_H diff --git a/include/query.h b/include/query.h index bc1c6da..68c1c91 100644 --- a/include/query.h +++ b/include/query.h @@ -43,7 +43,14 @@ typedef struct up_bus up_bus_t; */ typedef struct down_bus down_bus_t; +/** + * 全局的上车请求链表头节点地址,也就是当前未处理的首个请求 + */ extern up_bus_t *up_queries; + +/** + * 全局的下车请求链表头节点地址,也就是当前未处理的首个请求 + */ extern down_bus_t *down_queries; /** diff --git a/include/rail.h b/include/rail.h index 02f237d..8f98f75 100644 --- a/include/rail.h +++ b/include/rail.h @@ -29,6 +29,9 @@ struct { */ typedef struct rail_node rail_node_t; +/** + * 全局的轨道链表头节点,也就是第一个公交站 + */ extern rail_node_t* rails; /** diff --git a/test/io_test.cpp b/test/io_test.cpp index 77a01a1..e9d404d 100644 --- a/test/io_test.cpp +++ b/test/io_test.cpp @@ -3,10 +3,15 @@ // #include "gtest/gtest.h" #include "gmock/gmock.h" +// 在C++中引用C语言中的函数 +#ifdef __cplusplus extern "C" { +#endif #include "rail.h" +#ifdef __cplusplus } +#endif using ::testing::Return; using ::testing::AtLeast;