emma controller code in production board v1
Dependencies: ADE7758_v1 Crypto DHT11 MQTT MbedJSONValueEmma SDFileSystem TFT_ILI9341 SWSPI SetRTC TFT_fonts Touch W5500Interface mbed-rtos mbed-src SoftSerial
Fork of emma_controller_energy by
Diff: emmaCode.h
- Revision:
- 44:c1d11c491237
- Parent:
- 40:77bd44f57ad3
- Child:
- 47:97eadcb478b2
diff -r 612547648ed1 -r c1d11c491237 emmaCode.h --- a/emmaCode.h Thu Aug 20 13:16:16 2015 +0000 +++ b/emmaCode.h Wed Aug 26 07:18:33 2015 +0000 @@ -5,8 +5,9 @@ #include "espduino.h" //wifi mqtt #include "mqtt.h" //wifi mqtt #include "rest.h" //wifi rest -#include "MQTTClient.h" //eth mqtt -#include "MQTTEthernet.h" //eth mqtt +//#include "MQTTClient.h" //eth mqtt +//#include "MQTTEthernet.h" //eth mqtt +#include "EthernetInterface.h" //eth rest #include "MbedJSONValue.h" //json #include "SDFileSystem.h" //sd card #include "Crypto.h" //hash calculation @@ -32,6 +33,7 @@ #define MODE_REGISTER 0x02 //registration #define MODE_OPERATION 0x03 //operational #define MODE_FIRMWARE_DOWNLOAD 0x04 //firmware download +#define MODE_RESERVED 0x05 //reserved as sandbox //interface #define IF_WIFI 0x00 @@ -85,6 +87,7 @@ void emmaModeRegister(void); void emmaModeOperation(void); void emmaModeFirmwareDownload(void); +void emmaModeReserved(void); /*end emma mode*/ /*start energy related*/ @@ -104,10 +107,10 @@ /*end wifi rest*/ /*start eth mqtt*/ -int publish(MQTT::Client<MQTTEthernet, Countdown, MQTT_MAX_PACKET_SIZE>* client, MQTTEthernet* ipstack); -void ethMQTTMessageArrived(MQTT::MessageData& md); -int ethMQTTConnect(MQTT::Client<MQTTEthernet, Countdown, MQTT_MAX_PACKET_SIZE>* client, MQTTEthernet* ipstack); -void ethMQTTAttemptConnect(MQTT::Client<MQTTEthernet, Countdown, MQTT_MAX_PACKET_SIZE>* client, MQTTEthernet* ipstack); +//int publish(MQTT::Client<MQTTEthernet, Countdown, MQTT_MAX_PACKET_SIZE>* client, MQTTEthernet* ipstack); +//void ethMQTTMessageArrived(MQTT::MessageData& md); +//int ethMQTTConnect(MQTT::Client<MQTTEthernet, Countdown, MQTT_MAX_PACKET_SIZE>* client, MQTTEthernet* ipstack); +//void ethMQTTAttemptConnect(MQTT::Client<MQTTEthernet, Countdown, MQTT_MAX_PACKET_SIZE>* client, MQTTEthernet* ipstack); /*end eth mqtt*/ /*start emma settings*/