auto_bus/include/controller.h
2022-05-08 22:12:14 +08:00

39 lines
1.0 KiB
C
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// Created by ricardo on 2022/5/6.
//
#ifndef AUTO_PILOT_BUS_CONTROLLER_H
#define AUTO_PILOT_BUS_CONTROLLER_H
#include "rail.h"
#include "query.h"
/**
* å…ˆæ<CB86>¥å…ˆæœ<C3A6>务的ç­ç•¥æŽ§åˆ¶å‡½æ•°
* @param rails 轨é<C2A8>“链表
* @param up_queries 上车请求队列
* @param down_queries 下车请求队列
* @return 车å‰<C3A5>è¿çš„æ¹å<C2B9>
*/
int FCFSFunction(rail_node_t rails, up_bus_t up_queries, down_bus_t down_queries);
/**
* 朢ã短寻找时间优先的策略控制函数
* @param rails 轨é<C2A8>“链表
* @param up_queries 上车请求队列
* @param down_queries 下车请求队列
* @return 车å‰<C3A5>è¿çš„æ¹å<C2B9>
*/
int SSTFFunction(rail_node_t rails, up_bus_t up_queries, down_bus_t down_queries);
/**
* 顺便æœ<C3A6>务的ç­ç•¥æŽ§åˆ¶å‡½æ•„1¤7
* @param rails 轨é<C2A8>“链表
* @param up_queries 上车请求队列
* @param down_queries 下车请求队列
* @return 车å‰<C3A5>è¿çš„æ¹å<C2B9>
*/
int SCANFunction(rail_node_t rails, up_bus_t up_queries, down_bus_t down_queries);
int add(int a,int b);
#endif //AUTO_PILOT_BUS_CONTROLLER_H