Contiki 2.5
api.h
Go to the documentation of this file.
1 /**
2  * \addtogroup agent
3  * @{
4  */
5 
6 /**
7  * \defgroup api Bundle Protocol API
8  *
9  * @{
10  */
11 
12 /**
13  * \file
14  * \brief uDTN API
15  * \author Georg von Zengen <vonzeng@ibr.cs.tu-bs.de>
16  * \author Wolf-Bastian Poettner <poettner@ibr.cs.tu-bs.de>
17  */
18 
19 #ifndef API_H
20 #define API_H
21 
22 #include "contiki.h"
23 
24 /**
25 * \brief Event to register a Service
26  */
28 /**
29 * \brief Event to delete a registration of a Service
30 */
32 /**
33 * \brief Event to chage a services state
34 */
36 /**
37 * \brief Event to send a created bundle
38 */
39 process_event_t dtn_send_bundle_event;
40 /**
41 * \brief Event submit received bundles to a registered service
42 */
44 /**
45  * \brief Event tell the agent that the service has finished processing a particular bundle
46  */
47 process_event_t dtn_processing_finished;
48 /**
49  * \brief Event tell the service, that the outgoing bundle has reached save grounds
50  */
51 process_event_t dtn_bundle_stored;
52 /**
53  * \brief Event tell the service, that the outgoing bundle could not be saved
54  */
55 process_event_t dtn_bundle_store_failed;
56 
57 #ifndef APP_ACTIVE
58 #define APP_ACTIVE 1
59 #endif
60 
61 #ifndef APP_PASSIVE
62 #define APP_PASSIVE 0
63 #endif
64 
65 /**
66  * \brief Struct for service registration
67  */
69  uint32_t app_id;
70  uint8_t status:1;
71  uint32_t node_id;
72  struct process *application_process;
73 };
74 
75 #endif /* API_H */
76 /** @} */