SysLink API Reference  2.21.03.11
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
NameServer.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  * */
82 #ifndef ti_ipc_NameServer__include
83 #define ti_ipc_NameServer__include
84 
85 #if defined (__cplusplus)
86 extern "C" {
87 #endif
88 
89 /* =============================================================================
90  * All success and failure codes for the module
91  * =============================================================================
92  */
93 
98 #define NameServer_S_BUSY 2
99 
104 #define NameServer_S_ALREADYSETUP 1
105 
110 #define NameServer_S_SUCCESS 0
111 
116 #define NameServer_E_FAIL -1
117 
122 #define NameServer_E_INVALIDARG -2
123 
128 #define NameServer_E_MEMORY -3
129 
134 #define NameServer_E_ALREADYEXISTS -4
135 
140 #define NameServer_E_NOTFOUND -5
141 
146 #define NameServer_E_TIMEOUT -6
147 
152 #define NameServer_E_INVALIDSTATE -7
153 
158 #define NameServer_E_OSFAILURE -8
159 
164 #define NameServer_E_RESOURCE -9
165 
170 #define NameServer_E_RESTART -10
171 
172 /* =============================================================================
173  * Macros
174  * =============================================================================
175  */
176 
181 #define NameServer_ALLOWGROWTH (~0)
182 
187 #define NameServer_Params_MAXNAMELEN 16
188 
189 /* =============================================================================
190  * Structures & Enums
191  * =============================================================================
192  */
193 
197 typedef struct NameServer_Object *NameServer_Handle;
198 
202 typedef struct NameServer_Params {
218  Ptr tableHeap;
262 
263 
264 /* =============================================================================
265  * NameServer Module-wide Functions
266  * =============================================================================
267  */
268 
277 
288 NameServer_Handle NameServer_create(String name,
289  const NameServer_Params *params);
290 
305 Int NameServer_delete(NameServer_Handle *handlePtr);
306 
327 NameServer_Handle NameServer_getHandle(String name);
328 
329 /* =============================================================================
330  * NameServer Per-instance Functions
331  * =============================================================================
332  */
333 
363 Ptr NameServer_add(NameServer_Handle handle, String name, Ptr buf, UInt32 len);
364 
396 Ptr NameServer_addUInt32(NameServer_Handle handle, String name, UInt32 value);
397 
449 Int NameServer_get(NameServer_Handle handle,
450  String name,
451  Ptr buf,
452  UInt32 *len,
453  UInt16 procId[]);
454 
502 Int NameServer_getUInt32(NameServer_Handle handle,
503  String name,
504  Ptr buf,
505  UInt16 procId[]);
506 
534 Int NameServer_getLocal(NameServer_Handle handle,
535  String name,
536  Ptr buf,
537  UInt32 *len);
538 
561 Int NameServer_getLocalUInt32(NameServer_Handle handle,
562  String name,
563  Ptr buf);
564 
581 Int NameServer_match(NameServer_Handle handle, String name, UInt32 *value);
582 
608 Int NameServer_remove(NameServer_Handle handle, String name);
609 
639 Int NameServer_removeEntry(NameServer_Handle handle, Ptr entry);
640 
641 #if defined (__cplusplus)
642 }
643 #endif /* defined (__cplusplus) */
644 
645 #endif /* ti_ipc_NameServer__include */
646 
647 /*
648  */
649 /*
650  * @(#) ti.ipc; 1, 0, 0, 0,; 11-7-2012 13:07:52; /db/vtree/library/trees/ipc/ipc-i09/src/ xlibrary
651 
652  */
653 
Copyright 2014, Texas Instruments Incorporated