Classes | Macros | Enumerations | Functions | Variables
xbee.cpp File Reference
#include <asf.h>
#include <string>
#include "conf_board.h"
#include "drivers/d_usartDMA.h"
#include "globals.h"
#include "../../../src/ISComm.h"
#include "xbee.h"
Include dependency graph for xbee.cpp:

Go to the source code of this file.

Classes

struct  xbee_diff_commands
 
struct  xbee_read_commands
 

Macros

#define BUF_SIZE   256
 
#define XBEE_API_ENABLE   "AP"
 
#define XBEE_APPLY_CHANGES   "AC"
 
#define XBEE_BAUD_RATE   "BD"
 
#define XBEE_BCAST_MULTITX   "MT"
 
#define XBEE_EXIT_COMMAND_MODE   "CN"
 
#define XBEE_NETWORK_ID   "ID"
 
#define XBEE_PACKETIZATION_TO   "RO"
 
#define XBEE_PREAMBLE_ID   "HP"
 
#define XBEE_RESTORE_DEFAULTS   "RE"
 
#define XBEE_RSSI   = "DB"
 
#define XBEE_SLEEP_MODE   "SM"
 
#define XBEE_SOFTWARE_RESET   "FR"
 
#define XBEE_TX_OPTIONS   "TO"
 
#define XBEE_TX_POWER_LEVEL   "PL"
 
#define XBEE_UCAST_RETRIES   "RR"
 
#define XBEE_WRITE_VALUES   "WR"
 

Enumerations

enum  {
  XSTATE_RUN_TIME_DEFAULT = 0, XSTATE_START_CONFIG, XSTATE_AT_CMD_MODE_START_1, XSTATE_AT_CMD_MODE_START_2,
  XSTATE_AT_CMD_MODE_CONFIG, XSTATE_AT_CMD_MODE_FAILURE, XSTATE_AT_CMD_MODE_FAILURE_DELAY, XSTATE_AT_CMD_MODE_FINISH,
  XSTATE_AT_CMD_MODE_FINISH_DELAY
}
 
enum  xbee_frame_id {
  AT_COMMAND_FRAME = 0x08, AT_COMMAND_QUEUE_FRAME = 0x09, TX_REQUEST_FRAME = 0x10, TX_EXPLICIT_REQUEST_FRAME = 0x11,
  AT_REMOTE_COMMAND_FRAME = 0x17, AT_SECURE_REMOTE_COMMAND_FRAME = 0x18, AT_COMMAND_RESPONSE_FRAME = 0x88, RX_INDICATOR_FRAME = 0x90,
  RX_EXPLICIT_INDICATOR_FRAME = 0x91, NODE_ID_FRAME = 0x95, REMOTE_COMMAND_RESPONSE_FRAME = 0x97
}
 

Functions

static void send_at_command (string cmd)
 
static bool send_next_at_command ()
 
void xbee_init (void)
 
static void xbee_receive (is_comm_instance_t *comm)
 
int xbee_runtime_mode (void)
 
void xbee_step (is_comm_instance_t *comm)
 

Variables

static int s_at_command_idx = 0
 
static bool s_at_ok = 0
 
static int s_baud_rate = 115200
 
static int s_timer_ms = 0
 
static int s_xstate = XSTATE_RUN_TIME_DEFAULT
 
xbee_diff_commands xbee_diff
 
xbee_read_commands xbee_read
 

Macro Definition Documentation

◆ BUF_SIZE

#define BUF_SIZE   256

◆ XBEE_API_ENABLE

#define XBEE_API_ENABLE   "AP"

Definition at line 55 of file xbee.cpp.

◆ XBEE_APPLY_CHANGES

#define XBEE_APPLY_CHANGES   "AC"

Special Commands

Definition at line 40 of file xbee.cpp.

◆ XBEE_BAUD_RATE

#define XBEE_BAUD_RATE   "BD"

Definition at line 53 of file xbee.cpp.

◆ XBEE_BCAST_MULTITX

#define XBEE_BCAST_MULTITX   "MT"

Definition at line 49 of file xbee.cpp.

◆ XBEE_EXIT_COMMAND_MODE

#define XBEE_EXIT_COMMAND_MODE   "CN"

Definition at line 44 of file xbee.cpp.

◆ XBEE_NETWORK_ID

#define XBEE_NETWORK_ID   "ID"

Definition at line 48 of file xbee.cpp.

◆ XBEE_PACKETIZATION_TO

