Platform
APIs for information regarding the platform. More...
Classes
Name | |
---|---|
struct | MLVersion |
Types
Name | |
---|---|
typedef uint64_t | MLHandle Integer handle type used to reference many things returned by the API, instead of returning pointers directly. Use MLHandleIsValid() to check if a handle is valid or not. |
typedef struct MLVersion | MLVersion |
typedef int32_t | MLResult |
Enums
Name | |
---|---|
enum | Anonymous Enum 0 { ML_INVALID_HANDLE = 0xFFFFFFFFFFFFFFFF } |
enum | Anonymous Enum 1 { MLVersion_BuildIdMaxLength = 128 } |
enum | Anonymous Enum 2 { MLResultAPIPrefix_Global = ( 0 << 16) } |
enum | MLResultGlobal { MLResult_Ok = MLResultAPIPrefix_Global, MLResult_Pending, MLResult_Timeout, MLResult_Locked, MLResult_UnspecifiedFailure, MLResult_InvalidParam, MLResult_AllocFailed, MLResult_PermissionDenied, MLResult_NotImplemented, MLResult_ClientLimitExceeded, MLResult_PoseNotFound, MLResult_IncompatibleSKU, MLResult_PerceptionSystemNotStarted, MLResult_IllegalState, MLResult_LicenseError, MLResult_InvalidTimestamp, MLResult_Unauthenticated, MLResult_Ensure32Bits = 0x7FFFFFFF } |
Functions
Name | |
---|---|
const char * | MLGetResultString(MLResult result_code) Returns an ASCII string for MLResultGlobal codes. |
const char * | MLGlobalGetResultString(MLResult result_code) Returns an ASCII string for MLResult codes. |
bool | MLHandleIsValid(MLHandle handle) Check if a handle is valid. |
const char * | MLGetVersionName() Get SDK version as c-style string. |
MLVersion | MLGetVersion() Get SDK version as a struct with major, minor, revision, and build_id. |
MLResult | MLPlatformGetAPILevel(uint32_t * out_api_level) Query the OS for which Platform API Level is supported. |
Defines
Name | |
---|---|
MLRESULT_PREFIX(val) | |
ML_PLATFORM_API_LEVEL |
Detailed Description
APIs for information regarding the platform.
Shared Object:
- capi.magicleap*
Shared Object:
- platform.magicleap*
Enums Documentation
Anonymous Enum 0
Enumerator | Value | Description |
---|---|---|
ML_INVALID_HANDLE | 0xFFFFFFFFFFFFFFFF | Value of an invalid handle. To test if a handle is invalid use MLHandleIsValid(). |
Anonymous Enum 1
Enumerator | Value | Description |
---|---|---|
MLVersion_BuildIdMaxLength | 128 | Maximum character length of MLVersion build ID. |
Anonymous Enum 2
Enumerator | Value | Description |
---|---|---|
MLResultAPIPrefix_Global | ( 0 << 16) | Defines the prefix for global MLResult codes. |
MLResultGlobal
Enumerator | Value | Description |
---|---|---|
MLResult_Ok | MLResultAPIPrefix_Global | Operation completed successfully. |
MLResult_Pending | Asynchronous operation has not completed. | |
MLResult_Timeout | Operation has timed out. | |
MLResult_Locked | Request to lock a shared resource that is already locked. | |
MLResult_UnspecifiedFailure | Operation failed due to an unspecified internal error. | |
MLResult_InvalidParam | Operation failed due to an invalid parameter being supplied. | |
MLResult_AllocFailed | Operation failed because memory failed to be allocated. | |
MLResult_PermissionDenied | Operation failed because a required permission has not been granted. | |
MLResult_NotImplemented | Operation failed because it is not currently implemented. | |
MLResult_ClientLimitExceeded | Operation failed because the client count exceeded the number of clients available. | |
MLResult_PoseNotFound | Operation failed because the requested pose is not available. | |
MLResult_IncompatibleSKU | Operation failed because feature isn't supported on current device version. | |
MLResult_PerceptionSystemNotStarted | Operation failed because the Perception System was not started. | |
MLResult_IllegalState | Operation failed because it has been invoked at the wrong time. | |
MLResult_LicenseError | Operation failed because of missing/incompatible license. | |
MLResult_InvalidTimestamp | Operation failed because the timestamp parameter was outside the expected range. | |
MLResult_Unauthenticated | Operation failed because the user authentication did not pass. | |
MLResult_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Global MLResult codes that any API can optionally return.
Types Documentation
MLHandle
typedef uint64_t MLHandle;
Integer handle type used to reference many things returned by the API, instead of returning pointers directly. Use MLHandleIsValid() to check if a handle is valid or not.
MLVersion
typedef struct MLVersion MLVersion;
SDK version: '[major].[minor].[revision].[build_id]'.
MLResult
typedef int32_t MLResult;
MLResult type that all functions in the APIs return.
Functions Documentation
MLGetResultString
static inline const char * MLGetResultString(
MLResult result_code
)
Returns an ASCII string for MLResultGlobal codes.
Parameters
MLResult | result_code | The input MLResult enum from ML API functions. |
Required Permissions:
- None
Return: ASCII string containing readable version of result code.
MLGlobalGetResultString
const char * MLGlobalGetResultString(
MLResult result_code
)
Returns an ASCII string for MLResult codes.
Parameters
MLResult | result_code | The input MLResult enum from ML API functions. |
Required Permissions:
- None
Return: ASCII string containing readable version of result code.
API Level:
- 20
MLHandleIsValid
static inline bool MLHandleIsValid(
MLHandle handle
)
Check if a handle is valid.
Parameters
MLHandle | handle | The handle to check. |
Required Permissions:
- None
Return: true
if the handle is valid.
MLGetVersionName
static inline const char * MLGetVersionName()
Get SDK version as c-style string.
Required Permissions:
- None
Return: SDK version as c-style string.
MLGetVersion
static inline MLVersion MLGetVersion()
Get SDK version as a struct with major, minor, revision, and build_id.
Required Permissions:
- None
Return: SDK version as a struct.
MLPlatformGetAPILevel
MLResult MLPlatformGetAPILevel(
uint32_t * out_api_level
)
Query the OS for which Platform API Level is supported.
Parameters
uint32_t * | out_api_level | Pointer to an integer that will store the API level. |
Returns
MLResult | MLResult_Ok | Operation completed successfully. |
MLResult | MLResult_InvalidParam | out_platform_level was not valid (null). |
MLResult | MLResult_UnspecifiedError | Operation failed. |
Required Permissions:
- None
Macros Documentation
MLRESULT_PREFIX
#define MLRESULT_PREFIX(
val
)
(val << 16)
Parameters
val |
Macro to set a the prefix bytes of an API specific MLResult code.
ML_PLATFORM_API_LEVEL
#define ML_PLATFORM_API_LEVEL 33
Current API Level supported by this Magic Leap SDK.