OpenNI 1.5.4: XnOS.h Source File

OpenNI

OpenNI 1.5.4
XnOS.h
Go to the documentation of this file.
00001 /****************************************************************************
00002 *                                                                           *
00003 *  OpenNI 1.x Alpha                                                         *
00004 *  Copyright (C) 2011 PrimeSense Ltd.                                       *
00005 *                                                                           *
00006 *  This file is part of OpenNI.                                             *
00007 *                                                                           *
00008 *  OpenNI is free software: you can redistribute it and/or modify           *
00009 *  it under the terms of the GNU Lesser General Public License as published *
00010 *  by the Free Software Foundation, either version 3 of the License, or     *
00011 *  (at your option) any later version.                                      *
00012 *                                                                           *
00013 *  OpenNI is distributed in the hope that it will be useful,                *
00014 *  but WITHOUT ANY WARRANTY; without even the implied warranty of           *
00015 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the             *
00016 *  GNU Lesser General Public License for more details.                      *
00017 *                                                                           *
00018 *  You should have received a copy of the GNU Lesser General Public License *
00019 *  along with OpenNI. If not, see <http://www.gnu.org/licenses/>.           *
00020 *                                                                           *
00021 ****************************************************************************/
00022 #ifndef __XN_OS_H__
00023 #define __XN_OS_H__
00024 
00025 //---------------------------------------------------------------------------
00026 // Includes
00027 //---------------------------------------------------------------------------
00028 #include "XnPlatform.h"
00029 #include "XnMacros.h"
00030 #include "XnStatusCodes.h"
00031 #include "XnOSStrings.h"
00032 #include "XnOSMemory.h"
00033 
00034 //---------------------------------------------------------------------------
00035 // Defines
00036 //---------------------------------------------------------------------------
00037 #define XN_MASK_OS "xnOS"
00038 
00039 // uncomment next line to activate memory profiling
00040 //#define XN_MEM_PROFILING
00041 
00042 //---------------------------------------------------------------------------
00043 // OS Identifier 
00044 //---------------------------------------------------------------------------
00045 #if (XN_PLATFORM == XN_PLATFORM_WIN32)
00046     #include "Win32/XnOSWin32.h"
00047 #elif (XN_PLATFORM == XN_PLATFORM_LINUX_X86 || XN_PLATFORM == XN_PLATFORM_LINUX_ARM || XN_PLATFORM == XN_PLATFORM_MACOSX || XN_PLATFORM == XN_PLATFORM_ANDROID_ARM)
00048     #include "Linux-x86/XnOSLinux-x86.h"
00049 #elif defined(_ARC)
00050     #include "ARC/XnOSARC.h"
00051 #else
00052     #error OpenNI OS Abstraction Layer - Unsupported Platform!
00053 #endif
00054 
00055 //---------------------------------------------------------------------------
00056 // Types
00057 //---------------------------------------------------------------------------
00058 #define XN_MAX_OS_NAME_LENGTH 255
00059 
00060 typedef struct xnOSInfo
00061 {
00062     XnChar csOSName[XN_MAX_OS_NAME_LENGTH];
00063     XnChar csCPUName[XN_MAX_OS_NAME_LENGTH];
00064     XnUInt32 nProcessorsCount;
00065     XnUInt64 nTotalMemory;
00066 } xnOSInfo;
00067 
00068 typedef XnBool (XN_CALLBACK_TYPE* XnConditionFunc)(void* pConditionData);
00069 
00070 //---------------------------------------------------------------------------
00071 // Global Variables
00072 //---------------------------------------------------------------------------
00074 extern XnOSTimer g_xnOSHighResGlobalTimer;
00075 
00076 //---------------------------------------------------------------------------
00077 // Files
00078 //---------------------------------------------------------------------------
00079 // File open modes
00081 #define XN_OS_FILE_READ             0x01
00082 
00083 #define XN_OS_FILE_WRITE            0x02
00084 
00085 #define XN_OS_FILE_CREATE_NEW_ONLY  0x04
00086 
00087 #define XN_OS_FILE_TRUNCATE         0x08
00088 
00089 #define XN_OS_FILE_APPEND           0x10
00090 
00091 #define XN_OS_FILE_AUTO_FLUSH       0x20
00092 
00093 // Seek types
00095 typedef enum {
00097     XN_OS_SEEK_SET = 0,
00099     XN_OS_SEEK_CUR,
00101     XN_OS_SEEK_END
00102 } XnOSSeekType;
00103 
00104 //---------------------------------------------------------------------------
00105 // Network
00106 //---------------------------------------------------------------------------
00107 // Network socket type
00109 typedef enum {
00111     XN_OS_UDP_SOCKET = 0,
00113     XN_OS_TCP_SOCKET
00114 } XnOSSocketType;
00115 
00116 #define XN_OS_NETWORK_LOCAL_HOST    "127.0.0.1"
00117 
00118 //---------------------------------------------------------------------------
00119 // Macros
00120 //---------------------------------------------------------------------------
00121 // Memory
00123 #define XN_VALIDATE_INPUT_PTR(x) XN_VALIDATE_PTR(x, XN_STATUS_NULL_INPUT_PTR)
00124 
00126 #define XN_VALIDATE_OUTPUT_PTR(x) XN_VALIDATE_PTR(x, XN_STATUS_NULL_OUTPUT_PTR)
00127 
00128 #define XN_VALIDATE_ALLOC_PTR(x) XN_VALIDATE_PTR(x, XN_STATUS_ALLOC_FAILED)
00129 
00131 #define XN_VALIDATE_ALLOC(x,y)          \
00132         x = (y*)xnOSMalloc(sizeof(y));  \
00133         XN_VALIDATE_ALLOC_PTR(x);
00134 
00136 #define XN_VALIDATE_CALLOC(x,y,z)           \
00137         x = (y*)xnOSCalloc(z, sizeof(y));   \
00138         XN_VALIDATE_ALLOC_PTR(x);
00139 
00141 #define XN_VALIDATE_ALIGNED_ALLOC(x,y,w)            \
00142         x = (y*)xnOSMallocAligned(sizeof(y), w);    \
00143         XN_VALIDATE_ALLOC_PTR(x);
00144 
00146 #define XN_VALIDATE_ALIGNED_CALLOC(x,y,z,w)         \
00147         x = (y*)xnOSCallocAligned(z, sizeof(y), w); \
00148         XN_VALIDATE_ALLOC_PTR(x);
00149 
00151 #define XN_FREE_AND_NULL(x)     \
00152         if (x != NULL)          \
00153         {                       \
00154             xnOSFree(x);        \
00155             x = NULL;           \
00156         }
00157 
00158 #define XN_ALIGNED_FREE_AND_NULL(x)     \
00159         if (x != NULL)          \
00160         {                       \
00161             xnOSFreeAligned(x); \
00162             x = NULL;           \
00163         }
00164 
00165 
00167 #if XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_WIN32_VAARGS_STYLE
00168     #define XN_VALIDATE_NEW(ptr, type, ...)                     \
00169         {                                                       \
00170             (ptr) = XN_NEW(type, __VA_ARGS__);                  \
00171             if ((ptr) == NULL)                                  \
00172             {                                                   \
00173                 return (XN_STATUS_ALLOC_FAILED);                \
00174             }                                                   \
00175         }
00176 
00177 #elif XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_GCC_VAARGS_STYLE
00178     #define XN_VALIDATE_NEW(ptr, type, ...)                     \
00179         {                                                       \
00180             (ptr) = XN_NEW(type, ##__VA_ARGS__);                \
00181             if ((ptr) == NULL)                                  \
00182             {                                                   \
00183                 return (XN_STATUS_ALLOC_FAILED);                \
00184             }                                                   \
00185         } 
00186 #elif XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_ARC_VAARGS_STYLE
00187     #define XN_VALIDATE_NEW(ptr, type...)                       \
00188         {                                                       \
00189             (ptr) = XN_NEW(type);                               \
00190             if ((ptr) == NULL)                                  \
00191             {                                                   \
00192                 return (XN_STATUS_ALLOC_FAILED);                \
00193             }                                                   \
00194         } 
00195 #else
00196     #define XN_VALIDATE_NEW(ptr, type)                          \
00197         {                                                       \
00198             (ptr) = XN_NEW(type);                               \
00199             if ((ptr) == NULL)                                  \
00200             {                                                   \
00201                 return (XN_STATUS_ALLOC_FAILED);                \
00202             }                                                   \
00203         }
00204 #endif
00205 
00207 #if XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_WIN32_VAARGS_STYLE
00208     #define XN_VALIDATE_NEW_AND_INIT(ptr, type, ...)            \
00209         {                                                       \
00210             XN_VALIDATE_NEW(ptr, type, __VA_ARGS__);            \
00211             XnStatus rc = (ptr)->Init();                        \
00212             if (rc != XN_STATUS_OK)                             \
00213             {                                                   \
00214                 XN_DELETE(ptr);                                 \
00215                 return (rc);                                    \
00216             }                                                   \
00217         } 
00218 #elif XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_GCC_VAARGS_STYLE
00219     #define XN_VALIDATE_NEW_AND_INIT(ptr, type, ...)            \
00220         {                                                       \
00221             XN_VALIDATE_NEW(ptr, type, ##__VA_ARGS__);          \
00222             XnStatus rc = (ptr)->Init();                        \
00223             if (rc != XN_STATUS_OK)                             \
00224             {                                                   \
00225                 XN_DELETE(ptr);                                 \
00226                 return (rc);                                    \
00227             }                                                   \
00228         } 
00229 #elif XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_ARC_VAARGS_STYLE
00230     #define XN_VALIDATE_NEW_AND_INIT(ptr, type...)              \
00231         {                                                       \
00232             XN_VALIDATE_NEW(ptr, type);                         \
00233             XnStatus rc = (ptr)->Init();                        \
00234             if (rc != XN_STATUS_OK)                             \
00235             {                                                   \
00236                 XN_DELETE(ptr);                                 \
00237                 return (rc);                                    \
00238             }                                                   \
00239         } 
00240 #else
00241     #define XN_VALIDATE_NEW_AND_INIT(ptr, type)                 \
00242         {                                                       \
00243             XN_VALIDATE_NEW(ptr, type);                         \
00244             XnStatus rc = (ptr)->Init();                        \
00245             if (rc != XN_STATUS_OK)                             \
00246             {                                                   \
00247                 XN_DELETE(ptr);                                 \
00248                 return (rc);                                    \
00249             }                                                   \
00250         } 
00251 #endif
00252 
00253 // Strings
00255 #define XN_VALIDATE_STR_APPEND(w,x,y,z) \
00256     z = xnOSStrAppend(w, x, y);         \
00257     XN_IS_STATUS_OK(z);
00258 
00260 #define XN_VALIDATE_STR_PREFIX(w,x,y,z) \
00261     z = xnOSStrPrefix(w, x, y);         \
00262     XN_IS_STATUS_OK(z);
00263 
00264 #define XN_VALIDATE_STR_COPY(w,x,y,z)   \
00265     z = xnOSStrCopy(w, x, y);           \
00266     XN_IS_STATUS_OK(z);
00267 
00268 #define XN_VALIDATE_STRN_COPY(v,w,x,y,z)    \
00269     z = xnOSStrNCopy(v, w, x, y);           \
00270     XN_IS_STATUS_OK(z);
00271 
00272 // INI
00274 #define XN_VALIDATE_READ_INI_STR(u,v,w,x,y,z)       \
00275         z = xnOSReadStringFromINI(u, v, w, x, y);   \
00276         XN_IS_STATUS_OK(z);
00277 
00279 #define XN_VALIDATE_READ_INI_INT(v,w,x,y,z)     \
00280         z = xnOSReadIntFromINI(v, w, x, y);     \
00281         XN_IS_STATUS_OK(z);
00282 
00284 #define XN_VALIDATE_READ_INI_FLOAT(v,w,x,y,z)   \
00285         z = xnOSReadFloatFromINI(v, w, x, y);   \
00286         XN_IS_STATUS_OK(z);
00287 
00289 #define XN_VALIDATE_READ_INI_DOUBLE(v,w,x,y,z)  \
00290         z = xnOSReadDoubleFromINI(v, w, x, y);  \
00291         XN_IS_STATUS_OK(z);
00292 
00293 // Mutex
00295 #define XN_VALIDATE_LOCK_MUTEX(x,y,z)   \
00296         z = xnOSLockMutex(x, y);        \
00297         XN_IS_STATUS_OK(z);
00298 
00300 #define XN_VALIDATE_UNLOCK_MUTEX(x,z)   \
00301         z = xnOSUnLockMutex(x);         \
00302         XN_IS_STATUS_OK(z);
00303 
00304 // Files
00306 #define XN_VALIDATE_FILE_EXISTS_RET(x,y,z,w)    \
00307         y = xnOSDoesFileExist(x, &z);               \
00308         XN_IS_STATUS_OK(y);                     \
00309         if (z == FALSE)                         \
00310         {                                       \
00311             return (w);                         \
00312         }
00313 #define XN_VALIDATE_FILE_EXISTS(x,y,z)  \
00314         XN_VALIDATE_FILE_EXISTS_RET(x,y,z,XN_STATUS_OS_FILE_NOT_FOUND)
00315 
00316 //---------------------------------------------------------------------------
00317 // Exported Function Declaration
00318 //---------------------------------------------------------------------------
00319 // Common
00320 XN_C_API XnStatus XN_C_DECL xnOSInit();
00321 XN_C_API XnStatus XN_C_DECL xnOSShutdown();
00322 XN_C_API XnStatus XN_C_DECL xnOSGetInfo(xnOSInfo* pOSInfo);
00323 
00324 
00325 #if XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_WIN32_VAARGS_STYLE
00326     #define XN_NEW(type, ...)       new type(__VA_ARGS__)
00327 #elif XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_GCC_VAARGS_STYLE
00328     #define XN_NEW(type, ...)       new type(__VA_ARGS__)
00329 #elif XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_ARC_VAARGS_STYLE
00330     #define XN_NEW(type, arg...)    new type(arg)
00331 #else
00332     #define XN_NEW(type, arg)       new type(arg)
00333 #endif
00334 
00335 #define XN_NEW_ARR(type, count)     new type[count]
00336 #define XN_DELETE(p)                delete (p)
00337 #define XN_DELETE_ARR(p)            delete[] (p)
00338 
00339 typedef enum
00340 {
00341     XN_ALLOCATION_MALLOC,
00342     XN_ALLOCATION_MALLOC_ALIGNED,
00343     XN_ALLOCATION_CALLOC,
00344     XN_ALLOCATION_CALLOC_ALIGNED,
00345     XN_ALLOCATION_NEW,
00346     XN_ALLOCATION_NEW_ARRAY
00347 } XnAllocationType;
00348 
00352 XN_C_API void* XN_C_DECL xnOSLogMemAlloc(void* pMemBlock, XnAllocationType nAllocType, XnUInt32 nBytes, const XnChar* csFunction, const XnChar* csFile, XnUInt32 nLine, const XnChar* csAdditional);
00353 
00357 XN_C_API void XN_C_DECL xnOSLogMemFree(const void* pMemBlock);
00358 
00362 XN_C_API void XN_C_DECL xnOSWriteMemoryReport(const XnChar* csFileName);
00363 
00364 // for memory profiling, replace all malloc/calloc/free/new/delete calls
00365 #if (defined XN_MEM_PROFILING) && (!defined(XN_OS_IMPL))
00366     #ifdef _MSC_VER 
00367         #pragma message("Compiling with Memory Profiling!")
00368     #elif defined(__INTEL_COMPILER)
00369         #warning "Compiling with Memory Profiling!"
00370     //TODO: Add warning for linux compiler(s)
00371     #endif
00372 
00373     #ifdef __cplusplus
00374         #include <new>
00375         static void* operator new(size_t size)
00376         {
00377             void* p = xnOSMalloc(size);
00378             return xnOSLogMemAlloc(p, XN_ALLOCATION_NEW, size, "", "", 0, "");
00379         }
00380         static void* operator new[](size_t size)
00381         {
00382             void* p = xnOSMalloc(size);
00383             return xnOSLogMemAlloc(p, XN_ALLOCATION_NEW, size, "", "", 0, "");
00384         }
00385         static void* operator new(size_t size, const XnChar* csFunction, const XnChar* csFile, XnUInt32 nLine, const XnChar* csAdditional)
00386         {
00387             void* p = xnOSMalloc(size);
00388             return xnOSLogMemAlloc(p, XN_ALLOCATION_NEW, size, csFunction, csFile, nLine, csAdditional);
00389         }
00390 
00391         // called only if ctor threw exception
00392         static void operator delete(void* p, const XnChar* /*csFunction*/, const XnChar* /*csFile*/, XnUInt32 /*nLine*/, const XnChar* /*csAdditional*/)
00393         {
00394             xnOSLogMemFree(p);
00395             xnOSFree(p);
00396         }
00397 
00398         static void operator delete(void* p)
00399         {
00400             xnOSLogMemFree(p);
00401             xnOSFree(p);
00402         }
00403 
00404         static void* operator new[](size_t size, const XnChar* csFunction, const XnChar* csFile, XnUInt32 nLine, const XnChar* csAdditional)
00405         {
00406             void* p = xnOSMalloc(size);
00407             return xnOSLogMemAlloc(p, XN_ALLOCATION_NEW_ARRAY, size, csFunction, csFile, nLine, csAdditional);
00408         }
00409 
00410         // called only if ctor threw exception
00411         static void operator delete[](void* p, const XnChar* /*csFunction*/, const XnChar* /*csFile*/, XnUInt32 /*nLine*/, const XnChar* /*csAdditional*/)
00412         {
00413             xnOSLogMemFree(p);
00414             xnOSFree(p);
00415         }
00416 
00417         static void operator delete[](void* p)
00418         {
00419             xnOSLogMemFree(p);
00420             xnOSFree(p);
00421         }
00422 
00423         #define xnOSMalloc(nAllocSize)                                  xnOSLogMemAlloc(xnOSMalloc(nAllocSize), XN_ALLOCATION_MALLOC, nAllocSize, __FUNCTION__, __FILE__, __LINE__, NULL)
00424         #define xnOSMallocAligned(nAllocSize, nAlignment)               xnOSLogMemAlloc(xnOSMallocAligned(nAllocSize, nAlignment), XN_ALLOCATION_MALLOC_ALIGNED, nAllocSize, __FUNCTION__, __FILE__, __LINE__, "Aligned to " XN_STRINGIFY(nAlignment))
00425         #define xnOSCalloc(nAllocNum, nAllocSize)                       xnOSLogMemAlloc(xnOSCalloc(nAllocNum, nAllocSize), XN_ALLOCATION_CALLOC, nAllocNum*nAllocSize, __FUNCTION__, __FILE__, __LINE__, NULL)
00426         #define xnOSCallocAligned(nAllocNum, nAllocSize, nAlignment)    xnOSLogMemAlloc(xnOSCallocAligned(nAllocNum, nAllocSize, nAlignment), XN_ALLOCATION_CALLOC_ALIGNED, nAllocNum*nAllocSize, __FUNCTION__, __FILE__, __LINE__, "Aligned to " XN_STRINGIFY(nAlignment))
00427         #define xnOSFree(pMemBlock)                                     { xnOSLogMemFree(pMemBlock); xnOSFree(pMemBlock); }
00428         #define xnOSFreeAligned(pMemBlock)                              { xnOSLogMemFree(pMemBlock); xnOSFreeAligned(pMemBlock); }
00429 
00430         #undef XN_NEW
00431         #undef XN_NEW_ARR
00432 
00433         #if XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_WIN32_VAARGS_STYLE
00434             #define XN_NEW(type, ...)       new (__FUNCTION__, __FILE__, __LINE__, XN_STRINGIFY(type)) type(__VA_ARGS__)
00435         #elif XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_GCC_VAARGS_STYLE
00436             #define XN_NEW(type, arg...)    new (__FUNCTION__, __FILE__, __LINE__, XN_STRINGIFY(type)) type(arg)
00437         #else
00438             #define XN_NEW(type, arg)       new (__FUNCTION__, __FILE__, __LINE__, XN_STRINGIFY(type)) type(arg)
00439         #endif
00440 
00441         #define XN_NEW_ARR(type, count)     new (__FUNCTION__, __FILE__, __LINE__, XN_STRINGIFY(count) " " XN_STRINGIFY(type)) type[count]
00442 
00443     #endif
00444 #endif
00445 
00446 // Files
00447 XN_C_API XnStatus XN_C_DECL xnOSGetFileList(const XnChar* cpSearchPattern, const XnChar* cpPrefixPath, XnChar cpFileList[][XN_FILE_MAX_PATH], const XnUInt32 nMaxFiles, XnUInt32* pnFoundFiles);
00448 XN_C_API XnStatus XN_C_DECL xnOSOpenFile(const XnChar* cpFileName, const XnUInt32 nFlags, XN_FILE_HANDLE* pFile);
00449 XN_C_API XnStatus XN_C_DECL xnOSCloseFile(XN_FILE_HANDLE* pFile);
00450 XN_C_API XnStatus XN_C_DECL xnOSReadFile(const XN_FILE_HANDLE File, void* pBuffer, XnUInt32* pnBufferSize);
00451 XN_C_API XnStatus XN_C_DECL xnOSWriteFile(const XN_FILE_HANDLE File, const void* pBuffer, const XnUInt32 nBufferSize);
00452 XN_C_API XnStatus XN_API_DEPRECATED("Use xnOSSeekFile64() instead") XN_C_DECL 
00453                 xnOSSeekFile  (const XN_FILE_HANDLE File, const XnOSSeekType SeekType, const XnInt32 nOffset);
00454 XN_C_API XnStatus XN_C_DECL xnOSSeekFile64(const XN_FILE_HANDLE File, const XnOSSeekType SeekType, const XnInt64 nOffset);
00455 XN_C_API XnStatus XN_API_DEPRECATED("Use xnOSTellFile64() instead") XN_C_DECL 
00456                 xnOSTellFile  (const XN_FILE_HANDLE File, XnUInt32* nFilePos);
00457 XN_C_API XnStatus XN_C_DECL xnOSTellFile64(const XN_FILE_HANDLE File, XnUInt64* nFilePos);
00458 XN_C_API XnStatus XN_C_DECL xnOSFlushFile(const XN_FILE_HANDLE File);
00459 XN_C_API XnStatus XN_C_DECL xnOSDoesFileExist(const XnChar* cpFileName, XnBool* pbResult);
00460 XN_C_API XnStatus XN_C_DECL xnOSDoesDirecotyExist(const XnChar* cpDirName, XnBool* pbResult);
00461 XN_C_API XnStatus XN_C_DECL xnOSLoadFile(const XnChar* cpFileName, void* pBuffer, const XnUInt32 nBufferSize);
00462 XN_C_API XnStatus XN_C_DECL xnOSSaveFile(const XnChar* cpFileName, const void* pBuffer, const XnUInt32 nBufferSize);
00463 XN_C_API XnStatus XN_C_DECL xnOSAppendFile(const XnChar* cpFileName, const void* pBuffer, const XnUInt32 nBufferSize);
00464 XN_C_API XnStatus XN_API_DEPRECATED("Use xnOSGetFileSize64() instead") XN_C_DECL 
00465                 xnOSGetFileSize  (const XnChar* cpFileName, XnUInt32* pnFileSize);
00466 XN_C_API XnStatus XN_C_DECL xnOSGetFileSize64(const XnChar* cpFileName, XnUInt64* pnFileSize);
00467 XN_C_API XnStatus XN_C_DECL xnOSCreateDirectory(const XnChar* cpDirName);
00468 XN_C_API XnStatus XN_C_DECL xnOSGetDirName(const XnChar* cpFilePath, XnChar* cpDirName, const XnUInt32 nBufferSize);
00469 XN_C_API XnStatus XN_C_DECL xnOSGetFileName(const XnChar* cpFilePath, XnChar* cpFileName, const XnUInt32 nBufferSize);
00470 XN_C_API XnStatus XN_C_DECL xnOSGetFullPathName(const XnChar* strFilePath, XnChar* strFullPath, XnUInt32 nBufferSize);
00471 XN_C_API XnStatus XN_C_DECL xnOSGetCurrentDir(XnChar* cpDirName, const XnUInt32 nBufferSize);
00472 XN_C_API XnStatus XN_C_DECL xnOSSetCurrentDir(const XnChar* cpDirName);
00473 XN_C_API XnStatus XN_C_DECL xnOSDeleteFile(const XnChar* cpFileName);
00474 XN_C_API XnStatus XN_C_DECL xnOSDeleteEmptyDirectory(const XnChar* strDirName);
00475 XN_C_API XnStatus XN_C_DECL xnOSDeleteDirectoryTree(const XnChar* strDirName);
00476 
00477 // INI
00478 XN_C_API XnStatus XN_C_DECL xnOSReadStringFromINI(const XnChar* cpINIFile, const XnChar* cpSection, const XnChar* cpKey, XnChar* cpDest, const XnUInt32 nDestLength);
00479 XN_C_API XnStatus XN_C_DECL xnOSReadFloatFromINI(const XnChar* cpINIFile, const XnChar* cpSection, const XnChar* cpKey, XnFloat* fDest);
00480 XN_C_API XnStatus XN_C_DECL xnOSReadDoubleFromINI(const XnChar* cpINIFile, const XnChar* cpSection, const XnChar* cpKey, XnDouble* fDest);
00481 XN_C_API XnStatus XN_C_DECL xnOSReadIntFromINI(const XnChar* cpINIFile, const XnChar* cpSection, const XnChar* cpKey, XnUInt32* nDest);
00482 XN_C_API XnStatus XN_C_DECL xnOSWriteStringToINI(const XnChar* cpINIFile, const XnChar* cpSection, const XnChar* cpKey, const XnChar* cpSrc);
00483 XN_C_API XnStatus XN_C_DECL xnOSWriteFloatToINI(const XnChar* cpINIFile, const XnChar* cpSection, const XnChar* cpKey, const XnFloat fSrc);
00484 XN_C_API XnStatus XN_C_DECL xnOSWriteDoubleToINI(const XnChar* cpINIFile, const XnChar* cpSection, const XnChar* cpKey, const XnDouble fSrc);
00485 XN_C_API XnStatus XN_C_DECL xnOSWriteIntToINI(const XnChar* cpINIFile, const XnChar* cpSection, const XnChar* cpKey, const XnUInt32 nSrc);
00486 
00487 // Shared libraries
00488 XN_C_API XnStatus XN_C_DECL xnOSLoadLibrary(const XnChar* cpFileName, XN_LIB_HANDLE* pLibHandle);
00489 XN_C_API XnStatus XN_C_DECL xnOSFreeLibrary(const XN_LIB_HANDLE LibHandle);
00490 XN_C_API XnStatus XN_C_DECL xnOSGetProcAddress(const XN_LIB_HANDLE LibHandle, const XnChar* cpProcName, XnFarProc* pProcAddr);
00491 
00492 struct timespec;
00493     
00494 // Time
00495 XN_C_API XnStatus XN_C_DECL xnOSGetEpochTime(XnUInt32* nEpochTime);
00496 XN_C_API XnStatus XN_C_DECL xnOSGetTimeStamp(XnUInt64* nTimeStamp);
00497 XN_C_API XnStatus XN_C_DECL xnOSGetHighResTimeStamp(XnUInt64* nTimeStamp);
00498 XN_C_API XnStatus XN_C_DECL xnOSSleep(XnUInt32 nMilliseconds);
00499 XN_C_API XnStatus XN_C_DECL xnOSStartTimer(XnOSTimer* pTimer);
00500 XN_C_API XnStatus XN_C_DECL xnOSStartHighResTimer(XnOSTimer* pTimer);
00501 XN_C_API XnStatus XN_C_DECL xnOSQueryTimer(XnOSTimer Timer, XnUInt64* pnTimeSinceStart);
00502 XN_C_API XnStatus XN_C_DECL xnOSStopTimer(XnOSTimer* pTimer);
00503 XN_C_API XnStatus XN_C_DECL xnOSGetMonoTime(struct timespec* pTime);
00504 XN_C_API XnStatus XN_C_DECL xnOSGetTimeout(struct timespec* pTime, XnUInt32 nMilliseconds);
00505 XN_C_API XnStatus XN_C_DECL xnOSGetAbsTimeout(struct timespec* pTime, XnUInt32 nMilliseconds);
00506 
00507 // Threads
00508 typedef enum XnThreadPriority
00509 {
00510     XN_PRIORITY_LOW,
00511     XN_PRIORITY_NORMAL,
00512     XN_PRIORITY_HIGH,
00513     XN_PRIORITY_CRITICAL
00514 } XnThreadPriority;
00515 
00516 XN_C_API XnStatus XN_C_DECL xnOSCreateThread(XN_THREAD_PROC_PROTO pThreadProc, const XN_THREAD_PARAM pThreadParam, XN_THREAD_HANDLE* pThreadHandle);
00517 XN_C_API XnStatus XN_C_DECL xnOSTerminateThread(XN_THREAD_HANDLE* pThreadHandle);
00518 XN_C_API XnStatus XN_C_DECL xnOSCloseThread(XN_THREAD_HANDLE* pThreadHandle);
00519 XN_C_API XnStatus XN_C_DECL xnOSWaitForThreadExit(XN_THREAD_HANDLE ThreadHandle, XnUInt32 nMilliseconds);
00520 XN_C_API XnStatus XN_C_DECL xnOSSetThreadPriority(XN_THREAD_HANDLE ThreadHandle, XnThreadPriority nPriority);
00521 XN_C_API XnStatus XN_C_DECL xnOSGetCurrentThreadID(XN_THREAD_ID* pThreadID);
00522 XN_C_API XnStatus XN_C_DECL xnOSWaitAndTerminateThread(XN_THREAD_HANDLE* pThreadHandle, XnUInt32 nMilliseconds);
00523 
00524 // Processes
00525 XN_C_API XnStatus XN_C_DECL xnOSGetCurrentProcessID(XN_PROCESS_ID* pProcID);
00526 XN_C_API XnStatus XN_C_DECL xnOSCreateProcess(const XnChar* strExecutable, XnUInt32 nArgs, const XnChar** pstrArgs, XN_PROCESS_ID* pProcID);
00527 
00528 // Mutex
00529 XN_C_API XnStatus XN_C_DECL xnOSCreateMutex(XN_MUTEX_HANDLE* pMutexHandle);
00530 XN_C_API XnStatus XN_C_DECL xnOSCreateNamedMutex(XN_MUTEX_HANDLE* pMutexHandle, const XnChar* cpMutexName);
00531 XN_C_API XnStatus XN_C_DECL xnOSCreateNamedMutexEx(XN_MUTEX_HANDLE* pMutexHandle, const XnChar* cpMutexName, XnBool bAllowOtherUsers);
00532 XN_C_API XnStatus XN_C_DECL xnOSCloseMutex(XN_MUTEX_HANDLE* pMutexHandle);
00533 XN_C_API XnStatus XN_C_DECL xnOSLockMutex(const XN_MUTEX_HANDLE MutexHandle, XnUInt32 nMilliseconds);
00534 XN_C_API XnStatus XN_C_DECL xnOSUnLockMutex(const XN_MUTEX_HANDLE MutexHandle);
00535 
00536 // Critical Sections
00537 XN_C_API XnStatus XN_C_DECL xnOSCreateCriticalSection(XN_CRITICAL_SECTION_HANDLE* pCriticalSectionHandle);
00538 XN_C_API XnStatus XN_C_DECL xnOSCloseCriticalSection(XN_CRITICAL_SECTION_HANDLE* pCriticalSectionHandle);
00539 XN_C_API XnStatus XN_C_DECL xnOSEnterCriticalSection(XN_CRITICAL_SECTION_HANDLE* pCriticalSectionHandle);
00540 XN_C_API XnStatus XN_C_DECL xnOSLeaveCriticalSection(XN_CRITICAL_SECTION_HANDLE* pCriticalSectionHandle);
00541 
00542 // Events
00543 XN_C_API XnStatus XN_C_DECL xnOSCreateEvent(XN_EVENT_HANDLE* pEventHandle, XnBool bManualReset);
00544 XN_C_API XnStatus XN_C_DECL xnOSCreateNamedEvent(XN_EVENT_HANDLE* pEventHandle, const XnChar* cpEventName, XnBool bManualReset);
00545 XN_C_API XnStatus XN_C_DECL xnOSCreateNamedEventEx(XN_EVENT_HANDLE* pEventHandle, const XnChar* cpEventName, XnBool bManualReset, XnBool bAllowOtherUsers);
00546 XN_C_API XnStatus XN_C_DECL xnOSOpenNamedEvent(XN_EVENT_HANDLE* pEventHandle, const XnChar* cpEventName);
00547 XN_C_API XnStatus XN_C_DECL xnOSOpenNamedEventEx(XN_EVENT_HANDLE* pEventHandle, const XnChar* cpEventName, XnBool bAllowOtherUsers);
00548 XN_C_API XnStatus XN_C_DECL xnOSCloseEvent(XN_EVENT_HANDLE* pEventHandle);
00549 XN_C_API XnStatus XN_C_DECL xnOSSetEvent(const XN_EVENT_HANDLE EventHandle);
00550 XN_C_API XnStatus XN_C_DECL xnOSResetEvent(const XN_EVENT_HANDLE EventHandle);
00551 XN_C_API XnStatus XN_C_DECL xnOSWaitEvent(const XN_EVENT_HANDLE EventHandle, XnUInt32 nMilliseconds);
00552 XN_C_API XnBool XN_C_DECL xnOSIsEventSet(const XN_EVENT_HANDLE EventHandle);
00553 
00554 // Semaphores
00555 XN_C_API XnStatus XN_C_DECL xnOSCreateSemaphore(XN_SEMAPHORE_HANDLE* pSemaphoreHandle, XnUInt32 nInitialCount);
00556 XN_C_API XnStatus XN_C_DECL xnOSLockSemaphore(XN_SEMAPHORE_HANDLE hSemaphore, XnUInt32 nMilliseconds);
00557 XN_C_API XnStatus XN_C_DECL xnOSUnlockSemaphore(XN_SEMAPHORE_HANDLE hSemaphore);
00558 XN_C_API XnStatus XN_C_DECL xnOSCloseSemaphore(XN_SEMAPHORE_HANDLE* pSemaphoreHandle);
00559 
00568 XN_C_API XnStatus XN_C_DECL xnOSWaitForCondition(const XN_EVENT_HANDLE EventHandle, XnUInt32 nMilliseconds, XnConditionFunc pConditionFunc, void* pConditionData);
00569 
00570 // Network
00571 struct xnOSSocket;
00572 typedef struct xnOSSocket* XN_SOCKET_HANDLE;
00573 
00574 #define XN_SOCKET_DEFAULT_TIMEOUT 0xFFFEFFFE
00575 
00576 XN_C_API XnStatus XN_C_DECL xnOSInitNetwork();
00577 XN_C_API XnStatus XN_C_DECL xnOSShutdownNetwork();
00578 XN_C_API XnStatus XN_C_DECL xnOSCreateSocket(const XnOSSocketType SocketType, const XnChar* cpIPAddress, const XnUInt16 nPort, XN_SOCKET_HANDLE* SocketPtr);
00579 XN_C_API XnStatus XN_C_DECL xnOSCloseSocket(XN_SOCKET_HANDLE Socket);
00580 XN_C_API XnStatus XN_C_DECL xnOSBindSocket(XN_SOCKET_HANDLE Socket);
00581 XN_C_API XnStatus XN_C_DECL xnOSListenSocket(XN_SOCKET_HANDLE Socket);
00582 XN_C_API XnStatus XN_C_DECL xnOSAcceptSocket(XN_SOCKET_HANDLE ListenSocket, XN_SOCKET_HANDLE* AcceptSocketPtr, XnUInt32 nMillisecsTimeout);
00583 XN_C_API XnStatus XN_C_DECL xnOSConnectSocket(XN_SOCKET_HANDLE Socket, XnUInt32 nMillisecsTimeout);
00584 XN_C_API XnStatus XN_C_DECL xnOSSetSocketBufferSize(XN_SOCKET_HANDLE Socket, const XnUInt32 nSocketBufferSize);
00585 XN_C_API XnStatus XN_C_DECL xnOSSendNetworkBuffer(XN_SOCKET_HANDLE Socket, const XnChar* cpBuffer, const XnUInt32 nBufferSize);
00586 XN_C_API XnStatus XN_C_DECL xnOSSendToNetworkBuffer(XN_SOCKET_HANDLE Socket, const XnChar* cpBuffer, const XnUInt32 nBufferSize, XN_SOCKET_HANDLE SocketTo);
00587 XN_C_API XnStatus XN_C_DECL xnOSReceiveNetworkBuffer(XN_SOCKET_HANDLE Socket, XnChar* cpBuffer, XnUInt32* pnBufferSize, XnUInt32 nMillisecsTimeout);
00588 XN_C_API XnStatus XN_C_DECL xnOSReceiveFromNetworkBuffer(XN_SOCKET_HANDLE Socket, XnChar* cpBuffer, XnUInt32* pnBufferSize, XN_SOCKET_HANDLE* SocketFrom);
00589 
00590 // Shared Memory
00591 typedef struct XnOSSharedMemory XnOSSharedMemory, *XN_SHARED_MEMORY_HANDLE;
00592 
00601 XN_C_API XnStatus XN_C_DECL xnOSCreateSharedMemory(const XnChar* strName, XnUInt32 nSize, XnUInt32 nAccessFlags, XN_SHARED_MEMORY_HANDLE* phSharedMem);
00602 
00603 XN_C_API XnStatus XN_C_DECL xnOSCreateSharedMemoryEx(const XnChar* strName, XnUInt32 nSize, XnUInt32 nAccessFlags, XnBool bAllowOtherUsers, XN_SHARED_MEMORY_HANDLE* phSharedMem);
00604 
00612 XN_C_API XnStatus XN_C_DECL xnOSOpenSharedMemory(const XnChar* strName, XnUInt32 nAccessFlags, XN_SHARED_MEMORY_HANDLE* phSharedMem);
00613 
00614 XN_C_API XnStatus XN_C_DECL xnOSOpenSharedMemoryEx(const XnChar* strName, XnUInt32 nAccessFlags, XnBool bAllowOtherUsers, XN_SHARED_MEMORY_HANDLE* phSharedMem);
00615 
00621 XN_C_API XnStatus XN_C_DECL xnOSCloseSharedMemory(XN_SHARED_MEMORY_HANDLE hSharedMem);
00622 
00629 XN_C_API XnStatus XN_C_DECL xnOSSharedMemoryGetAddress(XN_SHARED_MEMORY_HANDLE hSharedMem, void** ppAddress);
00630 
00631 // Keyboard
00632 XN_C_API XnBool XN_C_DECL xnOSWasKeyboardHit();
00633 XN_C_API XnChar XN_C_DECL xnOSReadCharFromInput();
00634 
00635 // Debug Utilities
00636 XN_C_API XnStatus XN_C_DECL xnOSGetCurrentCallStack(XnUInt32 nFramesToSkip, XnChar** astrFrames, XnUInt32 nMaxNameLength, XnUInt32* pnFrames);
00637 
00638 XN_STATUS_MESSAGE_MAP_START(XN_ERROR_GROUP_OS)
00639 XN_STATUS_MESSAGE(XN_STATUS_ALLOC_FAILED, "Memory allocation failed!")
00640 XN_STATUS_MESSAGE(XN_STATUS_OS_ALREADY_INIT, "Xiron OS already initialized!")
00641 XN_STATUS_MESSAGE(XN_STATUS_OS_NOT_INIT, "Xiron OS was not initialized!")
00642 XN_STATUS_MESSAGE(XN_STATUS_OS_FILE_NOT_FOUND, "File not found!")
00643 XN_STATUS_MESSAGE(XN_STATUS_OS_INI_FILE_NOT_FOUND, "INI file not found!")
00644 XN_STATUS_MESSAGE(XN_STATUS_OS_FILE_ALREDY_EXISTS, "File already exists!")
00645 XN_STATUS_MESSAGE(XN_STATUS_OS_FILE_OPEN_FAILED, "Failed to open the file!")
00646 XN_STATUS_MESSAGE(XN_STATUS_OS_FILE_CLOSE_FAILED, "Failed to close the file!")
00647 XN_STATUS_MESSAGE(XN_STATUS_OS_FILE_READ_FAILED, "Failed to read from the file!")
00648 XN_STATUS_MESSAGE(XN_STATUS_OS_FILE_WRITE_FAILED, "Failed to write to the file!")
00649 XN_STATUS_MESSAGE(XN_STATUS_OS_FILE_SEEK_FAILED, "File seek failed!")
00650 XN_STATUS_MESSAGE(XN_STATUS_OS_FILE_TELL_FAILED, "File Tell failed!")
00651 XN_STATUS_MESSAGE(XN_STATUS_OS_FILE_FLUSH_FAILED, "File Flush failed!")
00652 XN_STATUS_MESSAGE(XN_STATUS_OS_FILE_GET_SIZE_FAILED, "Get File Size failed!")
00653 XN_STATUS_MESSAGE(XN_STATUS_OS_INI_READ_FAILED, "Failed to read from INI file!")
00654 XN_STATUS_MESSAGE(XN_STATUS_OS_INI_WRITE_FAILED, "Failed to write into INI file!")
00655 XN_STATUS_MESSAGE(XN_STATUS_OS_INVALID_SEEK_TYPE, "Invalid seek type!")
00656 XN_STATUS_MESSAGE(XN_STATUS_OS_THREAD_CREATION_FAILED, "Xiron OS failed to create a thread!")
00657 XN_STATUS_MESSAGE(XN_STATUS_OS_THREAD_TERMINATION_FAILED, "Xiron OS failed to terminate a thread!")
00658 XN_STATUS_MESSAGE(XN_STATUS_OS_THREAD_CLOSE_FAILED, "Xiron OS failed to close a thread!")
00659 XN_STATUS_MESSAGE(XN_STATUS_OS_THREAD_TIMEOUT, "Xiron OS got a thread timeout while waiting for a thread to exit!")
00660 XN_STATUS_MESSAGE(XN_STATUS_OS_THREAD_WAIT_FAILED, "Xiron OS failed to wait for a thread to exit!")
00661 XN_STATUS_MESSAGE(XN_STATUS_OS_THREAD_SET_PRIORITY_FAILED, "Xiron OS failed to set priority of a thread!")
00662 XN_STATUS_MESSAGE(XN_STATUS_OS_THREAD_UNSUPPORTED_PRIORITY, "Thread priority is unsupported by Xiron OS!")
00663 XN_STATUS_MESSAGE(XN_STATUS_OS_MUTEX_CREATION_FAILED, "Xiron OS failed to create a mutex!")
00664 XN_STATUS_MESSAGE(XN_STATUS_OS_MUTEX_CLOSE_FAILED, "Xiron OS failed to close a mutex!")
00665 XN_STATUS_MESSAGE(XN_STATUS_OS_MUTEX_LOCK_FAILED, "Xiron OS failed to lock a mutex!")
00666 XN_STATUS_MESSAGE(XN_STATUS_OS_MUTEX_TIMEOUT, "Xiron OS got a mutex timeout!")
00667 XN_STATUS_MESSAGE(XN_STATUS_OS_MUTEX_UNLOCK_FAILED, "Xiron OS failed to unlock a mutex!")
00668 XN_STATUS_MESSAGE(XN_STATUS_OS_EVENT_CREATION_FAILED, "Xiron OS failed to create an event!")
00669 XN_STATUS_MESSAGE(XN_STATUS_OS_EVENT_CLOSE_FAILED, "Xiron OS failed to close an event!")
00670 XN_STATUS_MESSAGE(XN_STATUS_OS_EVENT_SET_FAILED, "Xiron OS failed to set an event!")
00671 XN_STATUS_MESSAGE(XN_STATUS_OS_EVENT_RESET_FAILED, "Xiron OS failed to reset an event!")
00672 XN_STATUS_MESSAGE(XN_STATUS_OS_EVENT_TIMEOUT, "Xiron OS got an event timeout!")
00673 XN_STATUS_MESSAGE(XN_STATUS_OS_EVENT_WAIT_FAILED, "Xiron OS failed to wait on event!")
00674 XN_STATUS_MESSAGE(XN_STATUS_OS_EVENT_CANCELED, "This Xiron OS event was canceled!")
00675 XN_STATUS_MESSAGE(XN_STATUS_OS_CANT_LOAD_LIB, "Xiron OS failed to load shared library!")
00676 XN_STATUS_MESSAGE(XN_STATUS_OS_CANT_FREE_LIB, "Xiron OS failed to free shared library!")
00677 XN_STATUS_MESSAGE(XN_STATUS_OS_PROC_NOT_FOUND, "Xiron OS failed to get procedure address from shared library!")
00678 XN_STATUS_MESSAGE(XN_STATUS_OS_NETWORK_INIT_FAILED, "Xiron OS failed to initialize the network subsystem!")
00679 XN_STATUS_MESSAGE(XN_STATUS_OS_NETWORK_SHUTDOWN_FAILED, "Xiron OS failed to shutdown the network subsystem!")
00680 XN_STATUS_MESSAGE(XN_STATUS_OS_NETWORK_SOCKET_CREATION_FAILED, "Xiron OS failed to create a network socket!")
00681 XN_STATUS_MESSAGE(XN_STATUS_OS_NETWORK_INVALID_SOCKET_TYPE, "Invalid Xiron OS socket type!")
00682 XN_STATUS_MESSAGE(XN_STATUS_OS_NETWORK_SOCKET_BUFFER_FAILED, "Failed to change the Xiron OS socket buffer size!")
00683 XN_STATUS_MESSAGE(XN_STATUS_OS_NETWORK_SEND_FAILED, "Xiron OS failed to send a network buffer!")
00684 XN_STATUS_MESSAGE(XN_STATUS_OS_NETWORK_RECEIVE_FAILED, "Xiron OS failed to receive a network buffer!")
00685 XN_STATUS_MESSAGE(XN_STATUS_OS_NETWORK_SOCKET_BIND_FAILED, "Xiron OS failed to bind a network socket!")
00686 XN_STATUS_MESSAGE(XN_STATUS_OS_NETWORK_SOCKET_LISTEN_FAILED, "Xiron OS failed to listen on a network socket!")
00687 XN_STATUS_MESSAGE(XN_STATUS_OS_NETWORK_SOCKET_ACCEPT_FAILED, "Xiron OS failed to accept a network socket!")
00688 XN_STATUS_MESSAGE(XN_STATUS_OS_NETWORK_SOCKET_CONNECT_FAILED, "Xiron OS failed to connect to a network socket!")
00689 XN_STATUS_MESSAGE(XN_STATUS_OS_NETWORK_BAD_HOST_NAME, "Failed to resolve the host name!")
00690 XN_STATUS_MESSAGE(XN_STATUS_OS_NETWORK_TIMEOUT, "Got a timeout while waiting for a network command to complete!")
00691 XN_STATUS_MESSAGE(XN_STATUS_OS_TIMER_CREATION_FAILED, "Xiron OS failed to create a timer!")
00692 XN_STATUS_MESSAGE(XN_STATUS_OS_TIMER_QUERY_FAILED, "Xiron OS failed to query a timer!")
00693 XN_STATUS_MESSAGE(XN_STATUS_OS_INVALID_TIMER, "This Xiron OS timer is invalid!")
00694 XN_STATUS_MESSAGE(XN_STATUS_OS_INVALID_FILE, "This Xiron OS file is invalid!")
00695 XN_STATUS_MESSAGE(XN_STATUS_OS_INVALID_SOCKET, "This Xiron OS socket is invalid!")
00696 XN_STATUS_MESSAGE(XN_STATUS_OS_INVALID_MUTEX, "This Xiron OS mutex is invalid!")
00697 XN_STATUS_MESSAGE(XN_STATUS_OS_INVALID_THREAD, "This Xiron OS thread is invalid!")
00698 XN_STATUS_MESSAGE(XN_STATUS_OS_INVALID_EVENT, "This Xiron OS event is invalid!")
00699 XN_STATUS_MESSAGE(XN_STATUS_OS_INVALID_LIBRARY, "This Xiron OS shared library is invalid!")
00700 XN_STATUS_MESSAGE(XN_STATUS_OS_INVALID_CRITICAL_SECTION, "This Xiron OS critical section is invalid!")
00701 XN_STATUS_MESSAGE(XN_STATUS_OS_INVALID_FORMAT_STRING, "Xiron OS got an invalid format string!")
00702 XN_STATUS_MESSAGE(XN_STATUS_OS_UNSUPPORTED_FUNCTION, "This Xiron OS function is not supported!")
00703 XN_STATUS_MESSAGE(XN_STATUS_OS_FAILED_TO_CREATE_DIR, "Failed to create a directory!")
00704 XN_STATUS_MESSAGE(XN_STATUS_OS_FAILED_TO_DELETE_FILE, "Failed to delete a file!")
00705 XN_STATUS_MESSAGE(XN_STATUS_OS_FAILED_TO_CREATE_SHARED_MEMORY, "Failed to create shared memory!")
00706 XN_STATUS_MESSAGE(XN_STATUS_OS_FAILED_TO_OPEN_SHARED_MEMORY, "Failed to open shared memory!")
00707 XN_STATUS_MESSAGE(XN_STATUS_OS_FAILED_TO_CLOSE_SHARED_MEMORY, "Failed to close shared memory!")
00708 XN_STATUS_MESSAGE(XN_STATUS_USB_ALREADY_INIT, "The Xiron USB subsystem was already initialize!")
00709 XN_STATUS_MESSAGE(XN_STATUS_USB_NOT_INIT, "The Xiron USB subsystem was not initialized!")
00710 XN_STATUS_MESSAGE(XN_STATUS_USB_INIT_FAILED, "The Xiron USB subsystem failed to initialize!")
00711 XN_STATUS_MESSAGE(XN_STATUS_USB_SHUTDOWN_FAILED, "The Xiron USB subsystem failed to shutdown!")
00712 XN_STATUS_MESSAGE(XN_STATUS_USB_ENUMERATE_FAILED, "The Xiron USB subsystem failed to enumerate devices!")
00713 XN_STATUS_MESSAGE(XN_STATUS_USB_LOAD_FAILED, "The Xiron USB subsystem failed to load!")
00714 XN_STATUS_MESSAGE(XN_STATUS_USB_FREE_FAILED, "The Xiron USB subsystem failed to free!")
00715 XN_STATUS_MESSAGE(XN_STATUS_USB_REGISTER_FAILED, "The Xiron USB subsystem failed to register the device!")
00716 XN_STATUS_MESSAGE(XN_STATUS_USB_UNREGISTER_FAILED, "The Xiron USB subsystem failed to unregister the device!")
00717 XN_STATUS_MESSAGE(XN_STATUS_USB_DEVICE_NOT_VALID, "Invalid Xiron USB device handle!")
00718 XN_STATUS_MESSAGE(XN_STATUS_USB_ENDPOINT_NOT_VALID, "Invalid Xiron USB endpoint handle!")
00719 XN_STATUS_MESSAGE(XN_STATUS_USB_DRIVER_NOT_FOUND, "USB driver not found!")
00720 XN_STATUS_MESSAGE(XN_STATUS_USB_DEVICE_NOT_FOUND, "USB device not found!")
00721 XN_STATUS_MESSAGE(XN_STATUS_USB_DEVICE_OPEN_FAILED, "Failed to open the USB device!")
00722 XN_STATUS_MESSAGE(XN_STATUS_USB_DEVICE_CLOSE_FAILED, "Failed to close the USB device!")
00723 XN_STATUS_MESSAGE(XN_STATUS_USB_DEVICE_GETINFO_FAILED, "Failed to get information about the USB device!")
00724 XN_STATUS_MESSAGE(XN_STATUS_USB_CONFIG_QUERY_FAILED, "USB config query failed!")
00725 XN_STATUS_MESSAGE(XN_STATUS_USB_INTERFACE_QUERY_FAILED, "USB interface query failed!")
00726 XN_STATUS_MESSAGE(XN_STATUS_USB_ENDPOINT_QUERY_FAILED, "USB endpoint query failed!")
00727 XN_STATUS_MESSAGE(XN_STATUS_USB_SET_ENDPOINT_POLICY_FAILED, "Failed to set USB endpoint policy!")
00728 XN_STATUS_MESSAGE(XN_STATUS_USB_UNKNOWN_ENDPOINT_TYPE, "Unknown USB endpoint type!")
00729 XN_STATUS_MESSAGE(XN_STATUS_USB_UNKNOWN_ENDPOINT_DIRECTION, "Unknown USB endpoint direction!")
00730 XN_STATUS_MESSAGE(XN_STATUS_USB_GET_SPEED_FAILED, "Failed to get the device speed!")
00731 XN_STATUS_MESSAGE(XN_STATUS_USB_GET_DRIVER_VERSION, "Failed to get the USB driver version!")
00732 XN_STATUS_MESSAGE(XN_STATUS_USB_UNKNOWN_DEVICE_SPEED, "Unknown USB device speed!")
00733 XN_STATUS_MESSAGE(XN_STATUS_USB_CONTROL_SEND_FAILED, "Failed to send a USB control request!")
00734 XN_STATUS_MESSAGE(XN_STATUS_USB_CONTROL_RECV_FAILED, "Failed to receive a USB control request!")
00735 XN_STATUS_MESSAGE(XN_STATUS_USB_ENDPOINT_READ_FAILED, "Failed to read from a USB endpoint!")
00736 XN_STATUS_MESSAGE(XN_STATUS_USB_ENDPOINT_WRITE_FAILED, "Failed to write into a USB endpoint!")
00737 XN_STATUS_MESSAGE(XN_STATUS_USB_TRANSFER_TIMEOUT, "USB transfer timeout!")
00738 XN_STATUS_MESSAGE(XN_STATUS_USB_TRANSFER_STALL, "USB transfer stall!")
00739 XN_STATUS_MESSAGE(XN_STATUS_USB_TRANSFER_MICRO_FRAME_ERROR, "USB transfer micro frame error!")
00740 XN_STATUS_MESSAGE(XN_STATUS_USB_TRANSFER_UNKNOWN_ERROR, "Unknown USB transfer error!")
00741 XN_STATUS_MESSAGE(XN_STATUS_USB_ENDPOINT_NOT_FOUND, "USB endpoint not found on device!")
00742 XN_STATUS_MESSAGE(XN_STATUS_USB_WRONG_ENDPOINT_TYPE, "Wrong USB endpoint type requested!")
00743 XN_STATUS_MESSAGE(XN_STATUS_USB_WRONG_ENDPOINT_DIRECTION, "Wrong USB endpoint direction requested!")
00744 XN_STATUS_MESSAGE(XN_STATUS_USB_WRONG_CONTROL_TYPE, "Wrong USB control type requested!")
00745 XN_STATUS_MESSAGE(XN_STATUS_USB_UNSUPPORTED_ENDPOINT_TYPE, "Unsupported USB endpoint type!")
00746 XN_STATUS_MESSAGE(XN_STATUS_USB_GOT_UNEXPECTED_BYTES, "Got unexpected bytes in USB transfer!")
00747 XN_STATUS_MESSAGE(XN_STATUS_USB_TOO_MUCH_DATA, "Got too much data in USB transfer!")
00748 XN_STATUS_MESSAGE(XN_STATUS_USB_NOT_ENOUGH_DATA, "Didn't get enough data in USB transfer!")
00749 XN_STATUS_MESSAGE(XN_STATUS_USB_BUFFER_TOO_SMALL, "USB Buffer is too small!")
00750 XN_STATUS_MESSAGE(XN_STATUS_USB_OVERLAPIO_FAILED, "USB Overlapped I/O operation failed!")
00751 XN_STATUS_MESSAGE(XN_STATUS_USB_ABORT_FAILED, "Failed to abort USB endpoint!")
00752 XN_STATUS_MESSAGE(XN_STATUS_USB_FLUSH_FAILED, "Failed to flush USB endpoint!")
00753 XN_STATUS_MESSAGE(XN_STATUS_USB_RESET_FAILED, "Failed to reset USB endpoint!")
00754 XN_STATUS_MESSAGE(XN_STATUS_USB_SET_INTERFACE_FAILED, "Failed to set USB interface!")
00755 XN_STATUS_MESSAGE(XN_STATUS_USB_GET_INTERFACE_FAILED, "Failed to get USB interface!")
00756 XN_STATUS_MESSAGE(XN_STATUS_USB_READTHREAD_NOT_INIT, "Read thread is not initialized for this USB end point!")
00757 XN_STATUS_MESSAGE(XN_STATUS_USB_READTHREAD_ALREADY_INIT, "Read thread is already initialized for this USB end point!")
00758 XN_STATUS_MESSAGE(XN_STATUS_USB_READTHREAD_SHUTDOWN_FAILED, "Read thread failed to shutdown properly!")
00759 XN_STATUS_MESSAGE(XN_STATUS_USB_IS_BUSY, "USB is busy!")
00760 XN_STATUS_MESSAGE(XN_STATUS_USB_NOT_BUSY, "USB is not busy!")
00761 XN_STATUS_MESSAGE(XN_STATUS_USB_SET_CONFIG_FAILED, "Failed to set USB config!")
00762 XN_STATUS_MESSAGE(XN_STATUS_USB_GET_CONFIG_FAILED, "Failed to get USB config!")
00763 XN_STATUS_MESSAGE(XN_STATUS_USB_OPEN_ENDPOINT_FAILED, "Failed to open an USB endpoint!")
00764 XN_STATUS_MESSAGE(XN_STATUS_USB_CLOSE_ENDPOINT_FAILED, "Failed to close an USB endpoint!")
00765 XN_STATUS_MESSAGE(XN_STATUS_USB_ALREADY_OPEN, "A device is already opened!")
00766 XN_STATUS_MESSAGE(XN_STATUS_USB_TRANSFER_PENDING, "USB transfer is still pending!")
00767 XN_STATUS_MESSAGE(XN_STATUS_USB_INTERFACE_NOT_SUPPORTED, "USB interface is not supported!")
00768 XN_STATUS_MESSAGE(XN_STATUS_USB_FAILED_TO_REGISTER_CALLBACK, "Failed to register the USB device callback!")
00769 XN_STATUS_MESSAGE(XN_STATUS_OS_NETWORK_CONNECTION_CLOSED, "The network connection has been closed!")
00770 XN_STATUS_MESSAGE(XN_STATUS_OS_EVENT_OPEN_FAILED, "Xiron OS failed to open an event!")
00771 XN_STATUS_MESSAGE(XN_STATUS_OS_PROCESS_CREATION_FAILED, "Xiron OS failed to create a process!")
00772 XN_STATUS_MESSAGE(XN_STATUS_OS_SEMAPHORE_CREATION_FAILED, "Xiron OS Failed to create a semaphore!")
00773 XN_STATUS_MESSAGE(XN_STATUS_OS_SEMAPHORE_CLOSE_FAILED, "Xiron OS failed to close a semaphore!")
00774 XN_STATUS_MESSAGE(XN_STATUS_OS_SEMAPHORE_LOCK_FAILED, "Xiron OS failed to lock a semaphore!")
00775 XN_STATUS_MESSAGE(XN_STATUS_OS_SEMAPHORE_UNLOCK_FAILED, "Xiron OS failed to unlock a semaphore!")
00776 XN_STATUS_MESSAGE(XN_STATUS_OS_SEMAPHORE_TIMEOUT, "Xiron OS got a semaphore timeout!")
00777 XN_STATUS_MESSAGE(XN_STATUS_OS_INVALID_SEMAPHORE, "This Xiron OS semaphore is invalid!")
00778 XN_STATUS_MESSAGE(XN_STATUS_OS_ENV_VAR_NOT_FOUND, "The environment variable could not be found!")
00779 XN_STATUS_MESSAGE(XN_STATUS_USB_NO_REQUEST_PENDING, "There is no request pending!")
00780 XN_STATUS_MESSAGE(XN_STATUS_OS_FAILED_TO_DELETE_DIR, "Failed to delete a directory!")
00781 XN_STATUS_MESSAGE_MAP_END(XN_ERROR_GROUP_OS)
00782 
00783 #endif //__XN_OS_H__
00784 
Generated on Wed May 16 2012 10:16:05 for OpenNI 1.5.4 by   doxygen 1.7.5.1