#define XBEE_PACKETIZATION_TO   "RO"

Definition at line 54 of file xbee.cpp.

◆ XBEE_PREAMBLE_ID

#define XBEE_PREAMBLE_ID   "HP"

Settable parameters. Only list the ones that are different from the stock config.

Definition at line 47 of file xbee.cpp.

◆ XBEE_RESTORE_DEFAULTS

#define XBEE_RESTORE_DEFAULTS   "RE"

Definition at line 42 of file xbee.cpp.

◆ XBEE_RSSI

#define XBEE_RSSI   = "DB"

Readable parameters. Only list the ones you want to read

Definition at line 59 of file xbee.cpp.

◆ XBEE_SLEEP_MODE

#define XBEE_SLEEP_MODE   "SM"

Definition at line 56 of file xbee.cpp.

◆ XBEE_SOFTWARE_RESET

#define XBEE_SOFTWARE_RESET   "FR"

Definition at line 41 of file xbee.cpp.

◆ XBEE_TX_OPTIONS

#define XBEE_TX_OPTIONS   "TO"

Definition at line 51 of file xbee.cpp.

◆ XBEE_TX_POWER_LEVEL

#define XBEE_TX_POWER_LEVEL   "PL"

Definition at line 52 of file xbee.cpp.

◆ XBEE_UCAST_RETRIES

#define XBEE_UCAST_RETRIES   "RR"

Definition at line 50 of file xbee.cpp.

◆ XBEE_WRITE_VALUES

#define XBEE_WRITE_VALUES   "WR"

Definition at line 43 of file xbee.cpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
XSTATE_RUN_TIME_DEFAULT 
XSTATE_START_CONFIG 
XSTATE_AT_CMD_MODE_START_1 
XSTATE_AT_CMD_MODE_START_2 
XSTATE_AT_CMD_MODE_CONFIG 
XSTATE_AT_CMD_MODE_FAILURE 
XSTATE_AT_CMD_MODE_FAILURE_DELAY 
XSTATE_AT_CMD_MODE_FINISH 
XSTATE_AT_CMD_MODE_FINISH_DELAY 

Definition at line 84 of file xbee.cpp.

◆ xbee_frame_id

Enumerator
AT_COMMAND_FRAME 
AT_COMMAND_QUEUE_FRAME 
TX_REQUEST_FRAME 
TX_EXPLICIT_REQUEST_FRAME 
AT_REMOTE_COMMAND_FRAME 
AT_SECURE_REMOTE_COMMAND_FRAME 
AT_COMMAND_RESPONSE_FRAME 
RX_INDICATOR_FRAME 
RX_EXPLICIT_INDICATOR_FRAME 
NODE_ID_FRAME 
REMOTE_COMMAND_RESPONSE_FRAME 

Definition at line 24 of file xbee.cpp.

Function Documentation

◆ send_at_command()

static void send_at_command ( string  cmd)
static

Definition at line 114 of file xbee.cpp.

◆ send_next_at_command()

static bool send_next_at_command ( )
static

Definition at line 121 of file xbee.cpp.

◆ xbee_init()

void xbee_init ( void  )

Definition at line 236 of file xbee.cpp.

◆ xbee_receive()

static void xbee_receive ( is_comm_instance_t comm)
static

Definition at line 178 of file xbee.cpp.

◆ xbee_runtime_mode()

int xbee_runtime_mode ( void  )

Definition at line 364 of file xbee.cpp.

◆ xbee_step()

void xbee_step ( is_comm_instance_t comm)

Definition at line 246 of file xbee.cpp.

Variable Documentation

◆ s_at_command_idx

int s_at_command_idx = 0
static

Definition at line 105 of file xbee.cpp.

◆ s_at_ok

bool s_at_ok = 0
static

Definition at line 107 of file xbee.cpp.

◆ s_baud_rate

int s_baud_rate = 115200
static

Definition at line 109 of file xbee.cpp.

◆ s_timer_ms

int s_timer_ms = 0
static

Definition at line 108 of file xbee.cpp.

◆ s_xstate

int s_xstate = XSTATE_RUN_TIME_DEFAULT
static

Definition at line 110 of file xbee.cpp.

◆ xbee_diff

xbee_diff_commands xbee_diff

Definition at line 99 of file xbee.cpp.

◆ xbee_read

xbee_read_commands xbee_read

Definition at line 100 of file xbee.cpp.



inertial_sense_ros
Author(s):
autogenerated on Sat Sep 19 2020 03:19:07