XBEE_CONSETTINGS

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

NAME

xbee_conSettings  

SYNOPSIS

#include <xbee.h>

xbee_err xbee_conSettings(struct xbee_con *con, struct xbee_conSettings *newSettings, struct xbee_conSettings *oldSettings);

struct xbee_conSettings {
        /* libxbee options: */
        unsigned char noBlock;
        unsigned char catchAll;
        unsigned char noWaitForAck;
        
        /* generic options: */
        unsigned char queueChanges; /* for AT connections */
        unsigned char disableAck;   /* specific options for XBee 1 / causes use of FrameID 0x00 for others */
        unsigned char broadcast;
        
        /* XBee 2 / ZNet options: */
        unsigned char multicast;
        
        /* XBee ZigBee options: */
        unsigned char disableRetries;
        unsigned char enableEncryption;
        unsigned char extendTimeout;
        
        /* XBee 5 options: */
        unsigned char noRoute;

        /* other */
        unsigned char broadcastRadius;
};
 

DESCRIPTION

xbee_conSettings() allows you to configure the connection's parameters.

One of newSettings and oldSettings can optionally be NULL, one must be non-NULL.

If they are non-NULL, then the struct pointed to by oldSettings will be filled with the effective settings before the call to xbee_conSettings(), and then newSettings will be used to update the connection's settings.  

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;
struct xbee_con *con;
struct xbee_conSettings settings;

/* initialize xbee, using xbee_setup() */

/* initialize con, using xbee_conNew() */

if (xbee_conSettings(con, NULL, &settings) != XBEE_ENONE) return;
settings.disableAck = 1;
if (xbee_conSettings(con, &settings, NULL) != XBEE_ENONE) return;
 

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:19 GMT, August 11, 2019