net_inbound.c File Reference
#include "net.h"
#include <stdlib.h>
#include "main.h"
#include "UART2.h"
Include dependency graph for net_inbound.c:

Go to the source code of this file.

Macros

#define START_DELIMITER   0x7E
 net_inbound.c More...
 

Enumerations

enum  PacketStatus { EMPTY = 0, BUSY = 1, READY = 2 }
 

Functions

void destroyCommand (struct command *cmd)
 
struct commandpopCommand ()
 
int pushCommand (struct command *cmd)
 
struct commandcreateCommand (char *rawPacket)
 
int checkPacket (char *rawPacket)
 
void inboundBufferMaintenance (void)
 
void __attribute__ ((__interrupt__, no_auto_psv))
 

Variables

struct commandinBuffer [INBOUND_QUEUE_SIZE]
 
int inbuff_start = 0
 
int inbuff_end = 0
 
char rawPackets [RAW_PACKET_BUFFER_SIZE][128]
 
PacketStatus rawPacketStatus [RAW_PACKET_BUFFER_SIZE]
 
static int packetPos = 0
 
static int payloadPos = 0
 
static int payloadLength [RAW_PACKET_BUFFER_SIZE]
 

Macro Definition Documentation

#define START_DELIMITER   0x7E

net_inbound.c

Definition at line 10 of file net_inbound.c.

Enumeration Type Documentation

Enumerator
EMPTY 
BUSY 
READY 

Definition at line 12 of file net_inbound.c.

Function Documentation

void __attribute__ ( (__interrupt__, no_auto_psv)  )

Definition at line 109 of file net_inbound.c.

int checkPacket ( char *  rawPacket)

Definition at line 73 of file net_inbound.c.

Here is the caller 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:

void destroyCommand ( struct command cmd)

Definition at line 30 of file net_inbound.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:

struct command* popCommand ( )

Definition at line 36 of file net_inbound.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:

Variable Documentation

int inbuff_end = 0

Definition at line 20 of file net_inbound.c.

int inbuff_start = 0

Definition at line 19 of file net_inbound.c.

struct command* inBuffer[INBOUND_QUEUE_SIZE]

Definition at line 18 of file net_inbound.c.

int packetPos = 0
static

Definition at line 25 of file net_inbound.c.

int payloadLength[RAW_PACKET_BUFFER_SIZE]
static

Definition at line 27 of file net_inbound.c.

int payloadPos = 0
static

Definition at line 26 of file net_inbound.c.

char rawPackets[RAW_PACKET_BUFFER_SIZE][128]

Definition at line 22 of file net_inbound.c.

Definition at line 23 of file net_inbound.c.