libctru
v2.4.1
|
NDMU service. More...
Go to the source code of this file.
Enumerations | |
enum | ndmExclusiveState { NDM_EXCLUSIVE_STATE_NONE = 0 , NDM_EXCLUSIVE_STATE_INFRASTRUCTURE = 1 , NDM_EXCLUSIVE_STATE_LOCAL_COMMUNICATIONS = 2 , NDM_EXCLUSIVE_STATE_STREETPASS = 3 , NDM_EXCLUSIVE_STATE_STREETPASS_DATA = 4 } |
Exclusive states. | |
enum | ndmState { NDM_STATE_INITIAL = 0 , NDM_STATE_SUSPENDED = 1 , NDM_STATE_INFRASTRUCTURE_CONNECTING = 2 , NDM_STATE_INFRASTRUCTURE_CONNECTED = 3 , NDM_STATE_INFRASTRUCTURE_WORKING = 4 , NDM_STATE_INFRASTRUCTURE_SUSPENDING = 5 , NDM_STATE_INFRASTRUCTURE_FORCE_SUSPENDING = 6 , NDM_STATE_INFRASTRUCTURE_DISCONNECTING = 7 , NDM_STATE_INFRASTRUCTURE_FORCE_DISCONNECTING = 8 , NDM_STATE_CEC_WORKING = 9 , NDM_STATE_CEC_FORCE_SUSPENDING = 10 , NDM_STATE_CEC_SUSPENDING = 11 } |
Current states. | |
enum | ndmDaemon { NDM_DAEMON_CEC = 0 , NDM_DAEMON_BOSS = 1 , NDM_DAEMON_NIM = 2 , NDM_DAEMON_FRIENDS = 3 } |
enum | ndmDaemonMask { NDM_DAEMON_MASK_CEC = BIT(NDM_DAEMON_CEC) , NDM_DAEMON_MASK_BOSS = BIT(NDM_DAEMON_BOSS) , NDM_DAEMON_MASK_NIM = BIT(NDM_DAEMON_NIM) , NDM_DAEMON_MASK_FRIENDS = BIT(NDM_DAEMON_FRIENDS) , NDM_DAEMON_MASK_BACKGROUOND = NDM_DAEMON_MASK_CEC | NDM_DAEMON_MASK_BOSS | NDM_DAEMON_MASK_NIM , NDM_DAEMON_MASK_ALL = NDM_DAEMON_MASK_CEC | NDM_DAEMON_MASK_BOSS | NDM_DAEMON_MASK_NIM | NDM_DAEMON_MASK_FRIENDS , NDM_DAEMON_MASK_DEFAULT = NDM_DAEMON_MASK_CEC | NDM_DAEMON_MASK_FRIENDS } |
Used to specify multiple daemons. | |
enum | ndmDaemonStatus { NDM_DAEMON_STATUS_BUSY = 0 , NDM_DAEMON_STATUS_IDLE = 1 , NDM_DAEMON_STATUS_SUSPENDING = 2 , NDM_DAEMON_STATUS_SUSPENDED = 3 } |
Functions | |
Result | ndmuInit (void) |
Initializes ndmu. | |
void | ndmuExit (void) |
Exits ndmu. | |
Result | NDMU_EnterExclusiveState (ndmExclusiveState state) |
Sets the network daemon to an exclusive state. More... | |
Result | NDMU_LeaveExclusiveState (void) |
Cancels an exclusive state for the network daemon. | |
Result | NDMU_GetExclusiveState (ndmExclusiveState *state) |
Returns the exclusive state for the network daemon. More... | |
Result | NDMU_LockState (void) |
Locks the exclusive state. | |
Result | NDMU_UnlockState (void) |
Unlocks the exclusive state. | |
Result | NDMU_SuspendDaemons (ndmDaemonMask mask) |
Suspends network daemon. More... | |
Result | NDMU_ResumeDaemons (ndmDaemonMask mask) |
Resumes network daemon. More... | |
Result | NDMU_SuspendScheduler (u32 flag) |
Suspends scheduling for all network daemons. More... | |
Result | NDMU_ResumeScheduler (void) |
Resumes daemon scheduling. | |
Result | NDMU_GetCurrentState (ndmState *state) |
Returns the current state for the network daemon. More... | |
Result | NDMU_QueryStatus (ndmDaemon daemon, ndmDaemonStatus *status) |
Returns a daemon state. More... | |
Result | NDMU_SetScanInterval (u32 interval) |
Sets the scan interval. More... | |
Result | NDMU_GetScanInterval (u32 *interval) |
Returns the scan interval. More... | |
Result | NDMU_GetRetryInterval (u32 *interval) |
Returns the retry interval. More... | |
Result | NDMU_ResetDaemons (void) |
Reverts network daemon to defaults. | |
Result | NDMU_GetDefaultDaemons (ndmDaemonMask *mask) |
Gets the current default daemon bit mask. More... | |
Result | NDMU_ClearMacFilter (void) |
Clears half awake mac filter. | |
NDMU service.
Result NDMU_EnterExclusiveState | ( | ndmExclusiveState | state | ) |
Sets the network daemon to an exclusive state.
state | State specified in the ndmExclusiveState enumerator. |
Returns the current state for the network daemon.
state | Pointer to write the current state to. |
Result NDMU_GetDefaultDaemons | ( | ndmDaemonMask * | mask | ) |
Gets the current default daemon bit mask.
interval | Pointer to write the default daemon mask value to. The default value is (DAEMONMASK_CEC | DAEMONMASK_FRIENDS) |
Result NDMU_GetExclusiveState | ( | ndmExclusiveState * | state | ) |
Returns the exclusive state for the network daemon.
state | Pointer to write the exclsuive state to. |
Returns the retry interval.
interval | Pointer to write the interval value to. |
Returns the scan interval.
interval | Pointer to write the interval value to. |
Result NDMU_QueryStatus | ( | ndmDaemon | daemon, |
ndmDaemonStatus * | status | ||
) |
Returns a daemon state.
daemon | The specified daemon. |
state | Pointer to write the daemon state to. |
Result NDMU_ResumeDaemons | ( | ndmDaemonMask | mask | ) |
Resumes network daemon.
mask | The specified daemon. |
Sets the scan interval.
interval | Value to set the scan interval to. |
Result NDMU_SuspendDaemons | ( | ndmDaemonMask | mask | ) |
Suspends network daemon.
mask | The specified daemon. |