Paparazzi UAS  v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
xbee.h File Reference

Maxstream XBee serial input and output. More...

#include "subsystems/datalink/datalink.h"
#include "generated/airframe.h"
#include "subsystems/datalink/transport.h"
#include "subsystems/datalink/xbee24.h"
+ Include dependency graph for xbee.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  xbee_transport
 

Macros

#define XBEE_START   0x7e
 
#define XBEE_UNINIT   0
 Status of the API packet receiver automata. More...
 
#define XBEE_GOT_START   1
 
#define XBEE_GOT_LENGTH_MSB   2
 
#define XBEE_GOT_LENGTH_LSB   3
 
#define XBEE_GOT_PAYLOAD   4
 
#define XBeeCheckAndParse(_dev, _trans)   xbee_check_and_parse(&(_dev).device, &(_trans))
 

Functions

void xbee_init (void)
 Initialisation in API mode and setting of the local address FIXME: busy wait. More...
 
static void parse_xbee (struct xbee_transport *t, uint8_t c)
 Parsing a XBee API frame. More...
 
static void xbee_parse_payload (struct xbee_transport *t)
 Parsing a frame data and copy the payload to the datalink buffer. More...
 
static void xbee_check_and_parse (struct link_device *dev, struct xbee_transport *trans)
 

Variables

struct xbee_transport xbee_tp
 

Detailed Description

Maxstream XBee serial input and output.

Definition in file xbee.h.


Data Structure Documentation

struct xbee_transport

Definition at line 54 of file xbee.h.

+ Collaboration diagram for xbee_transport:
Data Fields
uint8_t cs_rx
uint8_t cs_tx
uint8_t payload_idx
uint8_t rssi
uint8_t status
struct transport_rx trans_rx
struct transport_tx trans_tx

Macro Definition Documentation

#define XBEE_GOT_LENGTH_LSB   3

Definition at line 51 of file xbee.h.

Referenced by parse_xbee().

#define XBEE_GOT_LENGTH_MSB   2

Definition at line 50 of file xbee.h.

Referenced by parse_xbee().

#define XBEE_GOT_PAYLOAD   4

Definition at line 52 of file xbee.h.

Referenced by parse_xbee().

#define XBEE_GOT_START   1

Definition at line 49 of file xbee.h.

Referenced by parse_xbee().

#define XBEE_START   0x7e

Definition at line 41 of file xbee.h.

Referenced by parse_xbee(), and start_message().

#define XBEE_UNINIT   0

Status of the API packet receiver automata.

Definition at line 48 of file xbee.h.

Referenced by parse_xbee(), and xbee_init().

#define XBeeCheckAndParse (   _dev,
  _trans 
)    xbee_check_and_parse(&(_dev).device, &(_trans))

Definition at line 137 of file xbee.h.

Function Documentation

static void xbee_check_and_parse ( struct link_device dev,
struct xbee_transport trans 
)
inlinestatic
static void xbee_parse_payload ( struct xbee_transport t)
inlinestatic

Parsing a frame data and copy the payload to the datalink buffer.

Definition at line 120 of file xbee.h.

References dl_buffer, dl_msg_available, transport_rx::payload, transport_rx::payload_len, xbee_transport::trans_rx, TRUE, XBEE_RFDATA_OFFSET, XBEE_RX_ID, XBEE_TX_ID, and XbeeGetRSSI.

Referenced by xbee_check_and_parse().

+ Here is the caller graph for this function:

Variable Documentation

struct xbee_transport xbee_tp

Definition at line 43 of file xbee.c.

Referenced by xbee_init().