auto_bus/include/query.h

49 lines
919 B
C
Raw Normal View History

2022-05-06 11:55:30 +08:00
//
// Created by ricardo on 2022/5/6.
//
#ifndef AUTO_PILOT_BUS_QUERY_H
#define AUTO_PILOT_BUS_QUERY_H
2022-05-13 11:41:00 +08:00
#include "stdlib.h"
2022-05-06 11:55:30 +08:00
#include "rail.h"
2022-05-17 20:22:29 +08:00
struct bus_query {
2022-05-06 11:55:30 +08:00
/**
2022-05-17 20:22:29 +08:00
*
2022-05-06 11:55:30 +08:00
*/
2022-05-17 20:22:29 +08:00
int time;
2022-05-06 11:55:30 +08:00
/**
2022-05-17 20:22:29 +08:00
*
2022-05-06 11:55:30 +08:00
*/
2022-05-17 20:22:29 +08:00
int type;
2022-05-06 11:55:30 +08:00
/**
2022-05-17 20:22:29 +08:00
* /
2022-05-06 11:55:30 +08:00
*/
2022-05-17 20:22:29 +08:00
rail_node_t node;
2022-05-13 11:41:00 +08:00
};
2022-05-06 11:55:30 +08:00
2022-05-17 20:22:29 +08:00
typedef struct bus_query bus_query_t;
2022-05-06 11:55:30 +08:00
/**
2022-05-17 20:22:29 +08:00
*
* @param query
* @param type
* @param node /
2022-05-06 11:55:30 +08:00
*/
2022-05-17 20:22:29 +08:00
void CreateQuery(bus_query_t query, int type, rail_node_t node);
2022-05-06 11:55:30 +08:00
/**
2022-05-17 20:22:29 +08:00
*
* @param query
* @param target_query
2022-05-06 11:55:30 +08:00
*/
2022-05-17 20:22:29 +08:00
void DeleteQuery(bus_query_t query, bus_query_t target_query);
2022-05-06 11:55:30 +08:00
/**
2022-05-17 20:22:29 +08:00
*
* @param queries
2022-05-06 11:55:30 +08:00
*/
2022-05-17 20:22:29 +08:00
void FreeQueries(bus_query_t queries);
2022-05-06 11:55:30 +08:00
#endif //AUTO_PILOT_BUS_QUERY_H