Server.h

Go to the documentation of this file.
00001 /* 
00002  * Copyright (c) 2012, Texas Instruments Incorporated
00003  * All rights reserved.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  *
00009  * *  Redistributions of source code must retain the above copyright
00010  *    notice, this list of conditions and the following disclaimer.
00011  *
00012  * *  Redistributions in binary form must reproduce the above copyright
00013  *    notice, this list of conditions and the following disclaimer in the
00014  *    documentation and/or other materials provided with the distribution.
00015  *
00016  * *  Neither the name of Texas Instruments Incorporated nor the names of
00017  *    its contributors may be used to endorse or promote products derived
00018  *    from this software without specific prior written permission.
00019  *
00020  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00021  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
00022  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00023  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
00024  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00025  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00026  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
00027  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
00028  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
00029  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
00030  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00031  * 
00032  */
00033 /*
00034  *  ======== Server.h ========
00035  *  DSP Server module
00036  *
00037  *  APIs for accessing information from remote server.
00038  */
00039 
00050 #ifndef ti_sdo_ce_Server_
00051 #define ti_sdo_ce_Server_
00052 
00053 #ifdef __cplusplus
00054 extern "C" {
00055 #endif
00056 
00057 #include <stdio.h>  /* def of FILE * */
00058 
00061 
00070 #define Server_MODNAME "ti.sdo.ce.Server"
00071 
00075 #define Server_MAXSEGNAMELENGTH 32
00076 
00077 
00081 typedef struct Server_Obj *Server_Handle;
00082 
00086 typedef enum Server_Status {
00087     Server_EOK       = 0,      
00088     Server_ENOSERVER = 1,      
00089     Server_ENOMEM    = 2,      
00090     Server_ERUNTIME  = 3,      
00091     Server_EINVAL    = 4,      
00092     Server_EWRONGSTATE =5,     
00094     Server_EINUSE   = 6,       
00096     Server_ENOTFOUND = 7,      
00097     Server_EFAIL = 8           
00098 } Server_Status;
00099 
00107 typedef struct Server_MemStat {
00108     Char   name[Server_MAXSEGNAMELENGTH + 1]; 
00109     Uint32 base;           
00110     Uint32 size;           
00111     Uint32 used;           
00112     Uint32 maxBlockLen;    
00113 } Server_MemStat;
00114 
00115 /*
00116  *  ======== Server_connectTrace ========
00117  */
00139 extern Server_Status Server_connectTrace(Server_Handle server, Int * token);
00140 
00141 /*
00142  *  ======== Server_disconnectTrace ========
00143  */
00161 extern Server_Status Server_disconnectTrace(Server_Handle server, Int token);
00162 
00163 /*
00164  *  ======== Server_fwriteTrace ========
00165  */
00190 extern Int Server_fwriteTrace(Server_Handle server, String prefix, FILE *out);
00191 
00192 /*
00193  *  ======== Server_getCpuLoad ========
00194  */
00216 extern Int Server_getCpuLoad(Server_Handle server);
00217 
00218 /*
00219  *  ======== Server_getMemStat ========
00220  */
00243 extern Server_Status Server_getMemStat(Server_Handle server, Int segNum,
00244         Server_MemStat *memStat);
00245 
00246 /*
00247  *  ======== Server_getNumMemSegs ========
00248  */
00270 extern Server_Status Server_getNumMemSegs(Server_Handle server, Int *numSegs);
00271 
00273 /*
00274  *  ======== Server_init ========
00275  */
00276 extern Void Server_init(Void);
00279 /*
00280  *  ======== Server_redefineHeap ========
00281  */
00334 extern Server_Status Server_redefineHeap(Server_Handle server, String name,
00335         Uint32 base, Uint32 size);
00336 
00337 /*
00338  *  ======== Server_restoreHeap ========
00339  */
00373 extern Server_Status Server_restoreHeap(Server_Handle server, String name);
00374 
00375 /*
00376  *  ======== Server_setTrace ========
00377  */
00399 extern Int Server_setTrace(Server_Handle server, String mask);
00400   /* ingroup */
00402 
00403 #ifdef __cplusplus
00404 }
00405 #endif
00406 
00407 #endif
00408 /*
00409  *  @(#) ti.sdo.ce; 1, 0, 6,1; 1-17-2012 23:09:33; /db/atree/library/trees/ce/ce-t03/src/ xlibrary
00410 
00411  */
00412 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Copyright 2012, Texas Instruments Incorporated