|
ESP_IOT v2.5
IOT ESP Coding
|
#include "../../Defines.h"

Go to the source code of this file.
Functions | |
| void | parseQueryLine_mainModule (char *line) |
| parses a line of text, The caller then uses queryMatchesName() to see if their name matches More... | |
| boolean | queryMatchesName_mainModule (char *name) |
| boolean | stringIsQuery_mainModule (char *line) |
| whether the stirng is a potential query More... | |
| void | setup_tokenParser_mainModule () |
| setup for the token parser (really just for testing) More... | |
| char * | semanticMarkerToJSON_TokenParser (char *semanticMarker) |
| char * | parseSM_For_UUID_Flownum (char *semanticMarker) |
| void parseQueryLine_mainModule | ( | char * | line | ) |
parses a line of text, The caller then uses queryMatchesName() to see if their name matches
parses a line of text, The caller then uses queryMatchesName() to see if their name matches
NOTE: doesn't support the BLE addresses like: DevQuery: !M5Laybrinth & !84:cc:a8:7a:f6:aa
initialize the variables for parsing this line
if no query params, then make it an identifier and exit
if parsing still then add to identifier
start a new identifier..
init the identifier
else not valid identifier (so a follow..)
done parsing if not a valid identifier character
finishIdNeeded is before pushing another token, unless a not or wildcard
now classify this char if an identifier modifier
! and * belong to the identifier object if a modifier of ident (~ or *) then push the token, and process the identifier
an operator or space if inside an identifier, finish it first
process the token
& and | are expression modifiers
if end of line, and was parsing an identifier .. then finish
Definition at line 258 of file TokenParser.cpp.

| char * parseSM_For_UUID_Flownum | ( | char * | semanticMarker | ) |
3.29.25 Raiiiinier Beeer movie last night add returning a UUID.FLOWNUM if valid, or nil if nota
3.29.25 Raiiiinier Beeer movie last night add returning a UUID.FLOWNUM if valid, or nil if nota note "flow" .. not flownum uuid=x&flow=y& .. flownum could be the last .. so end-of-line
syntax: uuid=X&flownum=Y
needed to copy semanticMarker .. as the code below broke the callers' value to "https:" .. SIDE EFFECT
look for tokens
break by '&'
advance quealIndex past the equal
Definition at line 838 of file TokenParser.cpp.

| boolean queryMatchesName_mainModule | ( | char * | name | ) |
now need to process the token tree to see if name1 and name2 match the query eg. ! name & name2 ... wildcards after name make it slightly complicated SO: look for wildcards before and after, and the id. then decide if that matches before the boolean and notmodifier applied
basically for each identifier in the query, the names (1&2) have to be compared each time..
what the last boolean_enum was..
the result of A <> B
Definition at line 424 of file TokenParser.cpp.


| char * semanticMarkerToJSON_TokenParser | ( | char * | semanticMarker | ) |
3.23.25 rainy weekend create a JSON string from the SemanticMarker https://semanticmarker.org/bot/setdevice/scott@konacurrents.com/PASS/M5AtomSocket/socket/on} Create a JSON knowing the "bot" syntax, eg. setdevice/USER/PASS/device/<set>/<flag> and others like set etc. Maybe not 'dev' here. Others cmddevice/USER/PASS return: {'set':<set>,"dev': Supports these for now: GET /set/{username}/{password}/{command}/{value} GET /send/{username}/{password}/{request} only support 'device' ones GET /setdevice/{username}/{password}/{devicename}/{command}/{value} GET /senddevice/{username}/{password}/{device}/{request} return "" if not valid 3.23.25 rainy weekend create a JSON string from the SemanticMarker https://semanticmarker.org/bot/setdevice/scott@konacurrents.com/PASS/M5AtomSocket/socket/on} Create a JSON knowing the "bot" syntax, eg. setdevice/USER/PASS/device/<set>/<flag> and others like set etc. Maybe not 'dev' here. Others cmddevice/USER/PASS return: {'set':<set>,"dev': set- sends the message (command/value) to all device Supports these for now: GET /set/{username}/{password}/{command}/{value} GET /send/{username}/{password}/{request} only support 'device' ones GET /setdevice/{username}/{password}/{devicename}/{command}/{value} GET /senddevice/{username}/{password}/{device}/{request} return "" if not valid
not supported
if set then there will be more .. so add ',' if send then this is the end (no ',')
replace ' with "
Definition at line 721 of file TokenParser.cpp.

| void setup_tokenParser_mainModule | ( | ) |
setup for the token parser (really just for testing)
setup for the token parser (really just for testing)
Definition at line 659 of file TokenParser.cpp.

| boolean stringIsQuery_mainModule | ( | char * | line | ) |
whether the stirng is a potential query
whether the stirng is a potential query. This can be used, but it is also used by the parseQueryLine to optimize out the original dev:name query.
Definition at line 412 of file TokenParser.cpp.
