Logo Search packages:      
Sourcecode: cbflib version File versions  Download package

def pycbf::cbf_handle_struct::get_integerarray_as_string (   args  ) 

Returns : (Binary)String
*args   : 

C prototype: int cbf_get_integerarray (cbf_handle handle, int *binary_id,
         void    *array, size_t elsize, int elsigned, size_t elements,
         size_t    *elements_read);

CBFLib documentation:
DESCRIPTION
cbf_get_integerarray reads the binary value of the item at the 
current column and row into an integer array. The array consists of 
elements elements of elsize bytes each, starting at array. The 
elements are signed if elsigned is non-0 and unsigned otherwise. 
*binary_id is set to the binary section identifier and *elements_read 
to the number of elements actually read. cbf_get_realarray reads the 
binary value of the item at the current column and row into a real 
array. The array consists of elements elements of elsize bytes each, 
starting at array. *binary_id is set to the binary section identifier 
and *elements_read to the number of elements actually read.
If any element in the integer binary data cant fit into the 
destination element, the destination is set the nearest possible 
value.
If the value is not binary, the function returns CBF_ASCII.
If the requested number of elements cant be read, the function will 
read as many as it can and then return CBF_ENDOFDATA.
Currently, the destination array must consist of chars, shorts or 
ints (signed or unsigned). If elsize is not equal to sizeof (char), 
sizeof (short) or sizeof (int), for cbf_get_integerarray, or 
sizeof(double) or sizeof(float), for cbf_get_realarray the function 
returns CBF_ARGUMENT.
An additional restriction in the current version of CBFlib is that 
values too large to fit in an int are not correctly decompressed. As 
an example, if the machine with 32-bit ints is reading an array 
containing a value outside the range 0 .. 2^32-1 (unsigned) or -2^31 
.. 2^31-1 (signed), the array will not be correctly decompressed. 
This restriction will be removed in a future release. For 
cbf_get_realarray, only IEEE format is supported. No conversion to 
other floating point formats is done at this time.
ARGUMENTS
handle   CBF handle. binary_id   Pointer to the destination integer 
binary identifier. array   Pointer to the destination array. elsize   
Size in bytes of each destination array element. elsigned   Set to 
non-0 if the destination array elements are signed. elements   The 
number of elements to read. elements_read   Pointer to the 
destination number of elements actually read.
RETURN VALUE
Returns an error code on failure or 0 for success. SEE ALSO

Definition at line 2443 of file pycbf.py.

02443                                          :
        """
        Returns : (Binary)String
        *args   : 

        C prototype: int cbf_get_integerarray (cbf_handle handle, int *binary_id,
                         void    *array, size_t elsize, int elsigned, size_t elements,
                         size_t    *elements_read);

        CBFLib documentation:
        DESCRIPTION
        cbf_get_integerarray reads the binary value of the item at the 
        current column and row into an integer array. The array consists of 
        elements elements of elsize bytes each, starting at array. The 
        elements are signed if elsigned is non-0 and unsigned otherwise. 
        *binary_id is set to the binary section identifier and *elements_read 
        to the number of elements actually read. cbf_get_realarray reads the 
        binary value of the item at the current column and row into a real 
        array. The array consists of elements elements of elsize bytes each, 
        starting at array. *binary_id is set to the binary section identifier 
        and *elements_read to the number of elements actually read.
        If any element in the integer binary data cant fit into the 
        destination element, the destination is set the nearest possible 
        value.
        If the value is not binary, the function returns CBF_ASCII.
        If the requested number of elements cant be read, the function will 
        read as many as it can and then return CBF_ENDOFDATA.
        Currently, the destination array must consist of chars, shorts or 
        ints (signed or unsigned). If elsize is not equal to sizeof (char), 
        sizeof (short) or sizeof (int), for cbf_get_integerarray, or 
        sizeof(double) or sizeof(float), for cbf_get_realarray the function 
        returns CBF_ARGUMENT.
        An additional restriction in the current version of CBFlib is that 
        values too large to fit in an int are not correctly decompressed. As 
        an example, if the machine with 32-bit ints is reading an array 
        containing a value outside the range 0 .. 2^32-1 (unsigned) or -2^31 
        .. 2^31-1 (signed), the array will not be correctly decompressed. 
        This restriction will be removed in a future release. For 
        cbf_get_realarray, only IEEE format is supported. No conversion to 
        other floating point formats is done at this time.
        ARGUMENTS
        handle   CBF handle. binary_id   Pointer to the destination integer 
        binary identifier. array   Pointer to the destination array. elsize   
        Size in bytes of each destination array element. elsigned   Set to 
        non-0 if the destination array elements are signed. elements   The 
        number of elements to read. elements_read   Pointer to the 
        destination number of elements actually read.
        RETURN VALUE
        Returns an error code on failure or 0 for success. SEE ALSO

        """
        return _pycbf.cbf_handle_struct_get_integerarray_as_string(*args)


Generated by  Doxygen 1.6.0   Back to index