完成了配置文件读取函数

添加了配置文件单元测试
配置文件读取函数单元测试完成
This commit is contained in:
2022-05-20 11:18:12 +08:00
parent 6095d0849b
commit bcff483797
8 changed files with 159 additions and 6 deletions

View File

@@ -7,6 +7,7 @@
#include "rail.h"
#include "query.h"
#include "define.h"
#include "controller.h"
#include "string.h"
#include "stdio.h"

View File

@@ -14,6 +14,10 @@
* 当前正在处理的请求
*/
extern bus_query_t *target_query;
/**
* 当前选择的策略
*/
extern int chosen_strategy;
/**
* 在先来先服务策略下应该前进的方向
@@ -25,5 +29,5 @@ int FCFSDirection();
* 在先来先服务策略下给出处理的请求
* @return 需要处理的请求
*/
bus_query_t FCFSQuery();
bus_query_t *FCFSQuery();
#endif //AUTO_PILOT_BUS_CONTROLLER_H

View File

@@ -14,5 +14,8 @@
#define IO_CLOCK 0 // 读取时钟指令
#define IO_READING 1 // 读取请求指令
#define IO_END 2 // 读取结束指令
#define BUS_FCFS 0 // 先来先服务
#define BUS_SSTF 1 // 最短寻找时间优先
#define BUS_SCAN 2 // 顺便服务
#endif //AUTO_PILOT_BUS_DEFINE_H