nn::cec::CTR NamespaceNamespace for the CEC library.
(This namespace can also be written without the ::CTR portion.)
CTR StreetPass is an improved and easier-to-use iteration of a similar Nintendo DS feature called Chance Encounter Communication (CEC).
Because the system performs the communication in the background, sending and receiving data can be performed simply by preparing the send data, regardless of the application running or its status. However, because an application's original communication processes cannot be implemented, there is a chance that implementation of send/receive methods that require special conditions may not be possible.
StreetPass communication is enabled by creating a StreetPass box in the area prepared by the system and registering StreetPass data as the message to send in it. This allows the system to automatically send/receive StreetPass data with communication partners.
There are 12 StreetPass boxes available. In principle, one application can exclusively own one StreetPass box. If all StreetPass boxes are already in use, no new StreetPass boxes can be created until the user deletes unnecessary StreetPass settings on the StreetPass management screen in the system settings.
The StreetPass box contains a send box (outbox) and a receive box (inbox). Each is allocated as a region to register StreetPass data to be sent and as a region to store received StreetPass data, respectively.
When two units that can perform StreetPass near each other and discover each other, the StreetPass box in the other unit's system region is scanned first. If there is a StreetPass box created with the same application (title ID) in the other's unit, communication begins only for the portion required for StreetPass send and receive data. When StreetPass data from several StreetPass boxes is to be sent, the data is sent from the smallest in size. But the communication partners may not remain in an area where they communicate long enough for all of the StreetPass send and receive data to be completed. When they are in the communication area for a short time, it is possible only the smallest data sent initially may be successfully communicated to the first person. For this reason, it is effective to keep the StreetPass data size as small as possible to increase the communication success rate. In addition, if they are not grouped, only one block of StreetPass data can be sent from one StreetPass box.
Depending on the settings, StreetPass data that can only be received can be saved, but be aware that StreetPass will not occur between receive-only data units. This situation also applies to StreetPass data that can only be sent. Specifically, if the first registered data is receive-only or send-only, StreetPass exchange will never occur, no matter how much time passes.
Note: The system communicates once with each partner and remembers those partners. StreetPass with the same partner will not occur again until an average of 4 hours or a maximum of 8 hours elapses.
Note: StreetPass is not possible between a test unit (used for development) and a retail system.
Note: StreetPass does occur between systems whose regions are different.
nn::cec::CTR::CecControl
|
Changes StreetPass (CEC) status and gets information. |
|---|---|
nn::cec::CTR::Message
|
Class that handles CEC Message objects. |
nn::cec::CTR::MessageBox
|
This class is used to access CEC MessageBox objects. |
nn::cec::CTR::MessageId
|
Class that handles message IDs. |
nn::cec::CTR::CecNotificationParam
|
Receive information for each box. |
|---|---|
nn::cec::CTR::CecNotificationData
|
Receive information. |
CecBoxDataType
|
Indicates the types of data associated with boxes. | |
|---|---|---|
CecBoxType
|
Types used for inboxes and outboxes. |
typedef DefinitionsSendMode |
||
|---|---|---|
SendMode
|
The sending mode for messages. This value is specified in the message.( Message::NewMessage etc.) |
|
MessageTypeFlag |
||
MessageTypeFlag
|
Flag for switching messages depending on the recipient. Specified in a message.( Message::NewMessage etc.) |
|
MessageExHeaderType |
||
MessageExHeaderType
|
Data types for a message's extended header. | |
| Other | ||
TitleId
|
StreetPass ID format. This 32-bit value can be generated with the MakeCecTitleId function. |
|
SendMode |
|||
|---|---|---|---|
| S |
SENDMODE_RECV
|
const u8 | Receiving only. |
| S |
SENDMODE_SEND
|
const u8 | Sending only. |
| S |
SENDMODE_SENDRECV
|
const u8 | Sending and receiving. |
| S |
SENDMODE_EXCHANGE
|
const u8 | Exchange. |
MessageTypeFlag |
|||
| S |
MESSAGE_TYPEFLAG_NON_FRIEND
|
const u8 | Non-friends can receive the message. |
| S |
MESSAGE_TYPEFLAG_FRIEND
|
const u8 | Friends can receive the message. |
| S |
MESSAGE_TYPEFLAG_ANYONE
|
const u8 | Receivable without checking whether the sender is a friend or not a friend. |
MessageExHeaderType |
|||
| S |
MESSAGE_EXHEADER_TYPE_ICON
|
const u32 |
Description of each Message icon. Use this to specify the MessageExHeaderType. |
| S |
MESSAGE_EXHEADER_TYPE_INFO
|
const u32 |
Description of each Message data item. Use this to specify the MessageExHeaderType. |
| Send Count and Propagation Count | |||
| S |
MESSAGE_SENDCOUNT_ONCE
|
const u8 | Specifies the number of times to send. The message is sent only once. |
| S |
MESSAGE_SENDCOUNT_UNLIMITED
|
const u8 | Specifies the number of times to send. It does not set a limit on the send count. |
| S |
MESSAGE_PROPAGATIONCOUNT_ONCE
|
const u8 | Specifies the number of times to propagate. It does not initiate propagation. |
| Other | |||
| S |
CEC_SIZEOF_MESSAGEID
|
const s32 | MessageId size. |
| S |
MESSAGE_BODY_SIZE_MAX
|
const size_t | Maximum size of the body of the message. |
| Initialize/Finalize | ||
|---|---|---|
Initialize
|
Connects to the CEC daemon. This must be called first to all access to the CEC functions. | |
Finalize
|
Finalizes access to the CEC daemon. | |
| Receipt notification | ||
GetCecRecvEventHandle
|
Specifies the Event object to receive reception notifications. |
|
GetCecInfoBuffer
|
Gets information about a message received in the previous communication. | |
| Other | ||
MakeCecTitleId
|
Generates a 32-bit StreetPass ID (CecTitleId) that is used in StreetPass from a 20-bit unique ID. | |
MessageBoxInfoReader class, since that class is not supported.CONFIDENTIAL