cmd.h File Reference

Commands. More...


Data Structures

struct  _GETTAG_INFO

Defines

#define CMD_UD_ADC   0x0010ul
#define CMD_UD_BUSBUF   0x0800ul
#define CMD_UD_BUSNET   0x1000ul
#define CMD_UD_CPU_IO   0x0008ul
#define CMD_UD_I2C_LCD   0x0400ul
#define CMD_UD_NETWORK   0x0002ul
#define CMD_UD_PWM   0x0100ul
#define CMD_UD_SMTP   0x0040ul
#define CMD_UD_SYSTEM   0x0080ul
#define CMD_UD_TFTP   0x0020ul
#define CMD_UD_UNDEFINED   0x0001ul
#define CMD_UD_USART   0x0004ul
#define CMD_UD_WEB   0x0200ul
#define CMD_UD_XBOARD   0x2000ul
#define CMDCODE_GEN_LCD_ARRAY   ('k')
#define CMDCODE_GEN_LCD_STRING   ('l')
#define CMDCODE_GEN_NEW_NETBIOS_NAME   ('n')
#define CMDCODE_GEN_NEW_PASSWORD   ('b')
#define CMDCODE_GEN_NEW_USERNAME   ('a')
#define CMDCODE_GEN_PASSWORD   ('p')
#define CMDCODE_GEN_USERNAME   ('u')
#define CMDCODE_GENNOVAL_LOGIN   ('l')
#define CMDCODE_GENNOVAL_LOGOUT   ('o')
#define CMDCODE_GENNOVAL_RESET   ('r')
#define CMDCODE_SPI_CFGCLK   ('r')
#define CMDGROUP_BUSCONFIG   ('u')
#define CMDGROUP_CONFIG   ('k')
#define CMDGROUP_GENERAL   ('l')
#define CMDGROUP_GENERAL_NOVAL   ('m')
#define CMDGROUP_PORTA   ('a')
#define CMDGROUP_PORTB   ('b')
#define CMDGROUP_PORTC   ('c')
#define CMDGROUP_PORTD   ('d')
#define CMDGROUP_PORTE   ('e')
#define CMDGROUP_PORTF   ('f')
#define CMDGROUP_PORTG   ('g')
#define CMDGROUP_PORTH   ('h')
#define CMDGROUP_PORTJ   ('i')
#define CMDGROUP_PWM   ('w')
#define CMDGROUP_SPI   ('s')
#define CMDGROUP_XBRD   ('x')
#define VARGROUP_ANALOG   ('n')
#define VARGROUP_BUSCFG   ('u')
#define VARGROUP_CONFIG   ('k')
#define VARGROUP_GENERAL   ('l')
#define VARGROUP_PORTA   ('a')
#define VARGROUP_PORTB   ('b')
#define VARGROUP_PORTC   ('c')
#define VARGROUP_PORTD   ('d')
#define VARGROUP_PORTE   ('e')
#define VARGROUP_PORTF   ('f')
#define VARGROUP_PORTG   ('g')
#define VARGROUP_PORTH   ('h')
#define VARGROUP_PORTJ   ('j')
#define VARGROUP_PWM   ('w')
#define VARGROUP_SECURE   ('s')
#define VARGROUP_XBRD   ('x')
#define VARVAL_GEN_APP_VER_STR   (0x02)
#define VARVAL_GEN_DEMO_MODE   (0x06)
#define VARVAL_GEN_GATEWAY0   (0x1E)
#define VARVAL_GEN_GATEWAY1   (0x1F)
#define VARVAL_GEN_GATEWAY2   (0x20)
#define VARVAL_GEN_GATEWAY3   (0x21)
#define VARVAL_GEN_HAS_BL   (0x04)
#define VARVAL_GEN_IP0   (0x10)
#define VARVAL_GEN_IP1   (0x11)
#define VARVAL_GEN_IP2   (0x12)
#define VARVAL_GEN_IP3   (0x13)
#define VARVAL_GEN_LCD1ADR   (0x22)
#define VARVAL_GEN_LOGGED_IN   (0x03)
#define VARVAL_GEN_MAC0   (0x14)
#define VARVAL_GEN_MAC1   (0x15)
#define VARVAL_GEN_MAC2   (0x16)
#define VARVAL_GEN_MAC3   (0x17)
#define VARVAL_GEN_MAC4   (0x18)
#define VARVAL_GEN_MAC5   (0x19)
#define VARVAL_GEN_MASK0   (0x1A)
#define VARVAL_GEN_MASK1   (0x1B)
#define VARVAL_GEN_MASK2   (0x1C)
#define VARVAL_GEN_MASK3   (0x1D)
#define VARVAL_GEN_NETBIOS_NAME   (0x05)
#define VARVAL_GEN_STACK_VER_STR   (0x01)
#define VARVAL_GEN_USERNAME   (0x00)
#define VARVAL_SEC_PASSWORD   (0x01)
#define VARVAL_SEC_USERNAME   (0x00)

