Oxford CWM Team / ESP8266_MDM_LIB

Dependents:   ESP8266_MDM_LIB

Embed: (wiki syntax)

« Back to documentation index

ESP8266_mdm Class Reference

A library for the base of the solar nano grid controllers. More...

#include <ESP8266_mdm.h>

Public Member Functions

 ESP8266_mdm (RawSerial *esp, int server, RawSerial *pc, PinName rstPn)
 Constructor:
void dev_recv ()
 Device has received a byte.

Protected Member Functions

void doLoop (int initState)
 Loops through until state = maxState;.
int OKResponse (char *test, const char *pattern)
 Checks if pattern is in test.

Protected Attributes

RawSerial * esp
 The serial port.
int server
 Tells if server or not.

Detailed Description

A library for the base of the solar nano grid controllers.

This library contains the code to drive batteries, hub etc.

Definition at line 40 of file ESP8266_mdm.h.


Constructor & Destructor Documentation

ESP8266_mdm ( RawSerial *  esp,
int  server,
RawSerial *  pc,
PinName  rstPn 
)

Constructor:

Parameters:
espA pointer to the serial connection to the esp.
server=1 for server, 0 for client

Definition at line 64 of file ESP8266_mdm.cpp.


Member Function Documentation

void dev_recv (  )

Device has received a byte.

Definition at line 111 of file ESP8266_mdm.cpp.

void doLoop ( int  initState ) [protected]

Loops through until state = maxState;.

Definition at line 168 of file ESP8266_mdm.cpp.

int OKResponse ( char *  test,
const char *  pattern 
) [protected]

Checks if pattern is in test.

Returns 1 for true, 0 for no. -1 if busy. -2 ERROR

Definition at line 148 of file ESP8266_mdm.cpp.


Field Documentation

RawSerial* esp [protected]

The serial port.

Definition at line 80 of file ESP8266_mdm.h.

int server [protected]

Tells if server or not.

Definition at line 81 of file ESP8266_mdm.h.