Wifly Driver  V1.0
Macros | Functions | Variables
Arpalab.c File Reference
#include "LPC17xx.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "Type.h"
#include "Config.h"
#include "WiFly.h"
#include "Arpalab.h"
#include "FreeRTOS.h"
#include "semphr.h"
Include dependency graph for Arpalab.c:

Go to the source code of this file.

Macros

#define GET_SEND   "GET$/rest/stats?nid=%d&ip=%s&app=%s&data=%d"
 
#define GET_RECEIVE   "GET$/rest/feed"
 
#define IP_REMOTE   80
 
#define IP_PROTO   18
 
#define BUFSIZE   (BUFSIZE_WIFLY)
 

Functions

uint8_t Arpalab_start (char *ssid, uint32_t AuthMode, char *passw)
 
uint8_t Arpalab_sendValue (char *dnsAddress, uint32_t id, char *app, uint32_t value)
 
int32_t Arpalab_receiveValue (char *dnsAddress)
 

Variables

xSemaphoreHandle xMutexArpalab
 
char resp [BUFSIZE]
 

Macro Definition Documentation

#define BUFSIZE   (BUFSIZE_WIFLY)

Definition at line 26 of file Arpalab.c.

#define GET_RECEIVE   "GET$/rest/feed"

Definition at line 22 of file Arpalab.c.

Referenced by Arpalab_receiveValue().

#define GET_SEND   "GET$/rest/stats?nid=%d&ip=%s&app=%s&data=%d"

Definition at line 21 of file Arpalab.c.

Referenced by Arpalab_sendValue().

#define IP_PROTO   18

Definition at line 25 of file Arpalab.c.

Referenced by Arpalab_receiveValue(), and Arpalab_sendValue().

#define IP_REMOTE   80

Definition at line 24 of file Arpalab.c.

Referenced by Arpalab_receiveValue(), and Arpalab_sendValue().

Function Documentation

int32_t Arpalab_receiveValue ( char *  dnsAddress)

Send a HTTP command an Get a random value.

Parameters
dnsAddressDestination DNS or IP address.
Returns
Returns whether the transmission was successful. SUCCESS = TRUE, ERROR = FALSE.

Definition at line 80 of file Arpalab.c.

References GET_RECEIVE, IP_PROTO, IP_REMOTE, resp, string, Wifly_HTTPReceive(), Wifly_WLANConnectPing(), WLAN_PING_CHECK, and xMutexArpalab.

Here is the call graph for this function:

uint8_t Arpalab_sendValue ( char *  dnsAddress,
uint32_t  id,
char *  app,
uint32_t  value 
)

Send a HTTP command and receive the server response.

Parameters
dnsAddressDestination DNS or IP address.
idInformation id.
appName of the app.
valueNumerical value to send.
Returns
Returns whether the transmission was successful. SUCCESS = TRUE, ERROR = FALSE.

Definition at line 62 of file Arpalab.c.

References FALSE, GET_SEND, IP_PROTO, IP_REMOTE, Wifly_getIp(), Wifly_HTTPSend(), Wifly_WLANConnectPing(), WLAN_PING_CHECK, and xMutexArpalab.

Here is the call graph for this function:

uint8_t Arpalab_start ( char *  ssid,
uint32_t  AuthMode,
char *  passw 
)

Start Arpalab settings

Parameters
ssidSSID name.
AuthModeAuthentication mode:
passwpassword
Returns
TRUE, FALSE

Definition at line 43 of file Arpalab.c.

References FALSE, NULL, and xMutexArpalab.

Variable Documentation

char resp[BUFSIZE]

Definition at line 32 of file Arpalab.c.

Referenced by Arpalab_receiveValue(), Tcp_receiveValue(), and Udp_receiveValue().

xSemaphoreHandle xMutexArpalab

Definition at line 28 of file Arpalab.c.

Referenced by Arpalab_receiveValue(), Arpalab_sendValue(), and Arpalab_start().