auto_bus/include/query.h

58 lines
1.0 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_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"
#include "define.h"
2022-05-06 11:55:30 +08:00
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
*/
rail_node_t *node;
/**
*
*/
struct bus_query *next_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
/**
*
*/
extern bus_query_t *queries;
/**
*
2022-05-17 20:22:29 +08:00
* @param type
* @param node /
* @return
2022-05-06 11:55:30 +08:00
*/
bus_query_t *CreateQuery(int type, rail_node_t *node);
2022-05-06 11:55:30 +08:00
/**
2022-05-17 20:22:29 +08:00
*
* @param target_query
2022-05-06 11:55:30 +08:00
*/
void DeleteQuery(bus_query_t *target_query);
2022-05-06 11:55:30 +08:00
/**
2022-05-17 20:22:29 +08:00
*
* @param head
2022-05-06 11:55:30 +08:00
*/
void FreeQueries(bus_query_t *head);
2022-05-06 11:55:30 +08:00
#endif //AUTO_PILOT_BUS_QUERY_H