auto_bus/include/rail.h

63 lines
1.2 KiB
C
Raw Normal View History

#ifndef AUTO_PILOT_BUS_RAIL_H
#define AUTO_PILOT_BUS_RAIL_H
2022-05-13 11:41:00 +08:00
#include "stdlib.h"
2022-05-13 11:41:00 +08:00
struct rail_node {
/**
*
*/
int id;
/**
*
*/
int last_node_distance;
/**
*
*/
int next_node_distance;
/**
*
*/
struct rail_node* last_node;
/**
*
*/
struct rail_node* next_node;
2022-05-13 11:41:00 +08:00
};
/**
*
*/
typedef struct rail_node rail_node_t;
/**
*
*/
2022-05-17 20:22:29 +08:00
extern rail_node_t *rails;
2022-05-06 11:55:30 +08:00
/**
*
* @param head
2022-05-06 11:55:30 +08:00
* @param id
* @return
*/
rail_node_t *FindNode(rail_node_t *head, int id);
2022-05-17 20:22:29 +08:00
/**
*
* @param length
* @param node_num
* @return
*/
rail_node_t *CreateRails(int length, int node_num);
/**
*
* @param railNode
*/
void FreeRails(rail_node_t railNode);
2022-05-06 11:55:30 +08:00
int add(int a, int b);
#endif //AUTO_PILOT_BUS_RAIL_H