RTI Connext Micro  Version 2.4.1.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
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-2014.
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  * 28may2012,tk Written
15  */
16 /*ce
17  * \file
18  * \brief DB module log codes
19  */
20 #ifndef db_log_h
21 #define db_log_h
22 
23 #ifndef osapi_log_h
24 #include "osapi/osapi_log.h"
25 #endif
26 
27 /*ce
28  * \defgroup DBLogCodesClass DB
29  * \brief Database. ModuleID = 2
30  * \ingroup LoggingModule
31  */
32 
33 /*ce
34  * \brief Not sufficient memory to allocate index pool
35  * \ingroup DBLogCodesClass
36  */
37 #define DB_LOG_INDEX_ALLOC (DB_LOG_BASE + 1)
38 #define DB_Log_index_alloc(level_,max_) \
39 OSAPI_Log_msg_pN_X2((level_),DB_LOG_INDEX_ALLOC,\
40  OSAPI_LOG_MSG_PN_X2_STD_PARAM ,1,\
41  "max=%d",(max_))
42 
43 /*ce
44  * \brief Not sufficient memory to allocate sorted list
45  * \ingroup DBLogCodesClass
46  */
47 #define DB_LOG_SORTED_ALLOC (DB_LOG_BASE + 2)
48 #define DB_Log_sorted_alloc(level_,max_) \
49 OSAPI_Log_msg_pN_X2((level_),DB_LOG_SORTED_ALLOC,\
50  OSAPI_LOG_MSG_PN_X2_STD_PARAM ,1,\
51  "max=%d",(max_))
52 
53 /*ce
54  * \brief Table name too long
55  * \ingroup DBLogCodesClass
56  */
57 #define DB_LOG_NAME_TOO_LONG (DB_LOG_BASE + 3)
58 #define DB_Log_name_too_long(level_,len_) \
59 OSAPI_Log_msg_pN_X2((level_),DB_LOG_NAME_TOO_LONG,\
60  OSAPI_LOG_MSG_PN_X2_STD_PARAM ,1,\
61  "len=%d",(len_))
62 
63 /*ce
64  * \brief Illegal table size specified
65  * \ingroup DBLogCodesClass
66  */
67 #define DB_LOG_ILLEGAL_TABLE_SIZE (DB_LOG_BASE + 5)
68 #define DB_Log_illegal_table_size(level_,size_) \
69 OSAPI_Log_msg_pN_X2((level_),DB_LOG_ILLEGAL_TABLE_SIZE,\
70  OSAPI_LOG_MSG_PN_X2_STD_PARAM ,1,\
71  "size=%d",(size_))
72 
73 /*ce
74  * \brief Illegal combination of lock mode nad mutex given
75  * \ingroup DBLogCodesClass
76  */
77 #define DB_LOG_ILLEGAL_LOCK_MODE (DB_LOG_BASE + 5)
78 #define DB_Log_illegal_lock_mode(level_,mode_,shared_) \
79 OSAPI_Log_msg_pN_X2((level_),DB_LOG_ILLEGAL_LOCK_MODE,\
80  OSAPI_LOG_MSG_PN_X2_STD_PARAM ,2,\
81  "mode=%d,shared=%p",(mode_),(shared_))
82 
83 /*ce
84  * \brief Heap allocation failed
85  * \ingroup DBLogCodesClass
86  */
87 #define DB_LOG_HEAP_ALLOC (DB_LOG_BASE + 6)
88 #define DB_Log_heap_alloc(level_,size_) \
89 OSAPI_Log_msg_pN_X2((level_),DB_LOG_HEAP_ALLOC,\
90  OSAPI_LOG_MSG_PN_X2_STD_PARAM ,1,\
91  "size=%d",(size_))
92 
93 /*ce
94  * \brief Failed to copy database data
95  * \ingroup DBLogCodesClass
96  */
97 #define DB_LOG_COPY_ERROR (DB_LOG_BASE + 7)
98 #define DB_Log_copy_error(level_,dst_,src_,size_) \
99 OSAPI_Log_msg_pN_X2((level_),DB_LOG_COPY_ERROR,\
100  OSAPI_LOG_MSG_PN_X2_STD_PARAM ,3,\
101  "dst=%p,src=%p,size=%d",(dst_),(src_),(size_))
102 
103 /*ce
104  * \brief Failed to allocate database mutex
105  * \ingroup DBLogCodesClass
106  */
107 #define DB_LOG_MUTEX_ALLOC (DB_LOG_BASE + 8)
108 #define DB_Log_mutex_alloc(level_) \
109 OSAPI_Log_msg_pN_X2((level_),DB_LOG_MUTEX_ALLOC,\
110  OSAPI_LOG_MSG_PN_X2_STD_PARAM ,0)
111 
112 /*ce
113  * \brief Failed to allocate buffer pool
114  * \ingroup DBLogCodesClass
115  */
116 #define DB_LOG_POOL_ALLOC (DB_LOG_BASE + 9)
117 #define DB_Log_pool_alloc(level_,size_,count_) \
118 OSAPI_Log_msg_pN_X2((level_),DB_LOG_POOL_ALLOC,\
119  OSAPI_LOG_MSG_PN_X2_STD_PARAM ,2,\
120  "size=%d,count=%d",(size_),(count_))
121 
122 /*ce
123  * \brief Failed to delete table
124  * \ingroup DBLogCodesClass
125  */
126 #define DB_LOG_TABLE_DELETE (DB_LOG_BASE + 10)
127 #define DB_Log_table_delete(level_,name_) \
128 OSAPI_Log_msg_pN_X2((level_),DB_LOG_TABLE_DELETE,\
129  OSAPI_LOG_MSG_PN_X2_STD_PARAM ,1,\
130  "name=%s",(name_))
131 
132 
133 /*ce
134  * \brief Table is in use
135  * \ingroup DBLogCodesClass
136  */
137 #define DB_LOG_TABLES_INUSE (DB_LOG_BASE + 11)
138 #define DB_Log_tables_inuse(level_) \
139 OSAPI_Log_msg_pN_X2((level_),DB_LOG_TABLES_INUSE,\
140  OSAPI_LOG_MSG_PN_X2_STD_PARAM ,0)
141 
142 /*ce
143  * \brief Database locking failed
144  * \ingroup DBLogCodesClass
145  */
146 #define DB_LOG_LOCK (DB_LOG_BASE + 12)
147 #define DB_Log_lock(level_,lock_) \
148 OSAPI_Log_msg_pN_X2((level_),DB_LOG_LOCK,\
149  OSAPI_LOG_MSG_PN_X2_STD_PARAM ,1,\
150  "lock=%p",(lock_))
151 
152 /*ce
153  * \brief Database unlocking failed
154  * \ingroup DBLogCodesClass
155  */
156 #define DB_LOG_UNLOCK (DB_LOG_BASE + 13)
157 #define DB_Log_unlock(level_,lock_) \
158 OSAPI_Log_msg_pN_X2((level_),DB_LOG_UNLOCK,\
159  OSAPI_LOG_MSG_PN_X2_STD_PARAM ,1,\
160  "lock=%p",(lock_))
161 
162 /*ce
163  * \brief Specified table name too long
164  * \ingroup DBLogCodesClass
165  */
166 #define DB_LOG_TABLE_TOO_LONG (DB_LOG_BASE + 14)
167 #define DB_Log_table_too_long(level_,table_) \
168 OSAPI_Log_msg_pN_X2((level_),DB_LOG_TABLE_TOO_LONG,\
169  OSAPI_LOG_MSG_PN_X2_STD_PARAM ,1,\
170  "table=%s",(table_))
171 
172 /*ce
173  * \brief Illegal record count specified
174  * \ingroup DBLogCodesClass
175  */
176 #define DB_LOG_ILLEGAL_RECORD_COUNT (DB_LOG_BASE + 15)
177 #define DB_Log_illegal_record_count(level_,count_) \
178 OSAPI_Log_msg_pN_X2((level_),DB_LOG_ILLEGAL_RECORD_COUNT,\
179  OSAPI_LOG_MSG_PN_X2_STD_PARAM ,1,\
180  "count=%d",(count_))
181 
182 
183 /*ce
184  * \brief Specified table already exists
185  * \ingroup DBLogCodesClass
186  */
187 #define DB_LOG_TABLE_EXISTS (DB_LOG_BASE + 16)
188 #define DB_Log_table_exists(level_,name_) \
189 OSAPI_Log_msg_pN_X2((level_),DB_LOG_TABLE_EXISTS,\
190  OSAPI_LOG_MSG_PN_X2_STD_PARAM ,1,\
191  "name=%s",(name_))
192 
193 /*ce
194  * \brief Table resources exceeded
195  * \ingroup DBLogCodesClass
196  */
197 #define DB_LOG_OUT_OF_TABLES (DB_LOG_BASE + 17)
198 #define DB_Log_out_of_tables(level_) \
199 OSAPI_Log_msg_pN_X2((level_),DB_LOG_OUT_OF_TABLES,\
200  OSAPI_LOG_MSG_PN_X2_STD_PARAM ,0)
201 
202 
203 /*ce
204  * \brief Table record resources exceeded
205  * \ingroup DBLogCodesClass
206  */
207 #define DB_LOG_OUT_OF_RECORDS (DB_LOG_BASE + 18)
208 #define DB_Log_out_of_records(level_,table_,count_,size_) \
209 OSAPI_Log_msg_pN_X2((level_),DB_LOG_OUT_OF_RECORDS,\
210  OSAPI_LOG_MSG_PN_X2_STD_PARAM ,3,\
211  "table=%s,count=%d,size=%d",(table_),(count_),(size_))
212 
213 /*ce
214  * \brief Table index resources exceeded
215  * \ingroup DBLogCodesClass
216  */
217 #define DB_LOG_OUT_OF_INDICES (DB_LOG_BASE + 19)
218 #define DB_Log_out_of_indices(level_,table_,count_,size_) \
219 OSAPI_Log_msg_pN_X2((level_),DB_LOG_OUT_OF_INDICES,\
220  OSAPI_LOG_MSG_PN_X2_STD_PARAM ,3,\
221  "table=%s,count=%d,size=%d",(table_),(count_),(size_))
222 
223 /*ce
224  * \brief Table cursor resources exceeded
225  * \ingroup DBLogCodesClass
226  */
227 #define DB_LOG_OUT_OF_CURSORS (DB_LOG_BASE + 20)
228 #define DB_Log_out_of_cursors(level_,table_,count_,size_) \
229 OSAPI_Log_msg_pN_X2((level_),DB_LOG_OUT_OF_CURSORS,\
230  OSAPI_LOG_MSG_PN_X2_STD_PARAM ,3,\
231  "table=%s,count=%d,size=%d",(table_),(count_),(size_))
232 
233 /*ce
234  * \brief Cannot delete table, records are still in table
235  * \ingroup DBLogCodesClass
236  */
237 #define DB_LOG_RECORDS_INUSE (DB_LOG_BASE + 21)
238 #define DB_Log_records_inuse(level_,name_) \
239 OSAPI_Log_msg_pN_X2((level_),DB_LOG_RECORDS_INUSE,\
240  OSAPI_LOG_MSG_PN_X2_STD_PARAM ,1,"table=%s",(name_))
241 
242 /*ce
243  * \brief Cannot delete table, cursors are still in use
244  * \ingroup DBLogCodesClass
245  */
246 #define DB_LOG_CURSORS_INUSE (DB_LOG_BASE + 22)
247 #define DB_Log_cursors_inuse(level_) \
248 OSAPI_Log_msg_pN_X2((level_),DB_LOG_CURSORS_INUSE,\
249  OSAPI_LOG_MSG_PN_X2_STD_PARAM ,0)
250 
251 
252 /*ce
253  * \brief Cannot delete table, indices are still in use
254  * \ingroup DBLogCodesClass
255  */
256 #define DB_LOG_INDEX_INUSE (DB_LOG_BASE + 23)
257 #define DB_Log_index_inuse(level_) \
258 OSAPI_Log_msg_pN_X2((level_),DB_LOG_INDEX_INUSE,\
259  OSAPI_LOG_MSG_PN_X2_STD_PARAM ,0)
260 
261 #endif /* db_log_h */

RTI Connext Micro Version 2.4.1.0 Copyright © Thu Nov 20 2014 Real-Time Innovations, Inc