Mindstorms 3rd Party ROBOTC Drivers RobotC
[Home] [Download] [Submit a bug/suggestion] [ROBOTC Forums] [Blog] [Support this project]
Defines | Functions | Variables

benedettelli-nxt2wifi.h File Reference

Dani's WiFi Sensor. More...

#include "common.h"
#include "common-rs485.h"

Go to the source code of this file.

Defines

#define WS_WEBLABEL   1
#define WS_WEBBUTTON   2
#define WS_WEBCHECKBOX   3
#define WS_WEBSLIDER   4
#define WS_WEBBARGRAPH   5
#define WF_SEC_OPEN   0
#define WF_SEC_WEP_40   1
#define WF_SEC_WEP_104   2
#define WF_SEC_WPA_KEY   3
#define WF_SEC_WPA_PASSPHRASE   4
#define WF_SEC_WPA2_KEY   5
#define WF_SEC_WPA2_PASSPHRASE   6
#define WF_SEC_WPA_AUTO_KEY   7
#define WF_SEC_WPA_AUTO_PASSPHRASE   8
#define AD_HOC   1
#define INFRASTRUCTURE   0
#define N2WchillOut()   wait1Msec(50)
#define N2WsetIPAddress(X)   _N2WsetPar("IPAD", X)
#define N2WsetMask(X)   _N2WsetPar("MASK", X)
#define N2WsetGateway(X)   _N2WsetPar("GWAY", X)
#define N2WsetDNS1(X)   _N2WsetPar("DNS1", X)
#define N2WsetDNS2(X)   _N2WsetPar("DNS2", X)
#define N2WsetSSID(X)   _N2WsetPar("SSID", X)
#define N2WsetNetbiosName(X)   _N2WsetPar("NAME", X)

Functions

intrinsic int StringFind (const char *sSrce, const char *pzFindString) asm(opcdStringOps
intrinsic int variableRefCharPtr (sSrce)
intrinsic int variableRefCharPtr (pzFindString))
int N2WgetNumericResponse (tMassiveArray &buf)
void N2WgetStringResponse (const tMassiveArray &buf, string &response)
bool N2WsetDebug (bool en)
bool N2WConnect (bool custom)
bool N2WDisconnect ()
bool N2WStopConnecting ()
bool N2WDelete ()
bool N2WSave ()
bool N2WLoad ()
void N2WReset ()
bool N2WSecurity (int mode, const ubyte *pKeypass, int keylen, int keyind)
bool N2WSecurityWPA2Key (tBigByteArray &key, int len)
bool N2WSecurityWPA2Passphrase (const string passphrase)
bool N2WSecurityWPAKey (tBigByteArray &key, int len)
bool N2WSecurityWPAPassphrase (const string &passphrase)
bool N2WSecurityWEP104 (const string &passphrase)
bool N2WSecurityOpen ()
bool N2WsetAdHoc (bool adhoc)
bool _N2WsetPar (const string type, const string param)
bool N2WsetDHCP (bool yes)
bool N2WsetDefaultProfile (ubyte profile)
bool N2WCustomExist ()
bool N2WsetHibernate (bool hibernate)
bool N2WsetPowerSave (bool powersave)
int N2WStatus ()
bool N2WConnected ()
bool N2WgetIP (string &IP)
void N2WgetMAC (string &mac)
bool N2WUDPOpenClient (int id, string ip, int port)
bool N2WUDPOpenServer (int id, int port)
int N2WUDPAvail (int id)
int N2WUDPRead (int id, int datalen)
bool N2WUDPWrite (int id, tHugeByteArray &data, int datalen)
bool N2WUDPClose (int id)
bool N2WUDPFlush (int id)
bool N2WTCPOpenClient (int id, string host, int port)
bool N2WTCPOpenClient (int id, char *host, int port)
bool N2WTCPOpenServer (int id, int port)
bool N2WTCPDetachClient (int id)
bool N2WTCPClose (int id)
bool N2WTCPFlush (int id)
int N2WTCPAvail (int id)
int N2WTCPRead (int id, int datalen)
int N2WTCPWrite (int id, tHugeByteArray &data, int datalen)
void N2WTCPClientIP (int id, string &ip)
void N2WTCPClientMAC (int id, string &mac)
bool N2WenableWS (bool enable)
bool N2WreadWS (ubyte &type, ubyte &ID, ubyte &state, ubyte &value)
bool N2WwriteWS (ubyte type, ubyte id, tHugeByteArray &wsmessage, ubyte wsmsglen)
bool N2WclearFields ()

Variables

string N2WscratchString
intrinsic int strOpFind
intrinsic int functionReturn

Detailed Description

Dani's WiFi Sensor.

benedettelli-nxt2wifi.h provides an API for Dani's WiFi Sensor.

Changelog:

Credits:

License: You may use this code as you wish, provided you give credit where its due.

THIS CODE WILL ONLY WORK WITH ROBOTC VERSION 3.59 AND HIGHER.

Author:
Xander Soldaat (xander_at_botbench.com)
Date:
12 June 2012
Version:
0.1

Definition in file benedettelli-nxt2wifi.h.