net.h File Reference

List of defines required for XBEE communication and telemetry. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  priority1_block
 
struct  priority2_block
 
struct  priority3_block
 
union  packetPayload
 
struct  telem_block
 
struct  telem_buffer
 
struct  command
 

Macros

#define P0_SEND_FREQUENCY   300
 Time in miliseconds for how often a P0(high priority) packet gets sent down. More...
 
#define P1_SEND_FREQUENCY   1000
 Time in miliseconds for how often a P1(medium priority) packet gets sent down. More...
 
#define P2_SEND_FREQUENCY   20000
 Time in miliseconds for how often a P2(low priority) packet gets sent down. More...
 
#define UPLINK_CHECK_FREQUENCY   100
 Time in miliseconds for how often to check for new messages from the uplink. More...
 
#define BLOCKING_MODE   0
 
#define OUTBOUND_QUEUE_SIZE   30
 
#define INBOUND_QUEUE_SIZE   100
 
#define EDIT_NONE   0
 
#define EDIT_PITCH_GAIN   1
 
#define EDIT_ROLL_GAIN   2
 
#define EDIT_YAW_GAIN   3
 
#define API_HEADER_LENGTH   17
 
#define API_HEADER_PREFIX   3
 
#define RECEIVER_ADDRESS   0x0013A20040B47E6B
 
#define INCREMENT_DATA_FRAME   0x00
 
#define OPTION_BYTE   0x01
 
#define TX_PACKET   0x10
 
#define BROADCAST_RADIUS   1
 
#define RAW_PACKET_BUFFER_SIZE   16
 
#define HEARTBEAT_TIMEOUT   10000
 
#define GPS_TIMEOUT   30000
 
#define HEARTBEAT_KILL_TIMEOUT   20000
 
#define UHF_KILL_TIMEOUT   10000
 

Typedefs

typedef enum _p_priority p_priority
 

Enumerations

enum  _p_priority { PRIORITY0 = 0, PRIORITY1 = 1, PRIORITY2 = 2 }
 

Functions

int initDataLink (void)
 net_outbound.c More...
 
int checkDataLinkConnection ()
 
struct telem_blockgetDebugTelemetryBlock (p_priority packet)
 
struct telem_blockcreateTelemetryBlock (p_priority packet)
 
int packetCount ()
 
void destroyTelemetryBlock (struct telem_block *data)
 
int pushOutboundTelemetryQueue (struct telem_block *data)
 
int getOutboundQueueLength (void)
 
int clearOutboundTelemetryQueue (void)
 
struct telem_blockpopOutboundTelemetryQueue (void)
 
unsigned int generateApiHeader (unsigned char *apiString, char dataFrame)
 
void stageTelemetryBlock (struct telem_block *telem)
 
void outboundBufferMaintenance (void)
 
int sendTelemetryBlock (struct telem_block *telem)
 
void destroyCommand (struct command *cmd)
 
struct commandpopCommand ()
 
int pushCommand (struct command *cmd)
 
struct commandcreateCommand (char *rawPacket)
 
int checkPacket (char *rawPacket)
 
void inboundBufferMaintenance (void)
 

Detailed Description

List of defines required for XBEE communication and telemetry.

Author
Chris Hajduk
Date
Sep 2015

Definition in file net.h.

Macro Definition Documentation

#define API_HEADER_LENGTH   17

Definition at line 39 of file net.h.

#define API_HEADER_PREFIX   3

Definition at line 40 of file net.h.

#define BLOCKING_MODE   0

Definition at line 29 of file net.h.

#define BROADCAST_RADIUS   1

Definition at line 49 of file net.h.

#define EDIT_NONE   0

Definition at line 34 of file net.h.

#define EDIT_PITCH_GAIN   1

Definition at line 35 of file net.h.

#define EDIT_ROLL_GAIN   2

Definition at line 36 of file net.h.

#define EDIT_YAW_GAIN   3

Definition at line 37 of file net.h.

#define GPS_TIMEOUT   30000

Definition at line 54 of file net.h.

#define HEARTBEAT_KILL_TIMEOUT   20000

Definition at line 56 of file net.h.

