/* DMW_Status.h */ #ifndef __DMW_STATUS_H__ #define __DMW_STATUS_H__ #include "DMW_Dummy.h" #ifdef __cplusplus extern "C" { #endif enum enumSTATUS { statusOK = 0, /* General Error */ statusError = -7100, statusInvalidArgument = -7101, /* some of arguments are invalid. */ statusOutOfMemory = -7102, /* out of memory */ statusOutOfRange = -7103, statusNotImpl = -7104, /* not implemented yet. */ statusOutOfResource = -7105, /* out of resource (task, sema4, etc..) */ statusTimeout = -7106, /* timeout.. */ statusOverflow = -7107, /* something overflow. queue, stack, etc.. */ statusNotFound = -7108, /* not found. */ /*statusCancelled = -7109, */ /* request was cancelled. */ statusNoResponse = -7110, /* need not response to caller. */ statusNotInitialized = -7111, /* module/library not initialized. */ statusInvalidState = -7112, /* invalid state for the request */ statusNotChanged = -7113, /* nothing changed */ /* NVRAM °ü·Ã.. */ statusEepromError = -7200, /* EEPROM¿¡ ÀϹÝÀûÀÎ ¿¡·¯ ¹ß»ý. */ statusFlashError = -7201, /* Flash¿¡ ÀϹÝÀûÀÎ ¿¡·¯ ¹ß»ý. */ statusNvRamBadAddress = -7202, /* ÁöÁ¤µÈ NVRAM ÁÖ¼Ò°¡ À¯È¿ÇÏÁö ¾Ê´Ù. (dangerous area) */ statusInvalidRange = -7203, /* ...»ç¿ë±ÝÁö */ statusNvRamNotFormatted = -7204, /* Æ÷¸ËÀÌ ¾ÆÁ÷ µÇÁö ¾Ê¾Ò°Å³ª, Áß¿ä ¿µ¿ªÀÌ ¼Õ»óµÇ¾ú´Ù. */ statusBadBlock = -7205, /* Flash blockÀÌ invalid blockÀ̹ǷΠ»ç¿ë ºÒ°¡´ÉÇÏ´Ù */ /* ä³Î °ü·Ã..*/ statusPSIPError = -7300, /* PSIP Á¤º¸ÀÇ ³»¿ëÀÌ ÀÌ»óÇÔ. */ /*statusChannelNotFound = -7301, */ /* ¿øÇϴ ä³Î(Á¤º¸)ÀÌ Á¸ÀçÇÏÁö ¾ÊÀ½. */ statusChannelTuneError = -7302, /* ä³Î Æ©´×¿¡ ½ÇÆÐ. */ statusInvalidChannelType = -7303, /* À߸øµÈ ä³Î À¯Çü. (ex: QAM in terrestrial) */ statusChannelDuplicated = -7304, /* Áߺ¹µÈ ä³ÎÀÌ ¹ß°ßµÇ¾úÀ½. */ statusSkippedChannel = -7305, /* disabled channelÀÌ¹Ç·Î ÇØ´ç ÀÛ¾÷À» ÇÒ ¼ö ¾øÀ½. */ statusScrambled = -7306, /* ä³ÎÀÌ scramble µÇ¾úÀ½ */ /* Callback result */ statusNoSignal = -7401, /* ½ÅÈ£°¡ ³Ê¹« ¾àÇÔ. */ statusNoVCT = -7402, /* VCT ¾øÀ½. Uid Æ©´× ÇÔ¼ö¿¡¼­ */ statusNoPSI = -7403, /* PSI ¾øÀ½. */ statusNoVCTPSI = -7404, /* VCT/PSI ¸ðµÎ ¼ö½Å ¾ÈµÊ (Direct RF tuningÀÇ °æ¿ì) */ statusVideoError = -7405, statusCancelled = -7406, /* channel tuning command was cancelled. */ statusInvalidVCT = -7407, /* VCT has no PID info, invalid PID, etc.. */ statusInvalidPSI = -7408, /* PSI has no */ statusAnalogError = -7409, statusUidNotFound = -7410, statusChannelNotFound = -7411, /* specified channel not found, no program found. */ /* 1394 */ statusNodeNotFound = -7501, /* node not found. */ statusNotCompatibleDevice = -7503, /* the device is not supported */ statusConnectionFail = -7504, /* Isochronous connection failed. */ statusControlFail = -7505, /* device control failed. */ statusTooManyDevices = -7506, /* connected device are too many. some devices are skipped. */ statusNoChangeDetected = -7507, /* there is no change */ /* ETC */ statusQueueFull = -7601 /* only for use in Dmc_SendCommand */ }; typedef enum enumSTATUS STATUS; /* conventional usage of STATUS: // zero : success // non-zero : failure, error code (probably negative value) // Çѹø Á¤ÀÇµÈ »ó¼ö°ªÀÌ ³ªÁß¿¡ ¹Ù²î´Â ÀÏÀÌ ¾ø¾î¾ß ÇÑ´Ù. */ extern const char *DMW_CDB_ErrString(STATUS err); /* extern const char *DMW_CDB_ErrString(DHL_RESULT err); */ /* ¿¡·¯ ¹®ÀÚ¿­ Äõ¸® ÇÔ¼ö. */ #ifdef __DEFINE_ERR_STRING__ /* // ÀÌ ¸ÅÅ©·Î´Â application¿¡¼­ Æ÷ÇÔÇÏ¸é ¾ÈµÊ. ¸µÅ©¿¡·¯.. */ struct c2s_t { STATUS status; const char *string; }; struct c2s_t g_ErrorStringTable[] = { { statusOK , "Success", }, { statusError , "General Error", }, { statusInvalidArgument , "Invalid Argument Error", }, { statusOutOfMemory , "Out of Memory Error", }, { statusOutOfRange , "Out of Range Error", }, { statusNotImpl , "Not implemented yet", }, { statusOutOfResource , "Out of Resource Error", }, { statusTimeout , "Timeout", }, { statusOverflow , "Overflow Error", }, { statusNotFound , "Not found Error", }, /*{ statusCancelled , "Cancelled", }, */ { statusNoResponse , "No Response", }, /* NVRAM °ü·Ã.. , */ { statusEepromError , "EEPROM Error", }, { statusFlashError , "FlashMemory Error", }, { statusNvRamBadAddress , "Bad Address used in NvRam", }, { statusInvalidRange , "Invalid Range Error", }, { statusNvRamNotFormatted , "NvRam Not Formatted", }, /* ä³Î °ü·Ã.. , */ { statusPSIPError , "PSIP Error", }, { statusChannelTuneError , "Channel Tune Error", }, { statusInvalidChannelType , "Invalid Channel tyep", }, { statusChannelDuplicated , "Channel Duplicated", }, { statusSkippedChannel , "Skipped Channel", }, { statusScrambled , "Scrambled", }, /* Callback result , */ { statusNoSignal , "No Signal", }, { statusNoVCT , "VCT Loading Error", }, { statusNoPSI , "PSI Loading Error", }, { statusNoVCTPSI , "VCT/PSI Loading Error", }, { statusVideoError , "Video Error", }, { statusCancelled , "Command Cancelled", }, { statusInvalidVCT , "Invalid VCT Error", }, { statusInvalidPSI , "Invalid PSI Error", }, { statusAnalogError , "Analog Tuning Error", }, { statusUidNotFound , "UID Not Found", }, { statusChannelNotFound , "Channel Not Found", }, /* 1394 */ { statusNodeNotFound , "1394 node not found", }, { statusNotCompatibleDevice , "Not compatible 1394 device", }, { statusConnectionFail , "Isochronous connection failed", }, { statusControlFail , "1394 device control failed", }, { statusTooManyDevices , "Too many devices connected", }, { statusNoChangeDetected , "No change detected", }, }; int g_nErrorStringTable = sizeof(g_ErrorStringTable)/sizeof(g_ErrorStringTable[0]); const char *DMW_CDB_ErrString(STATUS err) { int i; if (err > -8000 && err <= -7000) { /* DMW error code. */ for (i=0; i