STRUCT
ArdkFeatureStatus
public struct ArdkFeatureStatus: OptionSet, CustomStringConvertible, @unchecked Sendable
Status flags for ARDK features indicating their current operational state.
ArdkFeatureStatus is an option set that represents various status conditions
for ARDK features like VPS, WPS, scanning, and mapping. Multiple status flags
can be active simultaneously to provide detailed status information.
Overview
Use this to monitor the health and state of ARDK features:
- Check for errors that need attention
- Monitor initialization progress
- Verify configuration and API key validity
- Ensure features are ready for operation
Example Usage
let status = vpsSession.getFeatureStatus()
if status.contains(.badApiKey) {
print("Invalid API key - check your credentials")
} else if status.contains(.configurationFailed) {
print("Feature configuration failed")
} else if status.contains(.initializing) {
print("Feature is still initializing...")
} else if status == .ok {
print("Feature is ready and operational")
}
Properties
rawValue
public let rawValue: UInt32
The raw value representing the status flags.
ok
public static let ok = ArdkFeatureStatus([])
Feature is operating normally with no issues.
This represents the ideal state where the feature is ready and functional.
notused1
public static let notused1 = ArdkFeatureStatus(fromC: ARDK_FeatureStatus_NullArdkHandle)
Reserved status flag (not used in current implementation).
notused2
public static let notused2 = ArdkFeatureStatus(fromC: ARDK_FeatureStatus_DoesNotExist)
Reserved status flag (not used in current implementation).
configurationFailed
public static let configurationFailed = ArdkFeatureStatus(fromC: ARDK_FeatureStatus_ConfigurationFailed)
Feature configuration failed.
This indicates that the feature could not be configured with the provided settings. Check configuration parameters and try reconfiguring the feature.
badApiKey
public static let badApiKey = ArdkFeatureStatus(fromC: ARDK_FeatureStatus_BadApiKey)
Invalid or expired API key.
The provided API key is not valid or has expired. Verify your API key and ensure it has the necessary permissions for the requested features.
description
public var description: String
Methods
init(rawValue:)
public init(rawValue: UInt32)
Creates a feature status with the specified raw value.
- Parameter rawValue: The raw status value from the underlying C API
Parameters
| Name | Description |
|---|---|
| rawValue | The raw status value from the underlying C API |
init(fromC:)
public init(fromC: ARDK_FeatureStatus)
Creates a feature status from a C API status value.
- Parameter fromC: The status value from the underlying C API
Parameters
| Name | Description |
|---|---|
| fromC | The status value from the underlying C API |
isOk()
public func isOk() -> Bool