Typedefs

typedef struct _GETTAG_INFO GETTAG_INFO

Functions

WORD cmdGetTag (GETTAG_INFO *pGetTagInfo)
void cmdInit (void)
void cmdTask (void)
WORD execNameValueCmd (BYTE *name, BYTE *value, BYTE user)


Detailed Description

Commands.

Author:
Modtronix Engineering
Dependencies:
Compiler:
MPLAB C18 v2.10 or higher
HITECH PICC-18 V8.35PL3 or higher

Description

This module contains the code that executes all received commands

Configuration

The following defines are used to configure this module, and should be placed in the projdefs.h (or similar) file. For details, see Project Configuration. To configure the module, the required defines should be uncommended, and the rest commented out.
 //*********************************************************************
 //--------------------  Cmd Configuration --------------------
 //*********************************************************************
 //Default "UDP Command Port"
 #define DEFAULT_CMD_UDPPORT (54123ul)

 //Default "UDP Event Port"
 #define DEFAULT_EVENT_UDPPORT (54124ul)

 //"UDP Command Port"
 #define CMD_UDPPORT     DEFAULT_CMD_UDPPORT

 //"UDP Event Port"
 #define EVENT_UDPPORT DEFAULT_EVENT_UDPPORT

Author:
Modtronix Engineering
Dependencies:
Compiler:
MPLAB C18 v2.10 or higher
HITECH PICC-18 V8.35PL3 or higher

Description

This module contains the code that executes all received commands

Configuration

The following defines are used to configure this module, and should be placed in the projdefs.h (or similar) file. For details, see Project Configuration. To configure the module, the required defines should be uncommended, and the rest commented out.
 //*********************************************************************
 //--------------------  Cmd Configuration --------------------
 //*********************************************************************
 //Default "UDP Command Port"
 #define DEFAULT_CMD_UDPPORT (54123)

 //Default "UDP Event Port"
 #define DEFAULT_EVENT_UDPPORT (54124)

 //"UDP Command Port"
 #define CMD_UDPPORT     DEFAULT_CMD_UDPPORT

 //"UDP Event Port"
 #define EVENT_UDPPORT DEFAULT_EVENT_UDPPORT

Define Documentation

#define CMD_UD_ADC   0x0010ul

#define CMD_UD_BUSBUF   0x0800ul

#define CMD_UD_BUSNET   0x1000ul

#define CMD_UD_CPU_IO   0x0008ul

#define CMD_UD_I2C_LCD   0x0400ul

#define CMD_UD_NETWORK   0x0002ul

#define CMD_UD_PWM   0x0100ul

#define CMD_UD_SMTP   0x0040ul

#define CMD_UD_SYSTEM   0x0080ul

#define CMD_UD_TFTP   0x0020ul

#define CMD_UD_UNDEFINED   0x0001ul

#define CMD_UD_USART   0x0004ul

#define CMD_UD_WEB   0x0200ul

#define CMD_UD_XBOARD   0x2000ul

#define CMDCODE_GEN_LCD_ARRAY   ('k')

#define CMDCODE_GEN_LCD_STRING   ('l')

#define CMDCODE_GEN_NEW_NETBIOS_NAME   ('n')

#define CMDCODE_GEN_NEW_PASSWORD   ('b')

#define CMDCODE_GEN_NEW_USERNAME   ('a')

#define CMDCODE_GEN_PASSWORD   ('p')

#define CMDCODE_GEN_USERNAME   ('u')

#define CMDCODE_GENNOVAL_LOGIN   ('l')

#define CMDCODE_GENNOVAL_LOGOUT   ('o')

#define CMDCODE_GENNOVAL_RESET   ('r')

#define CMDCODE_SPI_CFGCLK   ('r')

#define CMDGROUP_BUSCONFIG   ('u')

#define CMDGROUP_CONFIG   ('k')

#define CMDGROUP_GENERAL   ('l')

#define CMDGROUP_GENERAL_NOVAL   ('m')

#define CMDGROUP_PORTA   ('a')

#define CMDGROUP_PORTB   ('b')

#define CMDGROUP_PORTC   ('c')

#define CMDGROUP_PORTD   ('d')

#define CMDGROUP_PORTE   ('e')

#define CMDGROUP_PORTF   ('f')

#define CMDGROUP_PORTG   ('g')

#define CMDGROUP_PORTH   ('h')

#define CMDGROUP_PORTJ   ('i')

#define CMDGROUP_PWM   ('w')

#define CMDGROUP_SPI   ('s')

#define CMDGROUP_XBRD   ('x')

#define VARGROUP_ANALOG   ('n')

#define VARGROUP_BUSCFG   ('u')

#define VARGROUP_CONFIG   ('k')

#define VARGROUP_GENERAL   ('l')

#define VARGROUP_PORTA   ('a')

#define VARGROUP_PORTB   ('b')

#define VARGROUP_PORTC   ('c')

#define VARGROUP_PORTD   ('d')

#define VARGROUP_PORTE   ('e')

#define VARGROUP_PORTF   ('f')

#define VARGROUP_PORTG   ('g')

#define VARGROUP_PORTH   ('h')

#define VARGROUP_PORTJ   ('j')

#define VARGROUP_PWM   ('w')

#define VARGROUP_SECURE   ('s')

#define VARGROUP_XBRD   ('x')

#define VARVAL_GEN_APP_VER_STR   (0x02)

#define VARVAL_GEN_DEMO_MODE   (0x06)

#define VARVAL_GEN_GATEWAY0   (0x1E)

#define VARVAL_GEN_GATEWAY1   (0x1F)

#define VARVAL_GEN_GATEWAY2   (0x20)

#define VARVAL_GEN_GATEWAY3   (0x21)

#define VARVAL_GEN_HAS_BL   (0x04)

#define VARVAL_GEN_IP0   (0x10)

#define VARVAL_GEN_IP1   (0x11)

#define VARVAL_GEN_IP2   (0x12)

#define VARVAL_GEN_IP3   (0x13)

#define VARVAL_GEN_LCD1ADR   (0x22)

#define VARVAL_GEN_LOGGED_IN   (0x03)

#define VARVAL_GEN_MAC0   (0x14)

#define VARVAL_GEN_MAC1   (0x15)

#define VARVAL_GEN_MAC2   (0x16)

#define VARVAL_GEN_MAC3   (0x17)

#define VARVAL_GEN_MAC4   (0x18)

#define VARVAL_GEN_MAC5   (0x19)

#define VARVAL_GEN_MASK0   (0x1A)

#define VARVAL_GEN_MASK1   (0x1B)

#define VARVAL_GEN_MASK2   (0x1C)

#define VARVAL_GEN_MASK3   (0x1D)

#define VARVAL_GEN_NETBIOS_NAME   (0x05)

#define VARVAL_GEN_STACK_VER_STR   (0x01)

#define VARVAL_GEN_USERNAME   (0x00)

#define VARVAL_SEC_PASSWORD   (0x01)

#define VARVAL_SEC_USERNAME   (0x00)


Typedef Documentation

typedef struct _GETTAG_INFO GETTAG_INFO

Structure for passing variables to getVarCmd() function


Function Documentation

WORD cmdGetTag ( GETTAG_INFO pGetTagInfo  ) 

Get the requested tag. The command might not be executed if a higher user level is required.

Parameters:
pGetTagInfo Pointer to GETTAG_INFO structure.
Returns:
Returns number of bytes written to pGetTagInfo->buf. If this value is less then the size of the buffer given, then all requested data has been returned (flags.bFinished flag will also be set)

void cmdInit ( void   ) 

Initializes command processing

void cmdTask ( void   ) 

Must be called every couple of ms

WORD execNameValueCmd ( BYTE name,
BYTE value,
BYTE  user 
)

Execute the given name-value command. The command might not be executed if a higher user level is required.

Parameters:
name The name part of the name-value command
value The value part of the name-value command
user The user level, is a USER_XX constant
Returns:
Returns an UD_XXX flag (or multiple ones ORed together) indicating what has been updated. Not all name-value commands will return a value here.


Generated on Wed Feb 3 12:45:34 2010 for SBC65EC Web Server by  doxygen 1.5.8