nn::ndm NamespaceNamespace 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 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.
ndm LibraryDaemons 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.
This deamon carries out StreetPass communication (nn::cec). Stopping this daemon completely shuts down StreetPass communications being carried out in the application background. Operations where the application does something like access the StreetPass message box can be performed as usual.
This deamon carries out SpotPass communication (nn::boss). Stopping this daemon completely shuts down SpotPass communications being carried out in the application background.
Operations by the application such as registering tasks, immediate execution, and acessing storage can be performed as usual.
nn::ndm::CTR::DN_NIM is a supplemental module for executing system processes.We recommend that when you stop nn::ndm::CTR::DN_BOSS, you also stop nn::ndm::DN_NIM along with it.
This daemon manages the friend presence feature (nn::friends). Stopping this daemon halts autonomous login in the application background. Operations by applications such as accessing friend information, or explicit login processes can be performed as usual.
Note that autonomous login is not carried out during sleep, either, and behavior may appear the same as when a stop command has been issued.
|
Daemon (nn::ndm::CTR::DaemonName) | Impact on Network | Impact on NAND |
|---|---|---|
| nn::ndm::CTR::DN_CEC |
None (Infrastructure communications not used) |
Moderate (NAND access of some 10KB to 10MB occurs when Streetpass is being established) |
| nn::ndm::CTR::DN_FRIENDS |
Low (UDP communications occur when disconnecting) | Low |
| nn::ndm::CTR::DN_BOSS |
High (HTTP communications occur when task executes) |
High (NAND write occurs when task executes) |
| nn::ndm::CTR::DN_NIM |
High (HTTP communications occur when task executes) |
High (NAND write occurs when task executes) |
Daemon operations cannot be controlled during sleep. Even if the application issues a stop command, behavior will be exactly the same as during sleep while the daemon has not been stopped. When the system recovers from sleep, it returns to the state before sleep. You must therefore take into account the fact that the damon state, such as receiving new data, has changed when recovering from sleep even if the daemon is stopped.
| nn::ndm::CTR | Namespace for the network daemon control library. (This can also be written with "CTR" omitted.) |
|---|
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. |
CONFIDENTIAL