#define HEARTBEAT_TIMEOUT   10000

Definition at line 52 of file net.h.

#define INBOUND_QUEUE_SIZE   100

Definition at line 32 of file net.h.

#define INCREMENT_DATA_FRAME   0x00

Definition at line 44 of file net.h.

#define OPTION_BYTE   0x01

Definition at line 45 of file net.h.

#define OUTBOUND_QUEUE_SIZE   30

Definition at line 31 of file net.h.

#define P0_SEND_FREQUENCY   300

Time in miliseconds for how often a P0(high priority) packet gets sent down.

Default=300

Definition at line 18 of file net.h.

#define P1_SEND_FREQUENCY   1000

Time in miliseconds for how often a P1(medium priority) packet gets sent down.

Default=1000

Definition at line 21 of file net.h.

#define P2_SEND_FREQUENCY   20000

Time in miliseconds for how often a P2(low priority) packet gets sent down.

Default=20000

Definition at line 24 of file net.h.

#define RAW_PACKET_BUFFER_SIZE   16

Definition at line 50 of file net.h.

#define RECEIVER_ADDRESS   0x0013A20040B47E6B

Definition at line 42 of file net.h.

#define TX_PACKET   0x10

Definition at line 48 of file net.h.

#define UHF_KILL_TIMEOUT   10000

Definition at line 58 of file net.h.

#define UPLINK_CHECK_FREQUENCY   100

Time in miliseconds for how often to check for new messages from the uplink.

Default=100

Definition at line 27 of file net.h.

Typedef Documentation

typedef enum _p_priority p_priority

Enumeration Type Documentation

Enumerator
PRIORITY0 
PRIORITY1 
PRIORITY2 

Definition at line 60 of file net.h.

Function Documentation

int checkDataLinkConnection ( )

Definition at line 19 of file net_common.c.

Here is the caller graph for this function:

int checkPacket ( char *  rawPacket)

Definition at line 73 of file net_inbound.c.

Here is the caller graph for this function:

int clearOutboundTelemetryQueue ( void  )

Definition at line 160 of file net_outbound.c.

Here is the call graph for this function:

struct command* createCommand ( char *  rawPacket)

Definition at line 53 of file net_inbound.c.

Here is the caller graph for this function:

struct telem_block* createTelemetryBlock ( p_priority  packet)

Definition at line 23 of file net_outbound.c.

Here is the caller graph for this function:

void destroyCommand ( struct command cmd)

Definition at line 30 of file net_inbound.c.

Here is the caller graph for this function:

void destroyTelemetryBlock ( struct telem_block data)

Definition at line 131 of file net_outbound.c.

Here is the caller graph for this function:

unsigned int generateApiHeader ( unsigned char *  apiString,
char  dataFrame 
)

Definition at line 230 of file net_outbound.c.

Here is the caller graph for this function:

struct telem_block* getDebugTelemetryBlock ( p_priority  packet)

Definition at line 35 of file net_outbound.c.

int getOutboundQueueLength ( void  )

Definition at line 150 of file net_outbound.c.

Here is the caller graph for this function:

void inboundBufferMaintenance ( void  )

Definition at line 92 of file net_inbound.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int initDataLink ( void  )

net_outbound.c

Definition at line 11 of file net_common.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void outboundBufferMaintenance ( void  )

Definition at line 172 of file net_outbound.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int packetCount ( )

Definition at line 30 of file net_outbound.c.

struct command* popCommand ( )

Definition at line 36 of file net_inbound.c.

Here is the caller graph for this function:

struct telem_block* popOutboundTelemetryQueue ( void  )

Definition at line 218 of file net_outbound.c.

Here is the caller graph for this function:

int pushCommand ( struct command cmd)

Definition at line 44 of file net_inbound.c.

Here is the caller graph for this function:

int pushOutboundTelemetryQueue ( struct telem_block data)

Definition at line 139 of file net_outbound.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int sendTelemetryBlock ( struct telem_block telem)

Definition at line 269 of file net_outbound.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void stageTelemetryBlock ( struct telem_block telem)

Definition at line 208 of file net_outbound.c.

Here is the call graph for this function:

Here is the caller graph for this function: