XBEE_CONGETTYPES

Section: Linux Programmer's Manual (3)
Updated: 02-Mar-2012
Index Return to Main Contents
 

NAME

xbee_conGetTypes  

SYNOPSIS

#include <xbee.h>

xbee_err xbee_conGetTypes(struct xbee *xbee, char ***retList);  

DESCRIPTION

xbee_conGetTypes() allows you to retrieve a list of connection types that are provided by the given libxbee instance's mode. Once you have used the returned array, you should free() the pointer to avoid memory leaks. The last item in the array is set to NULL to mark the end.

For a list of connection types generally avaliable, please see xbee_conNew(3).  

Return Value

On success this function will return XBEE_ENONE, otherwise an error number from enum xbee_errors (as specified in <xbee.h>)  

EXAMPLE

#include <xbee.h>

struct xbee *xbee;
char **types;
int i;

/* initialize xbee, using xbee_setup() */

if (xbee_conGetTypes(xbee, &types) != XBEE_ENONE) return;

for (i = 0; types[i]; i++) {
        printf("type %d: %s\n", i, types[i]);
}

free(types);
 

AUTHOR

Attie Grande <attie@attie.co.uk>  

SEE ALSO

libxbee(3), xbee_setup(3), xbee_conNew(3)


 

Index

NAME
SYNOPSIS
DESCRIPTION
Return Value
EXAMPLE
AUTHOR
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 13:52:18 GMT, August 11, 2019