Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]


How to configure a port for efficient writing

Write requests of zero bytes always wait for the buffer to be empty before completing, regardless of the state of the KConfigWriteBufferedComplete bit. This is a useful feature that enables something like a file transfer of a series of blocks to be sent efficiently making use of early completion, while still being able to guarantee (through the null write) that all the data has actually cleared the transmitter at end of the transfer. The write of zero bytes can be guaranteed either by sending an empty descriptor:

outputBuffer.Zero();
commPort.Write (requeststatus,outputBuffer);

or else by sending a descriptor with an optional length parameter of zero:

commPort.Write (requeststatus,outputBuffer,0);