2.5.21. TAPOp_FillMacroBuffer

Loads a buffer in the server with the variable parameters used by a subsequent call to TAPOp_RunBufferedMacro.

Syntax

#include “tapmacro.h”

extern TAPOp_Error TAPOp_FillMacroBuffer(unsigned8 connectId, unsigned8 bufferNo, void *variableParamValues, int paramSize);

where:

connectId

Connection ID, as returned by TAPOp_OpenConnection.

bufferNo

The number of the buffer to load with the variabledata block. This must be 0 or 1.

variableParamValues

A block of data holding the variable parameters to be written to the buffer.

paramSize

The size of the block of variable parameter data. This is required for data to be sent over RPC.

Return

The function returns:

TAPOp_NoError

No error.

TAPOp_NoSuchConnection

The connectId was not recognized.

TAPOp_BadParameter

The bufferNo is not 0 or 1.

TAPOp_RPC_Connection_Fail

The RPC connection was lost while processing this request.

Usage

The parameter data is passed to the server and stored in the indicated macro buffer. Existing data is overwritten, truncating the buffer as required. The data in the buffer is not referenced again until a call to TAPOp_RunBufferedMacro is made.

Note

The call does not have to select the connection and so never returns the error TAPOp_UnableToSelect.

Example

This example demonstrates filling server macro buffer number 1 with the contents of an array, data. Once this has happened a macro that writes this data to the device can be run a number of times from this buffer.

    ... declarations
    InitParams;
    for (int i = 0; i < 32; i++)
        NREnterParamU32(data[i]);
    }
    TAPCheck(TAPOp_FillMacroBuffer(cId, 1, Values, ValPtr));

See also

These TAPOp API functions provide similar or related functionality:

Copyright © 1998-2002 ARM Limited. All rights reserved.ARM DUI 0154B
Non-Confidential