MPDSStep, MPDSTryStep

C Specification

#include <revolution/mp.h>
s32 MPDSStep ( MPDSContext* context, const void* sendData, MPDSDataSet dataSet );
s32 MPDSTryStep ( MPDSContext* context, const void* sendData, MPDSDataSet dataSet );

Arguments

context A pointer to the MPDSContext structure used to maintain the DataSharing status.
sendData Pointer to the data to be sent
dataSet A pointer to the MPDSDataSet structure used to store shared data.

Return Values

Returns the processing result. Returns a negative number if processing fails.

Description

Advances DataSharing by one step. The data in sendData is sent for sharing at the same time as shared data is stored in dataSet. The size of the sent data is the number of bytes set in the dataLength field within the MPDSConfig structure.

For details on DataSharing, see the Wireless Communications Library Overview included with the NITRO-SDK.

The MPDSStep function blocks until new shared data is received.
The MPDSTryStep function, however, fails immediately with MP_RESULT_NO_DATA when no new shared data is received, and the data in sendData is not sent.

To know the timing at which newly shared data can be received, the MPDS_PORT_CB_TYPE_DATASET_RECEIVED notification to the callback set in the MPDSConfig structure's mpdsCallback field can be used. This notification is generated asynchronously in the background in conjunction with any running MP communications.

See Also

MPError

Revision History

2007/11/28 Initial version.


CONFIDENTIAL