#include <revolution/mp.h>
#define MP_RESULT_MP_ERROR_FLAG 0xffffff00
#define MP_RESULT_WD_ERROR_FLAG 0x80008000
typedef enum
{
MP_RESULT_OK = 0,
MP_RESULT_CLOSED = ( MP_RESULT_MP_ERROR_FLAG | 0x00 ), // -256
MP_RESULT_ILLEGAL_PARAMETER = ( MP_RESULT_MP_ERROR_FLAG | 0x01 ), // -255
MP_RESULT_ALREADY_IN_USE = ( MP_RESULT_MP_ERROR_FLAG | 0x06 ), // -250
MP_RESULT_NOT_ENOUGH_MEMORY = ( MP_RESULT_MP_ERROR_FLAG | 0x10 ), // -240
MP_RESULT_NOT_ENOUGH_RESOURCE = ( MP_RESULT_MP_ERROR_FLAG | 0x11 ), // -239
MP_RESULT_NOT_ALLOWED = ( MP_RESULT_MP_ERROR_FLAG | 0x12 ), // -238
MP_RESULT_BUSY = ( MP_RESULT_MP_ERROR_FLAG | 0x13 ), // -237
MP_RESULT_ILLEGAL_STATE = ( MP_RESULT_MP_ERROR_FLAG | 0x14 ), // -236
MP_RESULT_TIMEOUT = ( MP_RESULT_MP_ERROR_FLAG | 0x15 ), // -235
MP_RESULT_NO_DATA = ( MP_RESULT_MP_ERROR_FLAG | 0x16 ), // -234
MP_RESULT_FAILURE = ( MP_RESULT_MP_ERROR_FLAG | 0x17 ), // -233
MP_RESULT_FATAL_ERROR = ( MP_RESULT_MP_ERROR_FLAG | 0xff ), // -1
MP_RESULT_WD_CLOSED = ( MP_RESULT_WD_ERROR_FLAG | 0x00 ),
MP_RESULT_WD_ILLEGAL_PARAMETER = ( MP_RESULT_WD_ERROR_FLAG | 0x01 ),
MP_RESULT_WD_UNAVAILABLE_COMMAND = ( MP_RESULT_WD_ERROR_FLAG | 0x02 ),
MP_RESULT_WL_FAILURE = ( MP_RESULT_WD_ERROR_FLAG | 0x03 ),
MP_RESULT_WD_INSUFFICIENT_BUFFER = ( MP_RESULT_WD_ERROR_FLAG | 0x04 ),
MP_RESULT_WD_FAIL_IOBUF = ( MP_RESULT_WD_ERROR_FLAG | 0x05 ),
MP_RESULT_WD_ALREADY_IN_USE = ( MP_RESULT_WD_ERROR_FLAG | 0x06 )
} MPResult;
The constant that indicates the processing results of each function in the MP library.
| Member | Description |
|---|---|
| MP_RESULT_OK | The process ended normally. |
| MP_RESULT_CLOSED | Failed because the process has already ended. |
| MP_RESULT_ILLEGAL_PARAMETER | The parameter is invalid. |
| MP_RESULT_ALREADY_IN_USE | Resources that need to be use are already in other uses; the request could not be completed. While the wireless module is being used for Internet use, this error will result when MPStartup() is called. |
| MP_RESULT_NOT_ENOUGH_MEMORY | Memory could not be allocated. If a memory allocation error occurs in a place where an error value cannot be returned, this results internally in a FatalError state, which will result in all subsequently called functions failing with MP_RESULT_FATAL_ERROR. |
| MP_RESULT_NOT_ALLOWED | Not permitted. This is returned, for example, when MPStartup() is used on channels for which use is not permitted. |
| MP_RESULT_BUSY | Could not be run because of a temporary lack of resources. Retry after waiting for a short time. |
| MP_RESULT_ILLEGAL_STATE | A function that cannot be called in the current MP library state was called. |
| MP_RESULT_TIMEOUT | The transition failed to complete within a set time when attempting to perform an internal status transition. Retry after waiting for a short time. |
| MP_RESULT_NO_DATA | There was no data to be processed. Generated by the MPDSStep() and MPDSTryStep() functions. |
| MP_RESULT_FATAL_ERROR | Processing cannot continue as a fatal error has occurred. For example, if a memory allocation error occurs in a place where an error value cannot be returned, this results internally in a FatalError state, which will result in all subsequently called functions failing with MP_RESULT_FATAL_ERROR. You can check the cause of the fatal error by examining the return value for MPGetFatalError(). |
| MP_RESULT_WD_CLOSED | This is an error code returned from a library that MP is using internally. This is not normally made known to the application. |
| MP_RESULT_WD_ILLEGAL_PARAMETER | This is an error code returned from a library that MP is using internally. This is not normally made known to the application. |
| MP_RESULT_WD_UNAVAILABLE_COMMAND | This is an error code returned from a library that MP is using internally. This is not normally made known to the application. |
| MP_RESULT_WL_FAILURE | This is an error code returned from a library that MP is using internally. This is not normally made known to the application. |
| MP_RESULT_WD_INSUFFICIENT_BUFFER | This is an error code returned from a library that MP is using internally. This is not normally made known to the application. |
| MP_RESULT_WD_FAIL_IOBUF | This is an error code returned from a library that MP is using internally. This is not normally made known to the application. |
| MP_RESULT_WD_ALREADY_IN_USE | This is an error code returned from a library that MP is using internally. This is not normally made known to the application. |
MPStartup(), MPCleanup(), MPSetUserGameInfo(), MPSetEntryFlag(), MPDisconnect(), MPGetLinkLevel(), MPSend(), MPSendAsync(), MPUpdateBeacon(), MPUpdateBeaconAsync()
2007/11/28 Changes and additions to error values.
2006/07/03 Initial version.
CONFIDENTIAL