Revision 334
added more docs
hltp.h | ||
---|---|---|
1 | 1 |
#ifndef HLTP_H_INCLUDED |
2 | 2 |
#define HLTP_H_INCLUDED |
3 | 3 |
|
4 |
/** |
|
5 |
* @defgroup hltp hltp |
|
6 |
* @ingroup nctp |
|
7 |
* @brief HLTP (High-Level Transfer Protocol) module. |
|
8 |
* |
|
9 |
* @{ |
|
10 |
*/ |
|
11 |
|
|
4 | 12 |
#include "uart.h" |
5 | 13 |
#include "proj_structures.h" |
6 | 14 |
|
... | ... | |
12 | 20 |
hltp_type_bullet = 0x42 |
13 | 21 |
} hltp_type; |
14 | 22 |
|
23 |
/** |
|
24 |
* @brief Send string. |
|
25 |
* @param p Pointer to string to be sent |
|
26 |
* @return SUCCESS if operation was successful, other value otherwise |
|
27 |
*/ |
|
15 | 28 |
int hltp_send_string(const char *p); |
29 |
/** |
|
30 |
* @brief Send host_info. |
|
31 |
* @param p Pointer to host_info to be sent |
|
32 |
* @return SUCCESS if operation was successful, other value otherwise |
|
33 |
*/ |
|
16 | 34 |
int hltp_send_host_info(const host_info_t *p); |
35 |
/** |
|
36 |
* @brief Send remote_info. |
|
37 |
* @param p Pointer to remote_info to be sent |
|
38 |
* @return SUCCESS if operation was successful, other value otherwise |
|
39 |
*/ |
|
17 | 40 |
int hltp_send_remote_info(const remote_info_t *p); |
41 |
/** |
|
42 |
* @brief Send bullet_info. |
|
43 |
* @param p Pointer to bullet_info to be sent |
|
44 |
* @return SUCCESS if operation was successful, other value otherwise |
|
45 |
*/ |
|
18 | 46 |
int hltp_send_bullet_info(const bullet_info_t *p); |
47 |
/** |
|
48 |
* @brief Interpret message received as one of the structs HLTP knows. |
|
49 |
* @param p Pointer to beginning of message |
|
50 |
* @param sz Size of message |
|
51 |
* @param dest Pointer to void*, to where the interpreted message will be saved |
|
52 |
* @return Code of the interpreted message |
|
53 |
*/ |
|
19 | 54 |
hltp_type hltp_interpret(const uint8_t *p, const size_t sz, void **dest); |
55 |
|
|
56 |
/** |
|
57 |
* @} |
|
58 |
*/ |
|
59 |
|
|
20 | 60 |
#endif //HLTP_H_INCLUDED |
Also available in: Unified diff