arm_get_correlator_length

Langue: en

Version: August 2008 (fedora - 05/07/09)

Section: 3 (Bibliothèques de fonctions)

NAME

arm_get_correlator_length - get length of correlator

SYNOPSIS

#include <arm4.h>

arm_error_t
arm_get_correlator_length(

    const arm_correlator_t *
correlator

    arm_correlator_length_t *
length);

DESCRIPTION

arm_get_correlator_length() returns the length of a correlator, based on the length field within the correlator header. Note that this length is not necessarily the length of the buffer containing the correlator.

A correlator header contains a length field. arm_get_correlator_length() is used to return the length. The function handles any required conversion from the network byte order used in the header and the endian (big versus little) of the platform. See arm_generate_correlator() for a description of a correlator.

correlator is a pointer to a buffer containing a correlator. It serves no purpose to make the call if the pointer is null.

length is a pointer to an arm_correlator_length_t (a 16-bit integer) into which the ARM implementation will store the length. It serves no purpose to make the call if the pointer is null. The stored value will be the actual value if the value is apparently correct; otherwise, it will be zero. Examples of when zero would be stored are when the input correlator pointer is null or the length field is invalid, such as being greater than 512 (ARM_CORR_MAX_LENGTH) bytes.

RETURN VALUE

On success, the function returns ARM_SUCCESS. A non-zero value indicates an error.

ERRORS

If the return code is negative, an error occurred. If the return code is not negative, an error may or may not have occurred - the determination of what is an error and whether an error code is returned is at the discretion of the ARM implementation. The application can test the return code if it wants to provide its own error logging.

The following errors are recognized by this implementation, but may not be portable to other implementations:

ARM_FAILURE_NULL_ARGUMENT
The length must not be null.

CONFORMING TO

ARM Issue 4.0 C Language Bindings, Version 2

EXAMPLE

None.

SEE ALSO

arm_generate_correlator(3), arm_start_transaction(3)