Server.h

Go to the documentation of this file.
00001 /* 
00002  * Copyright (c) 2010, 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 
00065 #define Server_GTNAME "CS"
00066 
00070 #define Server_MAXSEGNAMELENGTH 32
00071 
00072 
00076 typedef struct Server_Obj *Server_Handle;
00077 
00081 typedef enum Server_Status {
00082     Server_EOK       = 0,      
00083     Server_ENOSERVER = 1,      
00084     Server_ENOMEM    = 2,      
00085     Server_ERUNTIME  = 3,      
00086     Server_EINVAL    = 4,      
00087     Server_EWRONGSTATE =5,     
00089     Server_EINUSE   = 6,       
00091     Server_ENOTFOUND = 7,      
00092     Server_EFAIL = 8           
00093 } Server_Status;
00094 
00102 typedef struct Server_MemStat {
00103     Char   name[Server_MAXSEGNAMELENGTH + 1]; 
00104     Uint32 base;           
00105     Uint32 size;           
00106     Uint32 used;           
00107     Uint32 maxBlockLen;    
00108 } Server_MemStat;
00109 
00110 /*
00111  *  ======== Server_connectTrace ========
00112  */
00134 extern Server_Status Server_connectTrace(Server_Handle server, Int * token);
00135 
00136 /*
00137  *  ======== Server_disconnectTrace ========
00138  */
00156 extern Server_Status Server_disconnectTrace(Server_Handle server, Int token);
00157 
00158 /*
00159  *  ======== Server_fwriteTrace ========
00160  */
00185 extern Int Server_fwriteTrace(Server_Handle server, String prefix, FILE *out);
00186 
00187 /*
00188  *  ======== Server_getCpuLoad ========
00189  */
00211 extern Int Server_getCpuLoad(Server_Handle server);
00212 
00213 /*
00214  *  ======== Server_getMemStat ========
00215  */
00235 extern Server_Status Server_getMemStat(Server_Handle server, Int segNum,
00236         Server_MemStat *memStat);
00237 
00238 /*
00239  *  ======== Server_getNumMemSegs ========
00240  */
00258 extern Server_Status Server_getNumMemSegs(Server_Handle server, Int *numSegs);
00259 
00261 /*
00262  *  ======== Server_init ========
00263  */
00264 extern Void Server_init(Void);
00267 /*
00268  *  ======== Server_redefineHeap ========
00269  */
00320 extern Server_Status Server_redefineHeap(Server_Handle server, String name,
00321         Uint32 base, Uint32 size);
00322 
00323 /*
00324  *  ======== Server_restoreHeap ========
00325  */
00357 extern Server_Status Server_restoreHeap(Server_Handle server, String name);
00358 
00359 /*
00360  *  ======== Server_setTrace ========
00361  */
00383 extern Int Server_setTrace(Server_Handle server, String mask);
00384   /* ingroup */
00386 
00387 #ifdef __cplusplus
00388 }
00389 #endif
00390 
00391 #endif
00392 /*
00393  *  @(#) ti.sdo.ce; 1, 0, 6,410; 6-19-2010 19:51:25; /db/atree/library/trees/ce/ce-o16x/src/
00394  */
00395 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Copyright 2010, Texas Instruments Incorporated