RTI Connext DDS Micro  Version 2.4.8
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
db_log.h
Go to the documentation of this file.
1 /*
2  * FILE: db_log.h - DB Log definitions
3  *
4  * (c) Copyright, Real-Time Innovations, 2012-2015.
5  * All rights reserved.
6  *
7  * No duplications, whole or partial, manual or electronic, may be made
8  * without express written permission. Any such copies, or
9  * revisions thereof, must display this notice unaltered.
10  * This code contains trade secrets of Real-Time Innovations, Inc.
11  *
12  * Modification History
13  * --------------------
14  * 04nov2015,tk MICRO-1505 Reduce memory footprint
15  * 28may2012,tk Written
16  */
17 /*ce
18  * \file
19  * \brief DB module log codes
20  *
21  * \details
22  * This file defines log codes for all messages logged by the database
23  * modules. All the log codes in this file are publicly documented.
24  */
25 #ifndef db_log_h
26 #define db_log_h
27 
28 #ifndef osapi_log_h
29 #include "osapi/osapi_log.h"
30 #endif
31 
32 /*ce
33  * \defgroup DBLogCodesClass DB
34  * \brief Database. ModuleID = 2
35  * \ingroup LoggingModule
36  */
37 /*ce
38  * \brief Not sufficient memory to allocate sorted list for an index
39  * \ingroup DBLogCodesClass
40  */
41 #define DB_LOG_SORTED_ALLOC_EC (DB_LOG_BASE + 1)
42 #define DB_LOG_SORTED_ALLOC(level_) \
43 OSAPI_LOG_ENTRY_ADD((level_),DB_LOG_SORTED_ALLOC_EC,\
44  OSAPI_LOG_MSG_PN_X2_STD_PARAM )
45 
46 /*ce
47  * \brief The specified database name is too long
48  * \ingroup DBLogCodesClass
49  */
50 #define DB_LOG_NAME_TOO_LONG_EC (DB_LOG_BASE + 2)
51 #define DB_LOG_NAME_TOO_LONG(level_,len_) \
52 OSAPI_LOG_ENTRY_ADD_1INT((level_),DB_LOG_NAME_TOO_LONG_EC,\
53  OSAPI_LOG_MSG_PN_X2_STD_PARAM,"length",(len_))
54 
55 /*ce
56  * \brief Illegal table size specified
57  * \ingroup DBLogCodesClass
58  */
59 #define DB_LOG_ILLEGAL_TABLE_SIZE_EC (DB_LOG_BASE + 3)
60 #define DB_LOG_ILLEGAL_TABLE_SIZE(level_,size_) \
61 OSAPI_LOG_ENTRY_ADD_1INT((level_),DB_LOG_ILLEGAL_TABLE_SIZE_EC,\
62  OSAPI_LOG_MSG_PN_X2_STD_PARAM,"size",(size_))
63 
64 /*ce
65  * \brief Illegal combination of lock mode and mutex given
66  * \ingroup DBLogCodesClass
67  */
68 #define DB_LOG_ILLEGAL_LOCK_MODE_EC (DB_LOG_BASE + 4)
69 #define DB_LOG_ILLEGAL_LOCK_MODE(level_,mode_,shared_) \
70 OSAPI_LOG_ENTRY_CREATE((level_),DB_LOG_ILLEGAL_LOCK_MODE_EC,\
71  OSAPI_LOG_MSG_PN_X2_STD_PARAM,RTI_FALSE)\
72 OSAPI_LOG_ENTRY_ADD_INT("mode",(mode_),RTI_FALSE)\
73 OSAPI_LOG_ENTRY_ADD_POINTER("shared",(shared_),RTI_TRUE)
74 
75 /*ce
76  * \brief Failed to allocate database mutex
77  * \ingroup DBLogCodesClass
78  */
79 #define DB_LOG_MUTEX_ALLOC_EC (DB_LOG_BASE + 5)
80 #define DB_LOG_MUTEX_ALLOC(level_) \
81 OSAPI_LOG_ENTRY_ADD((level_),DB_LOG_MUTEX_ALLOC_EC,\
82  OSAPI_LOG_MSG_PN_X2_STD_PARAM)
83 
84 /*ce
85  * \brief Failed to allocate buffer pool
86  * \ingroup DBLogCodesClass
87  */
88 #define DB_LOG_ALLOC_TABLE_POOL_EC (DB_LOG_BASE + 6)
89 #define DB_LOG_ALLOC_TABLE_POOL(level_,size_,count_) \
90 OSAPI_LOG_ENTRY_ADD_2INT((level_),DB_LOG_ALLOC_TABLE_POOL_EC,\
91  OSAPI_LOG_MSG_PN_X2_STD_PARAM,\
92  "size",(size_),"count",(count_))
93 
94 /*ce
95  * \brief Table is in use
96  * \ingroup DBLogCodesClass
97  */
98 #define DB_LOG_TABLES_INUSE_EC (DB_LOG_BASE + 7)
99 #define DB_LOG_TABLES_INUSE(level_) \
100 OSAPI_LOG_ENTRY_ADD((level_),DB_LOG_TABLES_INUSE_EC,\
101  OSAPI_LOG_MSG_PN_X2_STD_PARAM)
102 
103 /*ce
104  * \brief Specified table name too long
105  * \ingroup DBLogCodesClass
106  */
107 #define DB_LOG_TABLE_NAME_TOO_LONG_EC (DB_LOG_BASE + 8)
108 #define DB_LOG_TABLE_NAME_TOO_LONG(level_,table_) \
109 OSAPI_LOG_ENTRY_ADD_1STRING((level_),DB_LOG_TABLE_NAME_TOO_LONG_EC,\
110  OSAPI_LOG_MSG_PN_X2_STD_PARAM ,"table",(table_))
111 
112 /*ce
113  * \brief Illegal record count specified
114  * \ingroup DBLogCodesClass
115  */
116 #define DB_LOG_ILLEGAL_RECORD_COUNT_EC (DB_LOG_BASE + 9)
117 #define DB_LOG_ILLEGAL_RECORD_COUNT(level_,count_) \
118 OSAPI_LOG_ENTRY_ADD_1INT((level_),DB_LOG_ILLEGAL_RECORD_COUNT_EC,\
119  OSAPI_LOG_MSG_PN_X2_STD_PARAM ,"count",(count_))
120 
121 /*ce
122  * \brief Specified table already exists
123  * \ingroup DBLogCodesClass
124  */
125 #define DB_LOG_TABLE_EXISTS_EC (DB_LOG_BASE + 10)
126 #define DB_LOG_TABLE_EXISTS(level_,name_) \
127 OSAPI_LOG_ENTRY_ADD_1STRING((level_),DB_LOG_TABLE_EXISTS_EC,\
128  OSAPI_LOG_MSG_PN_X2_STD_PARAM ,"name=",(name_))
129 
130 /*ce
131  * \brief Table resources exceeded
132  * \ingroup DBLogCodesClass
133  */
134 #define DB_LOG_OUT_OF_TABLES_EC (DB_LOG_BASE + 11)
135 #define DB_LOG_OUT_OF_TABLES(level_) \
136 OSAPI_LOG_ENTRY_ADD((level_),DB_LOG_OUT_OF_TABLES_EC,\
137  OSAPI_LOG_MSG_PN_X2_STD_PARAM)
138 
139 /*ce
140  * \brief Table record resources exceeded
141  * \ingroup DBLogCodesClass
142  */
143 #define DB_LOG_OUT_OF_RECORDS_EC (DB_LOG_BASE + 12)
144 #define DB_LOG_OUT_OF_RECORDS(level_) \
145 OSAPI_LOG_ENTRY_ADD((level_),DB_LOG_OUT_OF_RECORDS_EC,\
146  OSAPI_LOG_MSG_PN_X2_STD_PARAM)
147 
148 /*ce
149  * \brief Table index resources exceeded
150  * \ingroup DBLogCodesClass
151  */
152 #define DB_LOG_OUT_OF_INDICES_EC (DB_LOG_BASE + 13)
153 #define DB_LOG_OUT_OF_INDICES(level_) \
154 OSAPI_LOG_ENTRY_ADD((level_),DB_LOG_OUT_OF_INDICES_EC,\
155  OSAPI_LOG_MSG_PN_X2_STD_PARAM)
156 
157 /*ce
158  * \brief Table cursor resources exceeded
159  * \ingroup DBLogCodesClass
160  */
161 #define DB_LOG_OUT_OF_CURSORS_EC (DB_LOG_BASE + 14)
162 #define DB_LOG_OUT_OF_CURSORS(level_) \
163 OSAPI_LOG_ENTRY_ADD((level_),DB_LOG_OUT_OF_CURSORS_EC,\
164  OSAPI_LOG_MSG_PN_X2_STD_PARAM)
165 
166 /*ce
167  * \brief Cannot delete table, records are still in table
168  * \ingroup DBLogCodesClass
169  */
170 #define DB_LOG_RECORDS_INUSE_EC (DB_LOG_BASE + 15)
171 #define DB_LOG_RECORDS_INUSE(level_,name_) \
172 OSAPI_LOG_ENTRY_ADD_1STRING(level_,DB_LOG_RECORDS_INUSE_EC,\
173  OSAPI_LOG_MSG_PN_X2_STD_PARAM ,"table",(name_))
174 
175 /*ce
176  * \brief Cannot delete table, cursors are still in use
177  * \ingroup DBLogCodesClass
178  */
179 #define DB_LOG_CURSORS_INUSE_EC (DB_LOG_BASE + 16)
180 #define DB_LOG_CURSORS_INUSE(level_) \
181 OSAPI_LOG_ENTRY_ADD((level_),DB_LOG_CURSORS_INUSE_EC,\
182  OSAPI_LOG_MSG_PN_X2_STD_PARAM)
183 
184 /*ce
185  * \brief Cannot delete table, indices are still in use
186  * \ingroup DBLogCodesClass
187  */
188 #define DB_LOG_INDEX_INUSE_EC (DB_LOG_BASE + 17)
189 #define DB_LOG_INDEX_INUSE(level_) \
190 OSAPI_LOG_ENTRY_ADD((level_),DB_LOG_INDEX_INUSE_EC,\
191  OSAPI_LOG_MSG_PN_X2_STD_PARAM)
192 
193 /*ce
194  * \brief Failed to allocate cursor buffer pool
195  * \ingroup DBLogCodesClass
196  */
197 #define DB_LOG_ALLOC_CURSOR_POOL_EC (DB_LOG_BASE + 18)
198 #define DB_LOG_ALLOC_CURSOR_POOL(level_) \
199 OSAPI_LOG_ENTRY_ADD((level_),DB_LOG_ALLOC_CURSOR_POOL_EC,\
200  OSAPI_LOG_MSG_PN_X2_STD_PARAM)
201 
202 /*ce
203  * \brief Failed to allocate index buffer pool
204  * \ingroup DBLogCodesClass
205  */
206 #define DB_LOG_ALLOC_INDEX_POOL_EC (DB_LOG_BASE + 19)
207 #define DB_LOG_ALLOC_INDEX_POOL(level_) \
208 OSAPI_LOG_ENTRY_ADD((level_),DB_LOG_ALLOC_INDEX_POOL_EC,\
209  OSAPI_LOG_MSG_PN_X2_STD_PARAM)
210 
211 /*ce
212  * \brief Failed to allocate record buffer pool
213  * \ingroup DBLogCodesClass
214  */
215 #define DB_LOG_ALLOC_RECORD_POOL_EC (DB_LOG_BASE + 20)
216 #define DB_LOG_ALLOC_RECORD_POOL(level_) \
217 OSAPI_LOG_ENTRY_ADD((level_),DB_LOG_ALLOC_RECORD_POOL_EC,\
218  OSAPI_LOG_MSG_PN_X2_STD_PARAM)
219 
220 /*ce
221  * \brief Failed to allocate database
222  * \ingroup DBLogCodesClass
223  */
224 #define DB_LOG_ALLOC_DATABASE_EC (DB_LOG_BASE + 21)
225 #define DB_LOG_ALLOC_DATABASE(level_) \
226 OSAPI_LOG_ENTRY_ADD((level_),DB_LOG_ALLOC_DATABASE_EC,\
227  OSAPI_LOG_MSG_PN_X2_STD_PARAM)
228 
229 
230 /*ce
231  * \brief An attempt was made to delete a table not in use
232  * \ingroup DBLogCodesClass
233  */
234 #define DB_LOG_TABLE_NOT_INUSE_EC (DB_LOG_BASE + 22)
235 #define DB_LOG_TABLE_NOT_INUSE(level_) \
236 OSAPI_LOG_ENTRY_ADD((level_),DB_LOG_TABLE_NOT_INUSE_EC,\
237  OSAPI_LOG_MSG_PN_X2_STD_PARAM)
238 
239 
240 /*ce
241  * \brief An attempt was made to insert an already existing record
242  * \ingroup DBLogCodesClass
243  */
244 #define DB_LOG_RECORD_ALREADY_EXISTS_EC (DB_LOG_BASE + 23)
245 #define DB_LOG_RECORD_ALREADY_EXISTS(level_) \
246 OSAPI_LOG_ENTRY_ADD((level_),DB_LOG_RECORD_ALREADY_EXISTS_EC,\
247  OSAPI_LOG_MSG_PN_X2_STD_PARAM)
248 
249 
250 /*ce
251  * \brief An attempt was made to delete a record that does not exist
252  * \ingroup DBLogCodesClass
253  */
254 #define DB_LOG_RECORD_DOES_NOT_EXIST_EC (DB_LOG_BASE + 24)
255 #define DB_LOG_RECORD_DOES_NOT_EXIST(level_) \
256 OSAPI_LOG_ENTRY_ADD((level_),DB_LOG_RECORD_DOES_NOT_EXIST_EC,\
257  OSAPI_LOG_MSG_PN_X2_STD_PARAM)
258 
259 /*ce
260  * \brief An attempt was made to use a cursor that has been invalidated
261  * \ingroup DBLogCodesClass
262  */
263 #define DB_LOG_CURSOR_INVALIDATED_EC (DB_LOG_BASE + 25)
264 #define DB_LOG_CURSOR_INVALIDATED(level_) \
265 OSAPI_LOG_ENTRY_ADD((level_),DB_LOG_CURSOR_INVALIDATED_EC,\
266  OSAPI_LOG_MSG_PN_X2_STD_PARAM)
267 
268 /*ce
269  * \brief Failed to lock the database
270  * \ingroup DBLogCodesClass
271  */
272 #define DB_LOG_LOCK_FAILURE_EC (DB_LOG_BASE + 26)
273 #define DB_LOG_LOCK_FAILURE(level_) \
274 OSAPI_LOG_ENTRY_ADD((level_),DB_LOG_LOCK_FAILURE_EC,\
275  OSAPI_LOG_MSG_PN_X2_STD_PARAM)
276 
277 /*ce
278  * \brief Failed to unlock the database
279  * \ingroup DBLogCodesClass
280  */
281 #define DB_LOG_UNLOCK_FAILURE_EC (DB_LOG_BASE + 27)
282 #define DB_LOG_UNLOCK_FAILURE(level_) \
283 OSAPI_LOG_ENTRY_ADD((level_),DB_LOG_UNLOCK_FAILURE_EC,\
284  OSAPI_LOG_MSG_PN_X2_STD_PARAM)
285 
286 #endif /* db_log_h */

RTI Connext DDS Micro Version 2.4.8 Copyright © Tue Apr 12 2016 Real-Time Innovations, Inc