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

Go to the source code of this file.
Classes | |
| struct | smStruct |
Typedefs | |
| typedef struct smStruct | SMStruct |
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) |
| before 1355313 now 1355169 More... | |
| SMStruct | parseSMAddress (char *str) |
| 2.11.26 moved here from ChainButtonClassType More... | |
| char * | parseDOCFOLLOW (char *str) |
2.11.26 Rainier out in spring like day. refactor, moving parsing from Chain to here.. 2.10.26 NICE day out .. struct for returning a parsed SM address syntax: uuid.flow(set,val,dev)
| char * parseDOCFOLLOW | ( | char * | str | ) |
2.11.26 Lincoln's birthday, Puppies going home to Auburn, Nice Day out.. return the uuid.flownum (if any) search for 'uuid=<uuid>&" and "flow=<flow> [& or }" return NULL if not matching NOTE: no storage is created but the buffer returned is REUSED
strstr() function locates the first occurrence of the null-terminated string needle in the null-terminated string
find uuid
now find flow
follow = } or & (if more args)
Definition at line 1018 of file TokenParser.cpp.

| 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 | ) |
before 1355313 now 1355169
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
2.11.26 REFACTORinto the version below...
Definition at line 843 of file TokenParser.cpp.


| SMStruct parseSMAddress | ( | char * | str | ) |
2.11.26 moved here from ChainButtonClassType
2.10.26 Sunny Clear, Mountain, parse the address syntax: uuid.flow(set,val,dev) NOTE: THis creates storage for the 3 components
return value
syntax: uuid.flow(set,val,dev)
now find the pieces starting at 1 past paren
now the valString
get rid of the " " version
now the dev follow = )
Definition at line 947 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.
