EVE 1.0
types.h
Go to the documentation of this file.
1 #ifndef EVE_TOC_TYPES_H_INCLUDED
2 #define EVE_TOC_TYPES_H_INCLUDED
3 /**********************************************************************/
4 /*
5  * Copyright (c) 2013-2015, Jetro AS
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without modification,
9  * are permitted provided that the following conditions are met:
10  *
11  * 1. Redistributions of source code must retain the above copyright notice,
12  * this list of conditions and the following disclaimer.
13  * 2. Redistributions in binary form must reproduce the above copyright notice,
14  * this list of conditions and the following disclaimer in the documentation
15  * and/or other materials provided with the distribution.
16  * 3. The name of the author may not be used to endorse or promote products
17  * derived from this software without specific prior written permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONRIBUTORS ``AS IS'' AND ANY EXPRESS
20  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
22  * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
24  * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
27  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
28  * OF SUCH DAMAGE.
29  *
30  * This file is part of the EVE platform.
31  */
32 
33 /**
34  * \file
35  * @brief TOC module basic types
36  *
37  * @author DT, Jetro AS
38  */ /******************************************************************/
39 
40 #include <ble_types.h>
41 
42 /**
43  * @addtogroup toc
44  * @{
45  */
46 
47 /**
48  * System part of segment types
49  *
50  * User code may extend the segments with own ones.
51  */
53 {
54  SEGMENT_NONE,
55  SEGMENT_RAM,
56  SEGMENT_COMMAND,
57  SEGMENT_SERVICES,
58  SEGMENT__SYSTEM_END = SEGMENT_SERVICES,
59 };
60 
61 /**
62  * TOC table with all the stuff
63  */
64 struct toc_blob_t
65 {
66  const struct toc_t *Toc; /**< Pointer to the toc table */
67  const char *StringPool; /**< Pointer to the string pool */
68  uint8_t Count; /**< Number of elements in the tables */
69 };
70 
71 /**
72  * User-defined context of file operations
73  */
74 struct app_file_context_t;
75 
76 /**
77  * System context of file operations
78  */
80 {
81  struct app_file_context_t *User; /**< User data */
82 };
83 
84 /**
85  * User-defined RAM segment, forward declaration of the structure
86  */
87 struct toc_data_t;
88 
89 /**
90  * user-defined RAM segment
91  */
92 extern struct toc_data_t TocData;
93 
94 /**
95  * User-defined command segment, forward declaration of the structure
96  */
97 union toc_command_t;
98 
99 /**
100  * user-defined command segment
101  */
102 extern union toc_command_t TocCommand;
103 
104 /**
105  * Service descriptor
106  */
108 {
109  ble_uuid128_t uuid128;
110 };
111 
112 /**
113  * User-defined services description table
114  */
115 struct toc_services_t;
116 
117 /**
118  * user-defined services segment
119  */
120 extern const struct toc_services_t TocServices;
121 
122 /** @} */ /* toc */
123 
124 #endif /* EVE_TOC_TYPES_H_INCLUDED */
struct app_file_context_t * User
Definition: types.h:81
Applikasjon-spesifikk parameter beskrivelse.
Definition: toc-app.h:144
struct toc_data_t TocData
uint8_t Count
Definition: types.h:68
union toc_command_t TocCommand
toc_segment_type_t
Definition: types.h:52
const char * StringPool
Definition: types.h:67
const struct toc_services_t TocServices
const struct toc_t * Toc
Definition: types.h:66