auto_bus/include/controller.h

76 lines
1.6 KiB
C
Raw Normal View History

2022-05-06 11:55:30 +08:00
//
// Created by ricardo on 2022/5/6.
//
#ifndef AUTO_PILOT_BUS_CONTROLLER_H
#define AUTO_PILOT_BUS_CONTROLLER_H
2022-05-17 20:22:29 +08:00
#include "stdlib.h"
2022-05-06 11:55:30 +08:00
#include "rail.h"
#include "query.h"
2022-05-17 20:22:29 +08:00
#include "bus.h"
/**
*
*/
extern int BUS_TIME;
/**
*
*/
extern bus_query_t *target_query;
/**
*
*/
void AddTime();
2022-05-06 11:55:30 +08:00
/**
2022-05-17 20:22:29 +08:00
*
* @param bus
* @param queries
* @return
2022-05-06 11:55:30 +08:00
*/
2022-05-17 20:22:29 +08:00
int FCFSDirection(bus_t bus, bus_query_t queries);
2022-05-06 11:55:30 +08:00
/**
2022-05-17 20:22:29 +08:00
*
* @param bus
* @param queries
* @return
2022-05-06 11:55:30 +08:00
*/
2022-05-17 20:22:29 +08:00
bus_query_t FCFSQuery(bus_t bus, bus_query_t queries);
2022-05-06 11:55:30 +08:00
/**
2022-05-17 20:22:29 +08:00
*
* @param bus
* @param queries
* @return
2022-05-06 11:55:30 +08:00
*/
2022-05-17 20:22:29 +08:00
int SSTFDirection(bus_t bus, bus_query_t queries);
2022-05-06 11:55:30 +08:00
2022-05-17 20:22:29 +08:00
/**
*
* @param bus
* @param queries
* @return
*/
bus_query_t SSTFQuery(bus_t bus, bus_query_t queries);
/**
* 便
* @param bus
* @param queries
* @return
*/
int SCANDirection(bus_t bus, bus_query_t queries);
/**
* 便
* @param bus
* @param queries
* @return
*/
bus_query_t SCANQuery(bus_t bus, bus_query_t queries);
2022-05-06 11:55:30 +08:00
#endif //AUTO_PILOT_BUS_CONTROLLER_H