00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef __XN_OS_H__
00027 #define __XN_OS_H__
00028
00029
00030
00031
00032 #include "XnPlatform.h"
00033 #include "XnMacros.h"
00034 #include "XnStatusCodes.h"
00035
00036
00037
00038
00039 #define XN_MASK_OS "xnOS"
00040
00041
00042
00043
00044
00045
00046
00047 #if defined(_WIN32)
00048 #include "Win32/XnOSWin32.h"
00049 #elif defined(linux)
00050 #include "Linux-x86/XnOSLinux-x86.h"
00051 #endif
00052
00053
00054
00055
00056 #define XN_MAX_OS_NAME_LENGTH 255
00057
00058 typedef struct xnOSInfo
00059 {
00060 XnChar csOSName[XN_MAX_OS_NAME_LENGTH];
00061 XnChar csCPUName[XN_MAX_OS_NAME_LENGTH];
00062 XnUInt32 nProcessorsCount;
00063 XnUInt64 nTotalMemory;
00064 } xnOSInfo;
00065
00066 typedef XnBool (XN_CALLBACK_TYPE* XnConditionFunc)(void* pConditionData);
00067
00068
00069
00070
00072 extern XnOSTimer g_xnOSHighResGlobalTimer;
00073
00074
00075
00076
00077
00079 #define XN_OS_FILE_READ 0x01
00080
00081 #define XN_OS_FILE_WRITE 0x02
00082
00083 #define XN_OS_FILE_CREATE_NEW_ONLY 0x04
00084
00085 #define XN_OS_FILE_TRUNCATE 0x08
00086
00087 #define XN_OS_FILE_APPEND 0x10
00088
00089 #define XN_OS_FILE_AUTO_FLUSH 0x20
00090
00091
00093 typedef enum {
00095 XN_OS_SEEK_SET = 0,
00097 XN_OS_SEEK_CUR,
00099 XN_OS_SEEK_END
00100 } XnOSSeekType;
00101
00102
00103
00104
00105
00107 typedef enum {
00109 XN_OS_UDP_SOCKET = 0,
00111 XN_OS_TCP_SOCKET
00112 } XnOSSocketType;
00113
00114 #define XN_OS_NETWORK_LOCAL_HOST "127.0.0.1"
00115
00116
00117
00118
00119
00121 #define XN_VALIDATE_INPUT_PTR(x) XN_VALIDATE_PTR(x, XN_STATUS_NULL_INPUT_PTR)
00122
00124 #define XN_VALIDATE_OUTPUT_PTR(x) XN_VALIDATE_PTR(x, XN_STATUS_NULL_OUTPUT_PTR)
00125
00126 #define XN_VALIDATE_ALLOC_PTR(x) XN_VALIDATE_PTR(x, XN_STATUS_ALLOC_FAILED)
00127
00129 #define XN_VALIDATE_ALLOC(x,y) \
00130 x = (y*)xnOSMalloc(sizeof(y)); \
00131 XN_VALIDATE_ALLOC_PTR(x);
00132
00134 #define XN_VALIDATE_CALLOC(x,y,z) \
00135 x = (y*)xnOSCalloc(z, sizeof(y)); \
00136 XN_VALIDATE_ALLOC_PTR(x);
00137
00139 #define XN_VALIDATE_ALIGNED_ALLOC(x,y,w) \
00140 x = (y*)xnOSMallocAligned(sizeof(y), w); \
00141 XN_VALIDATE_ALLOC_PTR(x);
00142
00144 #define XN_VALIDATE_ALIGNED_CALLOC(x,y,z,w) \
00145 x = (y*)xnOSCallocAligned(z, sizeof(y), w); \
00146 XN_VALIDATE_ALLOC_PTR(x);
00147
00149 #define XN_FREE_AND_NULL(x) \
00150 if (x != NULL) \
00151 { \
00152 xnOSFree(x); \
00153 x = NULL; \
00154 }
00155
00156 #define XN_ALIGNED_FREE_AND_NULL(x) \
00157 if (x != NULL) \
00158 { \
00159 xnOSFreeAligned(x); \
00160 x = NULL; \
00161 }
00162
00164 #if XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_WIN32_VAARGS_STYLE
00165 #define XN_VALIDATE_NEW(ptr, type, ...) \
00166 do { \
00167 (ptr) = XN_NEW(type, __VA_ARGS__); \
00168 if ((ptr) == NULL) \
00169 { \
00170 return (XN_STATUS_ALLOC_FAILED); \
00171 } \
00172 } while (0)
00173 #elif XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_GCC_VAARGS_STYLE
00174 #define XN_VALIDATE_NEW(ptr, type, ...) \
00175 do { \
00176 (ptr) = XN_NEW(type, ##__VA_ARGS__); \
00177 if ((ptr) == NULL) \
00178 { \
00179 return (XN_STATUS_ALLOC_FAILED); \
00180 } \
00181 } while (0)
00182 #elif XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_ARC_VAARGS_STYLE
00183 #define XN_VALIDATE_NEW(ptr, type...) \
00184 do { \
00185 (ptr) = XN_NEW(type); \
00186 if ((ptr) == NULL) \
00187 { \
00188 return (XN_STATUS_ALLOC_FAILED); \
00189 } \
00190 } while (0)
00191 #else
00192 #define XN_VALIDATE_NEW(ptr, type) \
00193 do { \
00194 (ptr) = XN_NEW(type); \
00195 if ((ptr) == NULL) \
00196 { \
00197 return (XN_STATUS_ALLOC_FAILED); \
00198 } \
00199 } while (0)
00200 #endif
00201
00203 #if XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_WIN32_VAARGS_STYLE
00204 #define XN_VALIDATE_NEW_AND_INIT(ptr, type, ...) \
00205 do { \
00206 XN_VALIDATE_NEW(ptr, type, __VA_ARGS__); \
00207 XnStatus rc = (ptr)->Init(); \
00208 if (rc != XN_STATUS_OK) \
00209 { \
00210 XN_DELETE(ptr); \
00211 return (rc); \
00212 } \
00213 } while (0)
00214 #elif XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_GCC_VAARGS_STYLE
00215 #define XN_VALIDATE_NEW_AND_INIT(ptr, type, ...) \
00216 do { \
00217 XN_VALIDATE_NEW(ptr, type, ##__VA_ARGS__); \
00218 XnStatus rc = (ptr)->Init(); \
00219 if (rc != XN_STATUS_OK) \
00220 { \
00221 XN_DELETE(ptr); \
00222 return (rc); \
00223 } \
00224 } while (0)
00225 #elif XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_ARC_VAARGS_STYLE
00226 #define XN_VALIDATE_NEW_AND_INIT(ptr, type...) \
00227 do { \
00228 XN_VALIDATE_NEW(ptr, type); \
00229 XnStatus rc = (ptr)->Init(); \
00230 if (rc != XN_STATUS_OK) \
00231 { \
00232 XN_DELETE(ptr); \
00233 return (rc); \
00234 } \
00235 } while (0)
00236 #else
00237 #define XN_VALIDATE_NEW_AND_INIT(ptr, type) \
00238 do { \
00239 XN_VALIDATE_NEW(ptr, type); \
00240 XnStatus rc = (ptr)->Init(); \
00241 if (rc != XN_STATUS_OK) \
00242 { \
00243 XN_DELETE(ptr); \
00244 return (rc); \
00245 } \
00246 } while (0)
00247 #endif
00248
00249
00251 #define XN_VALIDATE_STR_APPEND(w,x,y,z) \
00252 z = xnOSStrAppend(w, x, y); \
00253 XN_IS_STATUS_OK(z);
00254
00256 #define XN_VALIDATE_STR_PREFIX(w,x,y,z) \
00257 z = xnOSStrPrefix(w, x, y); \
00258 XN_IS_STATUS_OK(z);
00259
00260 #define XN_VALIDATE_STR_COPY(w,x,y,z) \
00261 z = xnOSStrCopy(w, x, y); \
00262 XN_IS_STATUS_OK(z);
00263
00264 #define XN_VALIDATE_STRN_COPY(v,w,x,y,z) \
00265 z = xnOSStrNCopy(v, w, x, y); \
00266 XN_IS_STATUS_OK(z);
00267
00268
00270 #define XN_VALIDATE_READ_INI_STR(u,v,w,x,y,z) \
00271 z = xnOSReadStringFromINI(u, v, w, x, y); \
00272 XN_IS_STATUS_OK(z);
00273
00275 #define XN_VALIDATE_READ_INI_INT(v,w,x,y,z) \
00276 z = xnOSReadIntFromINI(v, w, x, y); \
00277 XN_IS_STATUS_OK(z);
00278
00280 #define XN_VALIDATE_READ_INI_FLOAT(v,w,x,y,z) \
00281 z = xnOSReadFloatFromINI(v, w, x, y); \
00282 XN_IS_STATUS_OK(z);
00283
00285 #define XN_VALIDATE_READ_INI_DOUBLE(v,w,x,y,z) \
00286 z = xnOSReadDoubleFromINI(v, w, x, y); \
00287 XN_IS_STATUS_OK(z);
00288
00289
00291 #define XN_VALIDATE_LOCK_MUTEX(x,y,z) \
00292 z = xnOSLockMutex(x, y); \
00293 XN_IS_STATUS_OK(z);
00294
00296 #define XN_VALIDATE_UNLOCK_MUTEX(x,z) \
00297 z = xnOSUnLockMutex(x); \
00298 XN_IS_STATUS_OK(z);
00299
00300
00302 #define XN_VALIDATE_FILE_EXISTS_RET(x,y,z,w) \
00303 y = xnOSDoesFileExist(x, &z); \
00304 XN_IS_STATUS_OK(y); \
00305 if (z == FALSE) \
00306 { \
00307 return (w); \
00308 }
00309 #define XN_VALIDATE_FILE_EXISTS(x,y,z) \
00310 XN_VALIDATE_FILE_EXISTS_RET(x,y,z,XN_STATUS_OS_FILE_NOT_FOUND)
00311
00312
00313
00314
00315
00316 XN_C_API XnStatus xnOSInit();
00317 XN_C_API XnStatus xnOSShutdown();
00318 XN_C_API XnStatus xnOSGetInfo(xnOSInfo* pOSInfo);
00319
00320
00321 XN_C_API void* xnOSMalloc(const XnSizeT nAllocSize);
00322 XN_C_API void* xnOSMallocAligned(const XnSizeT nAllocSize, const XnSizeT nAlignment);
00323 XN_C_API void* xnOSCalloc(const XnSizeT nAllocNum, const XnSizeT nAllocSize);
00324 XN_C_API void* xnOSCallocAligned(const XnSizeT nAllocNum, const XnSizeT nAllocSize, const XnSizeT nAlignment);
00325 XN_C_API void* xnOSRealloc(void* pMemory, const XnSizeT nAllocSize);
00326 XN_C_API void* xnOSReallocAligned(void* pMemory, const XnSizeT nAllocSize, const XnSizeT nAlignment);
00327 XN_C_API void* xnOSRecalloc(void* pMemory, const XnSizeT nAllocNum, const XnSizeT nAllocSize);
00328 XN_C_API void xnOSFree(const void* pMemBlock);
00329 XN_C_API void xnOSFreeAligned(const void* pMemBlock);
00330 XN_C_API void xnOSMemCopy(void* pDest, const void* pSource, XnSizeT nCount);
00331 XN_C_API XnInt32 xnOSMemCmp(const void *pBuf1, const void *pBuf2, XnSizeT nCount);
00332 XN_C_API void xnOSMemSet(void* pDest, XnUInt8 nValue, XnSizeT nCount);
00333 XN_C_API void xnOSMemMove(void* pDest, const void* pSource, XnSizeT nCount);
00334 XN_C_API XnUInt64 xnOSEndianSwapUINT64(XnUInt64 nValue);
00335 XN_C_API XnUInt32 xnOSEndianSwapUINT32(XnUInt32 nValue);
00336 XN_C_API XnUInt16 xnOSEndianSwapUINT16(XnUInt16 nValue);
00337 XN_C_API XnFloat xnOSEndianSwapFLOAT(XnFloat fValue);
00338
00339 #if XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_WIN32_VAARGS_STYLE
00340 #define XN_NEW(type, ...) new type(__VA_ARGS__)
00341 #elif XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_GCC_VAARGS_STYLE
00342 #define XN_NEW(type, ...) new type(__VA_ARGS__)
00343 #elif XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_ARC_VAARGS_STYLE
00344 #define XN_NEW(type, arg...) new type(arg)
00345 #else
00346 #define XN_NEW(type, arg) new type(arg)
00347 #endif
00348
00349 #define XN_NEW_ARR(type, count) new type[count]
00350 #define XN_DELETE(p) delete (p)
00351 #define XN_DELETE_ARR(p) delete[] (p)
00352
00353 typedef enum
00354 {
00355 XN_ALLOCATION_MALLOC,
00356 XN_ALLOCATION_MALLOC_ALIGNED,
00357 XN_ALLOCATION_CALLOC,
00358 XN_ALLOCATION_CALLOC_ALIGNED,
00359 XN_ALLOCATION_NEW,
00360 XN_ALLOCATION_NEW_ARRAY
00361 } XnAllocationType;
00362
00366 XN_C_API void* xnOSLogMemAlloc(void* pMemBlock, XnAllocationType nAllocType, XnUInt32 nBytes, const XnChar* csFunction, const XnChar* csFile, XnUInt32 nLine, const XnChar* csAdditional);
00367
00371 XN_C_API void xnOSLogMemFree(const void* pMemBlock);
00372
00376 XN_C_API void xnOSWriteMemoryReport(const XnChar* csFileName);
00377
00378
00379 #if (defined XN_MEM_PROFILING) && (!defined(XN_OS_IMPL))
00380 #ifdef _MSC_VER
00381 #pragma message("Compiling with Memory Profiling!")
00382 #elif defined(__INTEL_COMPILER)
00383 #warning "Compiling with Memory Profiling!"
00384
00385 #endif
00386
00387 #ifdef __cplusplus
00388 #include <new>
00389 static void* operator new(size_t size, const XnChar* csFunction, const XnChar* csFile, XnUInt32 nLine, const XnChar* csAdditional)
00390 {
00391 void* p = xnOSMalloc(size);
00392 return xnOSLogMemAlloc(p, XN_ALLOCATION_NEW, size, csFunction, csFile, nLine, csAdditional);
00393 }
00394
00395
00396 static void operator delete(void* p, const XnChar* csFunction, const XnChar* csFile, XnUInt32 nLine, const XnChar* csAdditional)
00397 {
00398 xnOSLogMemFree(p);
00399 xnOSFree(p);
00400 }
00401
00402 static void operator delete(void* p)
00403 {
00404 xnOSLogMemFree(p);
00405 xnOSFree(p);
00406 }
00407
00408 static void* operator new[](size_t size, const XnChar* csFunction, const XnChar* csFile, XnUInt32 nLine, const XnChar* csAdditional)
00409 {
00410 void* p = xnOSMalloc(size);
00411 return xnOSLogMemAlloc(p, XN_ALLOCATION_NEW_ARRAY, size, csFunction, csFile, nLine, csAdditional);
00412 }
00413
00414
00415 static void operator delete[](void* p, const XnChar* csFunction, const XnChar* csFile, XnUInt32 nLine, const XnChar* csAdditional)
00416 {
00417 xnOSLogMemFree(p);
00418 xnOSFree(p);
00419 }
00420
00421 static void operator delete[](void* p)
00422 {
00423 xnOSLogMemFree(p);
00424 xnOSFree(p);
00425 }
00426
00427 #define xnOSMalloc(nAllocSize) xnOSLogMemAlloc(xnOSMalloc(nAllocSize), XN_ALLOCATION_MALLOC, nAllocSize, __FUNCTION__, __FILE__, __LINE__, NULL)
00428 #define xnOSMallocAligned(nAllocSize, nAlignment) xnOSLogMemAlloc(xnOSMallocAligned(nAllocSize, nAlignment), XN_ALLOCATION_MALLOC_ALIGNED, nAllocSize, __FUNCTION__, __FILE__, __LINE__, "Aligned to " XN_STRINGIFY(nAlignment))
00429 #define xnOSCalloc(nAllocNum, nAllocSize) xnOSLogMemAlloc(xnOSCalloc(nAllocNum, nAllocSize), XN_ALLOCATION_CALLOC, nAllocNum*nAllocSize, __FUNCTION__, __FILE__, __LINE__, NULL)
00430 #define xnOSCallocAligned(nAllocNum, nAllocSize, nAlignment) xnOSLogMemAlloc(xnOSCallocAligned(nAllocNum, nAllocSize, nAlignment), XN_ALLOCATION_CALLOC_ALIGNED, nAllocNum*nAllocSize, __FUNCTION__, __FILE__, __LINE__, "Aligned to " XN_STRINGIFY(nAlignment))
00431 #define xnOSFree(pMemBlock) { xnOSLogMemFree(pMemBlock); xnOSFree(pMemBlock); }
00432 #define xnOSFreeAligned(pMemBlock) { xnOSLogMemFree(pMemBlock); xnOSFreeAligned(pMemBlock); }
00433
00434 #undef XN_NEW
00435 #undef XN_NEW_ARR
00436
00437 #if XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_WIN32_VAARGS_STYLE
00438 #define XN_NEW(type, ...) new (__FUNCTION__, __FILE__, __LINE__, XN_STRINGIFY(type)) type(__VA_ARGS__)
00439 #elif XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_GCC_VAARGS_STYLE
00440 #define XN_NEW(type, arg...) new (__FUNCTION__, __FILE__, __LINE__, XN_STRINGIFY(type)) type(arg)
00441 #else
00442 #define XN_NEW(type, arg) new (__FUNCTION__, __FILE__, __LINE__, XN_STRINGIFY(type)) type(arg)
00443 #endif
00444
00445 #define XN_NEW_ARR(type, count) new (__FUNCTION__, __FILE__, __LINE__, XN_STRINGIFY(count) " " XN_STRINGIFY(type)) type[count]
00446
00447 #endif
00448 #endif
00449
00450
00451 XN_C_API XnStatus xnOSGetFileList(const XnChar* cpSearchPattern, const XnChar* cpPrefixPath, XnChar cpFileList[][XN_FILE_MAX_PATH], const XnUInt32 nMaxFiles, XnUInt32* pnFoundFiles);
00452 XN_C_API XnStatus xnOSOpenFile(const XnChar* cpFileName, const XnUInt32 nFlags, XN_FILE_HANDLE* pFile);
00453 XN_C_API XnStatus xnOSCloseFile(XN_FILE_HANDLE* pFile);
00454 XN_C_API XnStatus xnOSReadFile(const XN_FILE_HANDLE File, void* pBuffer, XnUInt32* pnBufferSize);
00455 XN_C_API XnStatus xnOSWriteFile(const XN_FILE_HANDLE File, const void* pBuffer, const XnUInt32 nBufferSize);
00456 XN_C_API XnStatus xnOSSeekFile(const XN_FILE_HANDLE File, const XnOSSeekType SeekType, const XnInt32 nOffset);
00457 XN_C_API XnStatus xnOSTellFile(const XN_FILE_HANDLE File, XnUInt32* nFilePos);
00458 XN_C_API XnStatus xnOSFlushFile(const XN_FILE_HANDLE File);
00459 XN_C_API XnStatus xnOSDoesFileExist(const XnChar* cpFileName, XnBool* pbResult);
00460 XN_C_API XnStatus xnOSDoesDirecotyExist(const XnChar* cpDirName, XnBool* pbResult);
00461 XN_C_API XnStatus xnOSLoadFile(const XnChar* cpFileName, void* pBuffer, const XnUInt32 nBufferSize);
00462 XN_C_API XnStatus xnOSSaveFile(const XnChar* cpFileName, const void* pBuffer, const XnUInt32 nBufferSize);
00463 XN_C_API XnStatus xnOSAppendFile(const XnChar* cpFileName, const void* pBuffer, const XnUInt32 nBufferSize);
00464 XN_C_API XnStatus xnOSGetFileSize(const XnChar* cpFileName, XnUInt32* pnFileSize);
00465 XN_C_API XnStatus xnOSCreateDirectory(const XnChar* cpDirName);
00466 XN_C_API XnStatus xnOSGetDirName(const XnChar* cpFilePath, XnChar* cpDirName, const XnUInt32 nBufferSize);
00467 XN_C_API XnStatus xnOSGetFileName(const XnChar* cpFilePath, XnChar* cpFileName, const XnUInt32 nBufferSize);
00468 XN_C_API XnStatus xnOSGetFullPathName(const XnChar* strFilePath, XnChar* strFullPath, XnUInt32 nBufferSize);
00469 XN_C_API XnStatus xnOSGetCurrentDir(XnChar* cpDirName, const XnUInt32 nBufferSize);
00470 XN_C_API XnStatus xnOSSetCurrentDir(const XnChar* cpDirName);
00471 XN_C_API XnStatus xnOSDeleteFile(const XnChar* cpFileName);
00472
00473
00474 XN_C_API XnStatus xnOSReadStringFromINI(const XnChar* cpINIFile, const XnChar* cpSection, const XnChar* cpKey, XnChar* cpDest, const XnUInt32 nDestLength);
00475 XN_C_API XnStatus xnOSReadFloatFromINI(const XnChar* cpINIFile, const XnChar* cpSection, const XnChar* cpKey, XnFloat* fDest);
00476 XN_C_API XnStatus xnOSReadDoubleFromINI(const XnChar* cpINIFile, const XnChar* cpSection, const XnChar* cpKey, XnDouble* fDest);
00477 XN_C_API XnStatus xnOSReadIntFromINI(const XnChar* cpINIFile, const XnChar* cpSection, const XnChar* cpKey, XnUInt32* nDest);
00478 XN_C_API XnStatus xnOSWriteStringToINI(const XnChar* cpINIFile, const XnChar* cpSection, const XnChar* cpKey, const XnChar* cpSrc);
00479 XN_C_API XnStatus xnOSWriteFloatToINI(const XnChar* cpINIFile, const XnChar* cpSection, const XnChar* cpKey, const XnFloat fSrc);
00480 XN_C_API XnStatus xnOSWriteDoubleToINI(const XnChar* cpINIFile, const XnChar* cpSection, const XnChar* cpKey, const XnDouble fSrc);
00481 XN_C_API XnStatus xnOSWriteIntToINI(const XnChar* cpINIFile, const XnChar* cpSection, const XnChar* cpKey, const XnUInt32 nSrc);
00482
00483
00484 XN_C_API XnStatus xnOSLoadLibrary(const XnChar* cpFileName, XN_LIB_HANDLE* pLibHandle);
00485 XN_C_API XnStatus xnOSFreeLibrary(const XN_LIB_HANDLE LibHandle);
00486 XN_C_API XnStatus xnOSGetProcAddress(const XN_LIB_HANDLE LibHandle, const XnChar* cpProcName, XnFarProc* pProcAddr);
00487
00488
00489 XN_C_API XnStatus xnOSStrPrefix(const XnChar* cpPrefixString, XnChar* cpDestString, const XnUInt32 nDestLength);
00490 XN_C_API XnStatus xnOSStrAppend(XnChar* cpDestString, const XnChar* cpSrcString, const XnUInt32 nDestLength);
00491 XN_C_API XnStatus xnOSStrCopy(XnChar* cpDestString, const XnChar* cpSrcString, const XnUInt32 nDestLength);
00492 XN_C_API XnUInt32 xnOSStrLen(const XnChar* cpString);
00493 XN_C_API XnStatus xnOSStrNCopy(XnChar* cpDestString, const XnChar* cpSrcString, const XnUInt32 nCopyLength, const XnUInt32 nDestLength);
00494 XN_C_API XnStatus xnOSStrCRC32(const XnChar* cpString, XnUInt32* nCRC32);
00495 XN_C_API XnStatus xnOSStrNCRC32(XnUChar* cpBuffer, XnUInt32 nBufferSize, XnUInt32* nCRC32);
00496 XN_C_API XnStatus xnOSStrFormat(XnChar* cpDestString, const XnUInt32 nDestLength, XnUInt32* pnCharsWritten, const XnChar* cpFormat, ...);
00497 XN_C_API XnStatus xnOSStrFormatV(XnChar* cpDestString, const XnUInt32 nDestLength, XnUInt32* pnCharsWritten, const XnChar* cpFormat, va_list args);
00498 XN_C_API XnInt32 xnOSStrCmp(const XnChar* cpFirstString, const XnChar* cpSecondString);
00499 XN_C_API XnInt32 xnOSStrCaseCmp(const XnChar* cpFirstString, const XnChar* cpSecondString);
00500 XN_C_API void xnOSItoA(XnInt32 nValue, XnChar* cpStr, XnInt32 nBase);
00502 XN_C_API XnChar* xnOSStrDup(const XnChar* strSource);
00503 XN_C_API XnStatus xnOSExpandEnvironmentStrings(const XnChar* strSrc, XnChar* strDest, XnUInt32 nDestSize);
00504
00505
00506 XN_C_API XnStatus xnOSGetEpochTime(XnUInt32* nEpochTime);
00507 XN_C_API XnStatus xnOSGetTimeStamp(XnUInt64* nTimeStamp);
00508 XN_C_API XnStatus xnOSGetHighResTimeStamp(XnUInt64* nTimeStamp);
00509 XN_C_API XnStatus xnOSSleep(XnUInt32 nMilliseconds);
00510 XN_C_API XnStatus xnOSStartTimer(XnOSTimer* pTimer);
00511 XN_C_API XnStatus xnOSStartHighResTimer(XnOSTimer* pTimer);
00512 XN_C_API XnStatus xnOSQueryTimer(XnOSTimer Timer, XnUInt64* pnTimeSinceStart);
00513 XN_C_API XnStatus xnOSStopTimer(XnOSTimer* pTimer);
00514
00515
00516 typedef enum XnThreadPriority
00517 {
00518 XN_PRIORITY_LOW,
00519 XN_PRIORITY_NORMAL,
00520 XN_PRIORITY_HIGH,
00521 XN_PRIORITY_CRITICAL
00522 } XnThreadPriority;
00523
00524 XN_C_API XnStatus xnOSCreateThread(XN_THREAD_PROC_PROTO pThreadProc, const XN_THREAD_PARAM pThreadParam, XN_THREAD_HANDLE* pThreadHandle);
00525 XN_C_API XnStatus xnOSTerminateThread(XN_THREAD_HANDLE* pThreadHandle);
00526 XN_C_API XnStatus xnOSCloseThread(XN_THREAD_HANDLE* pThreadHandle);
00527 XN_C_API XnStatus xnOSWaitForThreadExit(XN_THREAD_HANDLE ThreadHandle, XnUInt32 nMilliseconds);
00528 XN_C_API XnStatus xnOSSetThreadPriority(XN_THREAD_HANDLE ThreadHandle, XnThreadPriority nPriority);
00529 XN_C_API XnStatus xnOSGetCurrentThreadID(XN_THREAD_ID* pThreadID);
00530 XN_C_API XnStatus xnOSWaitAndTerminateThread(XN_THREAD_HANDLE* pThreadHandle, XnUInt32 nMilliseconds);
00531
00532
00533 XN_C_API XnStatus xnOSGetCurrentProcessID(XN_PROCESS_ID* pProcID);
00534 XN_C_API XnStatus xnOSCreateProcess(const XnChar* strExecutable, XnUInt32 nArgs, const XnChar** pstrArgs, XN_PROCESS_ID* pProcID);
00535
00536
00537 XN_C_API XnStatus xnOSCreateMutex(XN_MUTEX_HANDLE* pMutexHandle);
00538 XN_C_API XnStatus xnOSCreateNamedMutex(XN_MUTEX_HANDLE* pMutexHandle, const XnChar* cpMutexName);
00539 XN_C_API XnStatus xnOSCloseMutex(XN_MUTEX_HANDLE* pMutexHandle);
00540 XN_C_API XnStatus xnOSLockMutex(const XN_MUTEX_HANDLE MutexHandle, XnUInt32 nMilliseconds);
00541 XN_C_API XnStatus xnOSUnLockMutex(const XN_MUTEX_HANDLE MutexHandle);
00542
00543
00544 XN_C_API XnStatus xnOSCreateCriticalSection(XN_CRITICAL_SECTION_HANDLE* pCriticalSectionHandle);
00545 XN_C_API XnStatus xnOSCloseCriticalSection(XN_CRITICAL_SECTION_HANDLE* pCriticalSectionHandle);
00546 XN_C_API XnStatus xnOSEnterCriticalSection(XN_CRITICAL_SECTION_HANDLE* pCriticalSectionHandle);
00547 XN_C_API XnStatus xnOSLeaveCriticalSection(XN_CRITICAL_SECTION_HANDLE* pCriticalSectionHandle);
00548
00549
00550 XN_C_API XnStatus xnOSCreateEvent(XN_EVENT_HANDLE* pEventHandle, XnBool bManualReset);
00551 XN_C_API XnStatus xnOSCreateNamedEvent(XN_EVENT_HANDLE* pEventHandle, const XnChar* cpEventName, XnBool bManualReset);
00552 XN_C_API XnStatus xnOSOpenNamedEvent(XN_EVENT_HANDLE* pEventHandle, const XnChar* cpEventName);
00553 XN_C_API XnStatus xnOSCloseEvent(XN_EVENT_HANDLE* pEventHandle);
00554 XN_C_API XnStatus xnOSSetEvent(const XN_EVENT_HANDLE EventHandle);
00555 XN_C_API XnStatus xnOSResetEvent(const XN_EVENT_HANDLE EventHandle);
00556 XN_C_API XnStatus xnOSWaitEvent(const XN_EVENT_HANDLE EventHandle, XnUInt32 nMilliseconds);
00557 XN_C_API XnBool xnOSIsEventSet(const XN_EVENT_HANDLE EventHandle);
00558
00567 XN_C_API XnStatus xnOSWaitForCondition(const XN_EVENT_HANDLE EventHandle, XnUInt32 nMilliseconds, XnConditionFunc pConditionFunc, void* pConditionData);
00568
00569
00570 struct xnOSSocket;
00571 typedef struct xnOSSocket* XN_SOCKET_HANDLE;
00572
00573 XN_C_API XnStatus xnOSInitNetwork();
00574 XN_C_API XnStatus xnOSShutdownNetwork();
00575 XN_C_API XnStatus xnOSCreateSocket(const XnOSSocketType SocketType, const XnChar* cpIPAddress, const XnUInt16 nPort, XN_SOCKET_HANDLE* SocketPtr);
00576 XN_C_API XnStatus xnOSCloseSocket(XN_SOCKET_HANDLE Socket);
00577 XN_C_API XnStatus xnOSBindSocket(XN_SOCKET_HANDLE Socket);
00578 XN_C_API XnStatus xnOSListenSocket(XN_SOCKET_HANDLE Socket);
00579 XN_C_API XnStatus xnOSAcceptSocket(XN_SOCKET_HANDLE ListenSocket, XN_SOCKET_HANDLE* AcceptSocketPtr, XnUInt32 nMillisecsTimeout);
00580 XN_C_API XnStatus xnOSConnectSocket(XN_SOCKET_HANDLE Socket, XnUInt32 nMillisecsTimeout);
00581 XN_C_API XnStatus xnOSSetSocketBufferSize(XN_SOCKET_HANDLE Socket, const XnUInt32 nSocketBufferSize);
00582 XN_C_API XnStatus xnOSSendNetworkBuffer(XN_SOCKET_HANDLE Socket, const XnChar* cpBuffer, const XnUInt32 nBufferSize);
00583 XN_C_API XnStatus xnOSSendToNetworkBuffer(XN_SOCKET_HANDLE Socket, const XnChar* cpBuffer, const XnUInt32 nBufferSize, XN_SOCKET_HANDLE SocketTo);
00584 XN_C_API XnStatus xnOSReceiveNetworkBuffer(XN_SOCKET_HANDLE Socket, XnChar* cpBuffer, XnUInt32* pnBufferSize, XnUInt32 nMillisecsTimeout);
00585 XN_C_API XnStatus xnOSReceiveFromNetworkBuffer(XN_SOCKET_HANDLE Socket, XnChar* cpBuffer, XnUInt32* pnBufferSize, XN_SOCKET_HANDLE* SocketFrom);
00586
00587
00588 typedef struct XnOSSharedMemory XnOSSharedMemory, *XN_SHARED_MEMORY_HANDLE;
00589
00598 XN_C_API XnStatus xnOSCreateSharedMemory(const XnChar* strName, XnUInt32 nSize, XnUInt32 nAccessFlags, XN_SHARED_MEMORY_HANDLE* phSharedMem);
00599
00607 XN_C_API XnStatus xnOSOpenSharedMemory(const XnChar* strName, XnUInt32 nAccessFlags, XN_SHARED_MEMORY_HANDLE* phSharedMem);
00608
00614 XN_C_API XnStatus xnOSCloseSharedMemory(XN_SHARED_MEMORY_HANDLE hSharedMem);
00615
00622 XN_C_API XnStatus xnOSSharedMemoryGetAddress(XN_SHARED_MEMORY_HANDLE hSharedMem, void** ppAddress);
00623
00624
00625 XN_C_API XnBool xnOSWasKeyboardHit();
00626 XN_C_API XnChar xnOSReadCharFromInput();
00627
00628
00629 XN_C_API XnStatus xnOSGetCurrentCallStack(XnUInt32 nFramesToSkip, XnChar** astrFrames, XnUInt32 nMaxNameLength, XnUInt32* pnFrames);
00630
00631 XN_STATUS_MESSAGE_MAP_START(XN_ERROR_GROUP_OS)
00632 XN_STATUS_MESSAGE(XN_STATUS_ALLOC_FAILED, "Memory allocation failed!")
00633 XN_STATUS_MESSAGE(XN_STATUS_OS_ALREADY_INIT, "Xiron OS already initialized!")
00634 XN_STATUS_MESSAGE(XN_STATUS_OS_NOT_INIT, "Xiron OS was not initialized!")
00635 XN_STATUS_MESSAGE(XN_STATUS_OS_FILE_NOT_FOUND, "File not found!")
00636 XN_STATUS_MESSAGE(XN_STATUS_OS_INI_FILE_NOT_FOUND, "INI file not found!")
00637 XN_STATUS_MESSAGE(XN_STATUS_OS_FILE_ALREDY_EXISTS, "File already exists!")
00638 XN_STATUS_MESSAGE(XN_STATUS_OS_FILE_OPEN_FAILED, "Failed to open the file!")
00639 XN_STATUS_MESSAGE(XN_STATUS_OS_FILE_CLOSE_FAILED, "Failed to close the file!")
00640 XN_STATUS_MESSAGE(XN_STATUS_OS_FILE_READ_FAILED, "Failed to read from the file!")
00641 XN_STATUS_MESSAGE(XN_STATUS_OS_FILE_WRITE_FAILED, "Failed to write to the file!")
00642 XN_STATUS_MESSAGE(XN_STATUS_OS_FILE_SEEK_FAILED, "File seek failed!")
00643 XN_STATUS_MESSAGE(XN_STATUS_OS_FILE_TELL_FAILED, "File Tell failed!")
00644 XN_STATUS_MESSAGE(XN_STATUS_OS_FILE_FLUSH_FAILED, "File Flush failed!")
00645 XN_STATUS_MESSAGE(XN_STATUS_OS_FILE_GET_SIZE_FAILED, "Get File Size failed!")
00646 XN_STATUS_MESSAGE(XN_STATUS_OS_INI_READ_FAILED, "Failed to read from INI file!")
00647 XN_STATUS_MESSAGE(XN_STATUS_OS_INI_WRITE_FAILED, "Failed to write into INI file!")
00648 XN_STATUS_MESSAGE(XN_STATUS_OS_INVALID_SEEK_TYPE, "Invalid seek type!")
00649 XN_STATUS_MESSAGE(XN_STATUS_OS_THREAD_CREATION_FAILED, "Xiron OS failed to create a thread!")
00650 XN_STATUS_MESSAGE(XN_STATUS_OS_THREAD_TERMINATION_FAILED, "Xiron OS failed to terminate a thread!")
00651 XN_STATUS_MESSAGE(XN_STATUS_OS_THREAD_CLOSE_FAILED, "Xiron OS failed to close a thread!")
00652 XN_STATUS_MESSAGE(XN_STATUS_OS_THREAD_TIMEOUT, "Xiron OS got a thread timeout while waiting for a thread to exit!")
00653 XN_STATUS_MESSAGE(XN_STATUS_OS_THREAD_WAIT_FAILED, "Xiron OS failed to wait for a thread to exit!")
00654 XN_STATUS_MESSAGE(XN_STATUS_OS_THREAD_SET_PRIORITY_FAILED, "Xiron OS failed to set priority of a thread!")
00655 XN_STATUS_MESSAGE(XN_STATUS_OS_THREAD_UNSUPPORTED_PRIORITY, "Thread priority is unsupported by Xiron OS!")
00656 XN_STATUS_MESSAGE(XN_STATUS_OS_MUTEX_CREATION_FAILED, "Xiron OS failed to create a mutex!")
00657 XN_STATUS_MESSAGE(XN_STATUS_OS_MUTEX_CLOSE_FAILED, "Xiron OS failed to close a mutex!")
00658 XN_STATUS_MESSAGE(XN_STATUS_OS_MUTEX_LOCK_FAILED, "Xiron OS failed to lock a mutex!")
00659 XN_STATUS_MESSAGE(XN_STATUS_OS_MUTEX_TIMEOUT, "Xiron OS got a mutex timeout!")
00660 XN_STATUS_MESSAGE(XN_STATUS_OS_MUTEX_UNLOCK_FAILED, "Xiron OS failed to unlock a mutex!")
00661 XN_STATUS_MESSAGE(XN_STATUS_OS_EVENT_CREATION_FAILED, "Xiron OS failed to create an event!")
00662 XN_STATUS_MESSAGE(XN_STATUS_OS_EVENT_CLOSE_FAILED, "Xiron OS failed to close an event!")
00663 XN_STATUS_MESSAGE(XN_STATUS_OS_EVENT_SET_FAILED, "Xiron OS failed to set an event!")
00664 XN_STATUS_MESSAGE(XN_STATUS_OS_EVENT_RESET_FAILED, "Xiron OS failed to reset an event!")
00665 XN_STATUS_MESSAGE(XN_STATUS_OS_EVENT_TIMEOUT, "Xiron OS got an event timeout!")
00666 XN_STATUS_MESSAGE(XN_STATUS_OS_EVENT_WAIT_FAILED, "Xiron OS failed to wait on event!")
00667 XN_STATUS_MESSAGE(XN_STATUS_OS_EVENT_CANCELED, "This Xiron OS event was canceled!")
00668 XN_STATUS_MESSAGE(XN_STATUS_OS_CANT_LOAD_LIB, "Xiron OS failed to load shared library!")
00669 XN_STATUS_MESSAGE(XN_STATUS_OS_CANT_FREE_LIB, "Xiron OS failed to free shared library!")
00670 XN_STATUS_MESSAGE(XN_STATUS_OS_PROC_NOT_FOUND, "Xiron OS failed to get procedure address from shared library!")
00671 XN_STATUS_MESSAGE(XN_STATUS_OS_NETWORK_INIT_FAILED, "Xiron OS failed to initialize the network subsystem!")
00672 XN_STATUS_MESSAGE(XN_STATUS_OS_NETWORK_SHUTDOWN_FAILED, "Xiron OS failed to shutdown the network subsystem!")
00673 XN_STATUS_MESSAGE(XN_STATUS_OS_NETWORK_SOCKET_CREATION_FAILED, "Xiron OS failed to create a network socket!")
00674 XN_STATUS_MESSAGE(XN_STATUS_OS_NETWORK_INVALID_SOCKET_TYPE, "Invalid Xiron OS socket type!")
00675 XN_STATUS_MESSAGE(XN_STATUS_OS_NETWORK_SOCKET_BUFFER_FAILED, "Failed to change the Xiron OS socket buffer size!")
00676 XN_STATUS_MESSAGE(XN_STATUS_OS_NETWORK_SEND_FAILED, "Xiron OS failed to send a network buffer!")
00677 XN_STATUS_MESSAGE(XN_STATUS_OS_NETWORK_RECEIVE_FAILED, "Xiron OS failed to receive a network buffer!")
00678 XN_STATUS_MESSAGE(XN_STATUS_OS_NETWORK_SOCKET_BIND_FAILED, "Xiron OS failed to bind a network socket!")
00679 XN_STATUS_MESSAGE(XN_STATUS_OS_NETWORK_SOCKET_LISTEN_FAILED, "Xiron OS failed to listen on a network socket!")
00680 XN_STATUS_MESSAGE(XN_STATUS_OS_NETWORK_SOCKET_ACCEPT_FAILED, "Xiron OS failed to accept a network socket!")
00681 XN_STATUS_MESSAGE(XN_STATUS_OS_NETWORK_SOCKET_CONNECT_FAILED, "Xiron OS failed to connect to a network socket!")
00682 XN_STATUS_MESSAGE(XN_STATUS_OS_NETWORK_BAD_HOST_NAME, "Failed to resolve the host name!")
00683 XN_STATUS_MESSAGE(XN_STATUS_OS_NETWORK_TIMEOUT, "Got a timeout while waiting for a network command to complete!")
00684 XN_STATUS_MESSAGE(XN_STATUS_OS_TIMER_CREATION_FAILED, "Xiron OS failed to create a timer!")
00685 XN_STATUS_MESSAGE(XN_STATUS_OS_TIMER_QUERY_FAILED, "Xiron OS failed to query a timer!")
00686 XN_STATUS_MESSAGE(XN_STATUS_OS_INVALID_TIMER, "This Xiron OS timer is invalid!")
00687 XN_STATUS_MESSAGE(XN_STATUS_OS_INVALID_FILE, "This Xiron OS file is invalid!")
00688 XN_STATUS_MESSAGE(XN_STATUS_OS_INVALID_SOCKET, "This Xiron OS socket is invalid!")
00689 XN_STATUS_MESSAGE(XN_STATUS_OS_INVALID_MUTEX, "This Xiron OS mutex is invalid!")
00690 XN_STATUS_MESSAGE(XN_STATUS_OS_INVALID_THREAD, "This Xiron OS thread is invalid!")
00691 XN_STATUS_MESSAGE(XN_STATUS_OS_INVALID_EVENT, "This Xiron OS event is invalid!")
00692 XN_STATUS_MESSAGE(XN_STATUS_OS_INVALID_LIBRARY, "This Xiron OS shared library is invalid!")
00693 XN_STATUS_MESSAGE(XN_STATUS_OS_INVALID_CRITICAL_SECTION, "This Xiron OS critical section is invalid!")
00694 XN_STATUS_MESSAGE(XN_STATUS_OS_INVALID_FORMAT_STRING, "Xiron OS got an invalid format string!")
00695 XN_STATUS_MESSAGE(XN_STATUS_OS_UNSUPPORTED_FUNCTION, "This Xiron OS function is not supported!")
00696 XN_STATUS_MESSAGE(XN_STATUS_OS_FAILED_TO_CREATE_DIR, "Failed to create a directory!")
00697 XN_STATUS_MESSAGE(XN_STATUS_OS_FAILED_TO_DELETE_FILE, "Failed to delete a file!")
00698 XN_STATUS_MESSAGE(XN_STATUS_OS_FAILED_TO_CREATE_SHARED_MEMORY, "Failed to create shared memory!")
00699 XN_STATUS_MESSAGE(XN_STATUS_OS_FAILED_TO_OPEN_SHARED_MEMORY, "Failed to open shared memory!")
00700 XN_STATUS_MESSAGE(XN_STATUS_OS_FAILED_TO_CLOSE_SHARED_MEMORY, "Failed to close shared memory!")
00701 XN_STATUS_MESSAGE(XN_STATUS_USB_ALREADY_INIT, "The Xiron USB subsystem was already initialize!")
00702 XN_STATUS_MESSAGE(XN_STATUS_USB_NOT_INIT, "The Xiron USB subsystem was not initialized!")
00703 XN_STATUS_MESSAGE(XN_STATUS_USB_INIT_FAILED, "The Xiron USB subsystem failed to initialize!")
00704 XN_STATUS_MESSAGE(XN_STATUS_USB_SHUTDOWN_FAILED, "The Xiron USB subsystem failed to shutdown!")
00705 XN_STATUS_MESSAGE(XN_STATUS_USB_ENUMERATE_FAILED, "The Xiron USB subsystem failed to enumerate devices!")
00706 XN_STATUS_MESSAGE(XN_STATUS_USB_LOAD_FAILED, "The Xiron USB subsystem failed to load!")
00707 XN_STATUS_MESSAGE(XN_STATUS_USB_FREE_FAILED, "The Xiron USB subsystem failed to free!")
00708 XN_STATUS_MESSAGE(XN_STATUS_USB_REGISTER_FAILED, "The Xiron USB subsystem failed to register the device!")
00709 XN_STATUS_MESSAGE(XN_STATUS_USB_UNREGISTER_FAILED, "The Xiron USB subsystem failed to unregister the device!")
00710 XN_STATUS_MESSAGE(XN_STATUS_USB_DEVICE_NOT_VALID, "Invalid Xiron USB device handle!")
00711 XN_STATUS_MESSAGE(XN_STATUS_USB_ENDPOINT_NOT_VALID, "Invalid Xiron USB endpoint handle!")
00712 XN_STATUS_MESSAGE(XN_STATUS_USB_DRIVER_NOT_FOUND, "USB driver not found!")
00713 XN_STATUS_MESSAGE(XN_STATUS_USB_DEVICE_NOT_FOUND, "USB device not found!")
00714 XN_STATUS_MESSAGE(XN_STATUS_USB_DEVICE_OPEN_FAILED, "Failed to open the USB device!")
00715 XN_STATUS_MESSAGE(XN_STATUS_USB_DEVICE_CLOSE_FAILED, "Failed to close the USB device!")
00716 XN_STATUS_MESSAGE(XN_STATUS_USB_DEVICE_GETINFO_FAILED, "Failed to get information about the USB device!")
00717 XN_STATUS_MESSAGE(XN_STATUS_USB_CONFIG_QUERY_FAILED, "USB config query failed!")
00718 XN_STATUS_MESSAGE(XN_STATUS_USB_INTERFACE_QUERY_FAILED, "USB interface query failed!")
00719 XN_STATUS_MESSAGE(XN_STATUS_USB_ENDPOINT_QUERY_FAILED, "USB endpoint query failed!")
00720 XN_STATUS_MESSAGE(XN_STATUS_USB_SET_ENDPOINT_POLICY_FAILED, "Failed to set USB endpoint policy!")
00721 XN_STATUS_MESSAGE(XN_STATUS_USB_UNKNOWN_ENDPOINT_TYPE, "Unknown USB endpoint type!")
00722 XN_STATUS_MESSAGE(XN_STATUS_USB_UNKNOWN_ENDPOINT_DIRECTION, "Unknown USB endpoint direction!")
00723 XN_STATUS_MESSAGE(XN_STATUS_USB_GET_SPEED_FAILED, "Failed to get the device speed!")
00724 XN_STATUS_MESSAGE(XN_STATUS_USB_GET_DRIVER_VERSION, "Failed to get the USB driver version!")
00725 XN_STATUS_MESSAGE(XN_STATUS_USB_UNKNOWN_DEVICE_SPEED, "Unknown USB device speed!")
00726 XN_STATUS_MESSAGE(XN_STATUS_USB_CONTROL_SEND_FAILED, "Failed to send a USB control request!")
00727 XN_STATUS_MESSAGE(XN_STATUS_USB_CONTROL_RECV_FAILED, "Failed to receive a USB control request!")
00728 XN_STATUS_MESSAGE(XN_STATUS_USB_ENDPOINT_READ_FAILED, "Failed to read from a USB endpoint!")
00729 XN_STATUS_MESSAGE(XN_STATUS_USB_ENDPOINT_WRITE_FAILED, "Failed to write into a USB endpoint!")
00730 XN_STATUS_MESSAGE(XN_STATUS_USB_TRANSFER_TIMEOUT, "USB transfer timeout!")
00731 XN_STATUS_MESSAGE(XN_STATUS_USB_TRANSFER_STALL, "USB transfer stall!")
00732 XN_STATUS_MESSAGE(XN_STATUS_USB_TRANSFER_MICRO_FRAME_ERROR, "USB transfer micro frame error!")
00733 XN_STATUS_MESSAGE(XN_STATUS_USB_TRANSFER_UNKNOWN_ERROR, "Unknown USB transfer error!")
00734 XN_STATUS_MESSAGE(XN_STATUS_USB_ENDPOINT_NOT_FOUND, "USB endpoint not found on device!")
00735 XN_STATUS_MESSAGE(XN_STATUS_USB_WRONG_ENDPOINT_TYPE, "Wrong USB endpoint type requested!")
00736 XN_STATUS_MESSAGE(XN_STATUS_USB_WRONG_ENDPOINT_DIRECTION, "Wrong USB endpoint direction requested!")
00737 XN_STATUS_MESSAGE(XN_STATUS_USB_WRONG_CONTROL_TYPE, "Wrong USB control type requested!")
00738 XN_STATUS_MESSAGE(XN_STATUS_USB_UNSUPPORTED_ENDPOINT_TYPE, "Unsupported USB endpoint type!")
00739 XN_STATUS_MESSAGE(XN_STATUS_USB_GOT_UNEXPECTED_BYTES, "Got unexpected bytes in USB transfer!")
00740 XN_STATUS_MESSAGE(XN_STATUS_USB_TOO_MUCH_DATA, "Got too much data in USB transfer!")
00741 XN_STATUS_MESSAGE(XN_STATUS_USB_NOT_ENOUGH_DATA, "Didn't get enough data in USB transfer!")
00742 XN_STATUS_MESSAGE(XN_STATUS_USB_BUFFER_TOO_SMALL, "USB Buffer is too small!")
00743 XN_STATUS_MESSAGE(XN_STATUS_USB_OVERLAPIO_FAILED, "USB Overlapped I/O operation failed!")
00744 XN_STATUS_MESSAGE(XN_STATUS_USB_ABORT_FAILED, "Failed to abort USB endpoint!")
00745 XN_STATUS_MESSAGE(XN_STATUS_USB_FLUSH_FAILED, "Failed to flush USB endpoint!")
00746 XN_STATUS_MESSAGE(XN_STATUS_USB_RESET_FAILED, "Failed to reset USB endpoint!")
00747 XN_STATUS_MESSAGE(XN_STATUS_USB_SET_INTERFACE_FAILED, "Failed to set USB interface!")
00748 XN_STATUS_MESSAGE(XN_STATUS_USB_GET_INTERFACE_FAILED, "Failed to get USB interface!")
00749 XN_STATUS_MESSAGE(XN_STATUS_USB_READTHREAD_NOT_INIT, "Read thread is not initialized for this USB end point!")
00750 XN_STATUS_MESSAGE(XN_STATUS_USB_READTHREAD_ALREADY_INIT, "Read thread is already initialized for this USB end point!")
00751 XN_STATUS_MESSAGE(XN_STATUS_USB_READTHREAD_SHUTDOWN_FAILED, "Read thread failed to shutdown properly!")
00752 XN_STATUS_MESSAGE(XN_STATUS_USB_IS_BUSY, "USB is busy!")
00753 XN_STATUS_MESSAGE(XN_STATUS_USB_NOT_BUSY, "USB is not busy!")
00754 XN_STATUS_MESSAGE(XN_STATUS_USB_SET_CONFIG_FAILED, "Failed to set USB config!")
00755 XN_STATUS_MESSAGE(XN_STATUS_USB_GET_CONFIG_FAILED, "Failed to get USB config!")
00756 XN_STATUS_MESSAGE(XN_STATUS_USB_OPEN_ENDPOINT_FAILED, "Failed to open an USB endpoint!")
00757 XN_STATUS_MESSAGE(XN_STATUS_USB_CLOSE_ENDPOINT_FAILED, "Failed to close an USB endpoint!")
00758 XN_STATUS_MESSAGE(XN_STATUS_USB_ALREADY_OPEN, "A device is already opened!")
00759 XN_STATUS_MESSAGE(XN_STATUS_USB_TRANSFER_PENDING, "USB transfer is still pending!")
00760 XN_STATUS_MESSAGE(XN_STATUS_USB_INTERFACE_NOT_SUPPORTED, "USB interface is not supported!")
00761 XN_STATUS_MESSAGE(XN_STATUS_USB_FAILED_TO_REGISTER_CALLBACK, "Failed to register the USB device callback!")
00762 XN_STATUS_MESSAGE(XN_STATUS_OS_NETWORK_CONNECTION_CLOSED, "The network connection has been closed!")
00763 XN_STATUS_MESSAGE(XN_STATUS_OS_EVENT_OPEN_FAILED, "Xiron OS failed to open an event!")
00764 XN_STATUS_MESSAGE(XN_STATUS_OS_PROCESS_CREATION_FAILED, "Xiron OS failed to create a process!")
00765 XN_STATUS_MESSAGE_MAP_END(XN_ERROR_GROUP_OS)
00766
00767 #endif //__XN_OS_H__
00768