nn::hio::CTR::SerialChannel::Read Member Function

Syntax

#include <nn/hio.h>

Result Read(
     size_t * pReadSize,
     void * buf,
     size_t size,
     bit32 attr = ATTRIBUTE_NONE
);

Arguments

Name Description
out pReadSize Location where the size of data (in bytes) that were actually received are stored.
out buf Buffer where the received data is stored.
in size Maximum size of the data to receive.
in attr Reception attribute.
If set to ATTRIBUTE_NONE, the function blocks until either size bytes can be received or the channel is closed.
If set to ATTRIBUTE_NO_WAIT, the function returns as soon as there is no more data to receive. If size is larger than the amount of received data, the function returns without receiving data.

Return Values

Returns the result of the operation.

Description

Receives data from the host and returns the result of the operation.

size bytes of data are received to the buffer specified by buf.
The attr parameter specifies how to behave when the received data is fewer bytes than specified by size.
The process returns a nn::Result-type result.

Revision History

2010/06/14
Added description of arguments and behavior.
2010/03/31
Initial version.

CONFIDENTIAL