AIDA_pstGetStackParam

The AIDA_pstGetStackParam function reads a single parameter or the complete parameter list of an AIDA stack component.

AIDA_tstParam *AIDA_pstGetStackParam(
  handle hStack,
  byte bLevel,
  const xchar *xsName
);

Parameters

hStack
Handle to a stack previously created by AIDA_hCreateStack
bLevel
Stacklevel of the component where a parameter shall be changed
xsName
Name of the parameter to be read

Return Values

AIDA_pstGetStackParam returns a pointer to an AIDA_tstParam structure. This may be a pointer to a single parameter or to an array of all parameters of the requested component, depending on xsName.

If the function fails the return value is NULL. The application can retrieve the error code using AIDA_iGetError.

Remarks

If xsName is NULL, AIDA_pstGetStackParam returns a pointer to the first parameter of the complete parameter array. The parameter array ends with a parameter with a NULL name (pstParam->xsName == NULL). It is not guaranteed that the values passed by AIDA_pstGetStackParam change "live". So the structure returned by AIDA_pstGetStackParam represent the values valid at the time the function had been called.

Example

/* GETPARLIST.C: This program reads all Parameters of a given component and prints out their names.
 */

#include <stdio.h>
#include <errno.h>
#include "bsk_aida.h";

void vListParams( handle hStack, byte bLevel )
{
  AIDA_tstParam *pstParam;
  
  /* print the parameter list of a component */
  pstParam = AIDA_pstGetStackParam( hStack, bLevel, NULL );
  if( pstParam == NULL )
    printf( "Error retrieving parameter list: %d!\n", AIDA_iGetError() );
  else if ( pstParam->xsParamName == NULL )
    printf( "This component has no parameters.\n" );
  else
    for( printf( "Parameter list:\n" ); pstParam->xsParamName != NULL; printf( "%s\n", (pstParam++)->xsParamName ) );
}

Output

... (depending on the requested component)

QuickInfo

  Windows NT: Requires version 3.1 or later.
  Windows: Requires Windows 95 or later.
  Linux: Requires a kernel supporting ELF binaries.
  Header: Declared in bsk_aida.h, also requires portab.h.
  Import Library (Windows): Use BSK_AIDA.lib.

See Also

AIDA Overview, AIDA Functions, AIDA_boSetStackParam