nn::ndm Namespace

Description

Namespace for the network daemon control library.

A daemon is a static module that processes autonomously in the background of the application. CTR has a number of daemons for network processes.
ndm (Network Daemon Manager) is a special daemon that manages the daemons performing network processes. The ndm library is a library for controlling this special daemon.

The Need for Daemon Control

The application runs on the CPU's application core, while the daemons run in parallel on the CPU's system core. Accordingly, the daemons do not directly take away from the application's CPU time.
On the other hand, the application and the daemons share the network and NAND. For this reason, the activities of the daemons can in some cases impact the performance of the application.

If a decline in network or NAND performance is fatal to the application, the ndm library can halt the operations of the various communication modules.
(For example, when a network multiplayer mode requiring low latency is started or when the scene switches to a scene that loads a large volume of data from NAND.)

When switching to local communications or another communications mode, the various communications libraries control the daemons automatically via the ndm library.
The application developer does not have to worry about anything other than performance.

Daemons Under Control of the ndm Library

Daemons can be freely stopped, but the different daemons all have their roles to play, so there are various restrictions on the stopping of daemons. It is therefore important to understand how the stopping of any given daemon will impact the system.

A document will be prepared in the future, providing details about the various daemons.
For this current release, please do not use the functions that control individual daemons (nn::ndm::Suspend and nn::ndm::Resume); instead, use the functions that control all of the daemons (nn::ndm::SuspendScheduler, nn::ndm::ResumeScheduler, and the like).

Reference Predicted Impacts of Daemons on Applications
Daemon
(nn::ndm::DaemonName)
Impact on NetworkImpact on NAND
nn::ndm::DN_CEC None
(Infrastructure communications not used)
Moderate
(NAND access of some 10KB to 10MB occurs when Streetpass is being established)
nn::ndm::DN_BOSS High
(HTTP communications occur when task executes)
High
(NAND write occurs when task executes)
nn::ndm::DN_NIM Low
(HTTP communications occur when connecting to access point)
Low
nn::ndm::DN_FRIENDS Low
(UDP communications occur when disconnecting)
Low

Functions

Initialize Initializes the network daemon control library.
Finalize Finalizes the network daemon control library.
SuspendDaemons Suspends autonomous operation of all network daemons.
ResumeDaemons Resumes autonomous operation of all network daemons.
Suspend Suspends autonomous operation of the network daemon.
Resume Resumes autonomous operation of the network daemon.
SuspendScheduler Suspends the daemon manager that handles scheduling for all network daemons.
ResumeScheduler Resumes daemon scheduling.
SetupDaemonsDefault Reverts network daemon operating permissions to the SDK defaults.

Revision History

2010/09/17
Initial version.

CONFIDENTIAL