Ignore:
Timestamp:
04/13/13 12:54:56 (11 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
hg-Phase:
(<MercurialRepository 3 'hg:/home/ivaradi/xplane/hg/xplra' '/'>, 'public')
Message:

Added the description of the C API

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/client/c/hu/varadiistvan/xplra/xplra.h

    r58 r70  
    3232/*----------------------------------------------------------------------------*/
    3333
     34/** @file */
     35
     36/*----------------------------------------------------------------------------*/
     37
    3438#include <stdlib.h>
    3539#include <inttypes.h>
     
    107111/*----------------------------------------------------------------------------*/
    108112
     113/**
     114 * This ID is returned by multi-dataref buffer functions when the
     115 * buffer is not found, this the dataref cannot be assigned an ID
     116 */
    109117#define INVALID_DATAREF_ID ((size_t)-1)
    110118
     
    193201 * @param length the length of the destination buffer
    194202 * @param offset the offset from which to query the array
     203 * @param connectionID the ID of the connection to use
     204 * @param name the name of the dataref
    195205 *
    196206 * @return the actual number of elements returned in case of success,
     
    209219 * less than or equal to the input value.
    210220 * @param offset the offset from which to query the array
     221 * @param connectionID the ID of the connection to use
     222 * @param name the name of the dataref
    211223 *
    212224 * @return the new array on success, 0 on error
     
    223235 * @param length the length of the destination buffer
    224236 * @param offset the offset from which to query the array
     237 * @param connectionID the ID of the connection to use
     238 * @param name the name of the dataref
    225239 *
    226240 * @return the actual number of elements returned in case of success,
     
    239253 * less than or equal to the input value.
    240254 * @param offset the offset from which to query the array
     255 * @param connectionID the ID of the connection to use
     256 * @param name the name of the dataref
    241257 *
    242258 * @return the new array on success, 0 on error
     
    253269 * @param length the length of the destination buffer
    254270 * @param offset the offset from which to query the array
     271 * @param connectionID the ID of the connection to use
     272 * @param name the name of the dataref
    255273 *
    256274 * @return the actual number of elements returned in case of success,
     
    269287 * less than or equal to the input value.
    270288 * @param offset the offset from which to query the array
     289 * @param connectionID the ID of the connection to use
     290 * @param name the name of the dataref
    271291 *
    272292 * @return the new array on success, 0 on error
     
    497517 *
    498518 * @param dest pointer to the variable that will receive the value
     519 * @param bufferID the ID of the buffer to use
     520 * @param datarefID the ID of the dataref whose value is to be retrieved
    499521 *
    500522 * @return 0 on success, -1 on error.
     
    535557 *
    536558 * @param dest pointer to the variable that will receive the value
     559 * @param bufferID the ID of the buffer to use
     560 * @param datarefID the ID of the dataref whose value is to be retrieved
    537561 *
    538562 * @return 0 on success, -1 on error.
     
    573597 *
    574598 * @param dest pointer to the variable that will receive the value
     599 * @param bufferID the ID of the buffer to use
     600 * @param datarefID the ID of the dataref whose value is to be retrieved
    575601 *
    576602 * @return 0 on success, -1 on error.
     
    601627 * Set the contents of the float array dataref with the given ID.
    602628 *
     629 * @param bufferID the ID of the buffer to use
     630 * @param datarefID the ID of the dataref whose value is to be set
     631 * @param value the array to set
    603632 * @param length the amount of data. If 0, it is assumed to be the
    604633 * length of the data in the buffer minus the offset.
     
    616645 * Get the contents of the float array with the given ID.
    617646 *
     647 * @param value the destination buffer
    618648 * @param length the amount of data. If 0, it is assumed to be the
    619649 * length of the data in the buffer minus the offset.
    620650 * @param offset the offset within the buffer to get the data from
     651 * @param bufferID the ID of the buffer to use
     652 * @param datarefID the ID of the dataref whose value is to be retrieved
    621653 *
    622654 * @return the number of data items retrieved, or -1 on error.
     
    631663 * Get a pointer to the float array with the given ID.
    632664 *
     665 * @param bufferID the ID of the buffer to use
     666 * @param datarefID the ID of the dataref whose value is to be retrieved
    633667 * @param offset the offset within the buffer.
    634668 *
     
    643677 * Set the contents of the integer array dataref with the given ID.
    644678 *
     679 * @param bufferID the ID of the buffer to use
     680 * @param datarefID the ID of the dataref whose value is to be set
     681 * @param value the array to set
    645682 * @param length the amount of data. If 0, it is assumed to be the
    646683 * length of the data in the buffer minus the offset.
     
    658695 * Get the contents of the integer array with the given ID.
    659696 *
     697 * @param value the destination buffer
    660698 * @param length the amount of data. If 0, it is assumed to be the
    661699 * length of the data in the buffer minus the offset.
    662700 * @param offset the offset within the buffer to get the data from
     701 * @param bufferID the ID of the buffer to use
     702 * @param datarefID the ID of the dataref whose value is to be retrieved
    663703 *
    664704 * @return the number of data items retrieved, or -1 on error.
     
    673713 * Get a pointer to the integer array with the given ID.
    674714 *
     715 * @param bufferID the ID of the buffer to use
     716 * @param datarefID the ID of the dataref whose value is to be retrieved
    675717 * @param offset the offset within the buffer.
    676718 *
     
    685727 * Set the contents of the byte array dataref with the given ID.
    686728 *
     729 * @param bufferID the ID of the buffer to use
     730 * @param datarefID the ID of the dataref whose value is to be set
     731 * @param value the array to set
    687732 * @param length the amount of data. If 0, it is assumed to be the
    688733 * length of the data in the buffer minus the offset.
     
    700745 * Get the contents of the byte array with the given ID.
    701746 *
     747 * @param value the destination buffer
    702748 * @param length the amount of data. If 0, it is assumed to be the
    703749 * length of the data in the buffer minus the offset.
    704750 * @param offset the offset within the buffer to get the data from
     751 * @param bufferID the ID of the buffer to use
     752 * @param datarefID the ID of the dataref whose value is to be retrieved
    705753 *
    706754 * @return the number of data items retrieved, or -1 on error.
     
    715763 * Get a pointer to the byte array with the given ID.
    716764 *
     765 * @param bufferID the ID of the buffer to use
     766 * @param datarefID the ID of the dataref whose value is to be retrieved
    717767 * @param offset the offset within the buffer.
    718768 *
     
    752802 * @param connectionID the ID of the connection for which the buffer
    753803 * has been created.
     804 * @param bufferID the ID of the buffer to destroy
    754805 *
    755806 * @return 0 on success, -1 on error.
     
    793844
    794845/**
     846 * Disconnect the connection with the given ID.
     847 *
     848 * @return 0 on success, -1 on error.
     849 */
     850int xplra_disconnect(int connectionID);
     851
     852/*----------------------------------------------------------------------------*/
     853
     854/**
     855 * Reconnect the connection with the given ID. If it is already
     856 * connected, nothing happens.
     857 *
     858 * @return 0 on success, -1 on error.
     859 */
     860int xplra_reconnect(int connectionID);
     861
     862/*----------------------------------------------------------------------------*/
     863
     864/**
    795865 * Destroy the connection with the given ID.
    796866 *
    797867 * @return 0 on success, -1 on error.
    798868 */
    799 int xplra_disconnect(int connectionID);
     869int xplra_destroy(int connectionID);
    800870
    801871/*----------------------------------------------------------------------------*/
Note: See TracChangeset for help on using the changeset viewer.