RBE1001Lib
Functions | Variables
WebPage.cpp File Reference
#include <Arduino.h>
#include <WebServer.h>
#include <HTTP_Method.h>
#include "WebPage.h"
#include "static/static.h"
#include <ESPAsyncWebServer/ESPAsyncWebServer.h>
#include "Motor.h"
#include "RBE1001Lib.h"
#include <stdio.h>
#include <string.h>
#include "freertos/FreeRTOS.h"
#include "freertos/queue.h"
Include dependency graph for WebPage.cpp:

Go to the source code of this file.

Functions

AsyncWebServer server (80)
 
AsyncWebSocket ws ("/test")
 
void onWsEvent (AsyncWebSocket *server, AsyncWebSocketClient *client, AwsEventType type, void *arg, uint8_t *data, size_t len)
 
char * String2Chars (String str)
 
bool isSafeToSend ()
 
void lock ()
 
void unlock ()
 
void updateTask (void *param)
 
void packetTXTask (void *param)
 

Variables

static WebPagethisPage
 
static char stringBuffer [200]
 
static bool lockOutSending = false
 
long timeSinceLastSend =0
 

Function Documentation

◆ isSafeToSend()

bool isSafeToSend ( )

Definition at line 152 of file WebPage.cpp.

References lockOutSending, and timeSinceLastSend.

Referenced by lock().

◆ lock()

void lock ( )

Definition at line 158 of file WebPage.cpp.

References isSafeToSend(), and lockOutSending.

Referenced by WebPage::initalize(), and updateTask().

Here is the call graph for this function:

◆ onWsEvent()

void onWsEvent ( AsyncWebSocket *  server,
AsyncWebSocketClient *  client,
AwsEventType  type,
void *  arg,
uint8_t *  data,
size_t  len 
)

◆ packetTXTask()

void packetTXTask ( void *  param)

Definition at line 194 of file WebPage.cpp.

◆ server()

AsyncWebServer server ( 80  )

Referenced by WebPage::initalize().

◆ String2Chars()

char* String2Chars ( String  str)

Definition at line 130 of file WebPage.cpp.

References stringBuffer.

◆ unlock()

void unlock ( )

Definition at line 165 of file WebPage.cpp.

References lockOutSending, and timeSinceLastSend.

Referenced by WebPage::initalize(), and updateTask().

◆ updateTask()

void updateTask ( void *  param)

◆ ws()

AsyncWebSocket ws ( "/test"  )

Variable Documentation

◆ lockOutSending

bool lockOutSending = false
static

Definition at line 24 of file WebPage.cpp.

Referenced by isSafeToSend(), lock(), and unlock().

◆ stringBuffer

char stringBuffer[200]
static

Definition at line 18 of file WebPage.cpp.

Referenced by String2Chars().

◆ thisPage

WebPage* thisPage
static

Definition at line 17 of file WebPage.cpp.

◆ timeSinceLastSend

long timeSinceLastSend =0

Definition at line 26 of file WebPage.cpp.

Referenced by isSafeToSend(), and unlock().