AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
ARDesign.Widgets.InfluxReader Class Referenceabstract

Abstract class for querying Influx data to widgets. Includes implemented methods for building useful queries - see Query Helper Functions More...

Inheritance diagram for ARDesign.Widgets.InfluxReader:
ARDesign.Widgets.InfluxType< T >

Public Member Functions

void SetDBVals (string m, string b, string r)
 Sets the base database values - should be called before anything else! More...
 
void UpdateVals ()
 Update the values in the widget, by querying the database. More...
 
void SetVals ()
 Set the values in the widget, by querying the database. Heavy overhead, depending on data type More...
 
string BuildUrlWithLimit (int limit)
 Builds a https Influx query to return a fixed limit of values More...
 
string BuildUrlWithoutLimit ()
 Builds a https Influx query to return all values More...
 
string BuildUrlWithLimitSetType (string type, int limit)
 Builds a https Influx query to return a fixed limit of values of a given type More...
 
string BuildUrlWithoutLimitSetType (string type)
 Builds a https Influx query to return all values of a given type More...
 
string BuildUrlTagList (string keyName)
 Builds a https Influx query to return all tags for a given key Use for building list of types in a measurement More...
 

Public Attributes

bool toUpdate = false
 
bool isDataBuilt = false
 
bool isSetup = false
 

Protected Member Functions

abstract string SetQueryUrl ()
 Sets the URL and query for setting up the widget Called automatically on widget creation More...
 
abstract string SetUpdateUrl ()
 Sets the URL and query for updating up the widget Called automatically on widget creation More...
 
abstract void ParseSetUpText (string webReturn)
 Call back function for building the widget More...
 
abstract void ParseUpdateText (string webReturn)
 Call back function for updating the widget More...
 
string BuildUrl (string query)
 Builds a https Influx query for the given string More...
 

Protected Attributes

string measure
 
string building
 
string room
 
WidgetHandler widget
 

Detailed Description

Abstract class for querying Influx data to widgets. Includes implemented methods for building useful queries - see Query Helper Functions

Definition at line 50 of file InfluxReader.cs.

Member Function Documentation

§ BuildUrl()

string ARDesign.Widgets.InfluxReader.BuildUrl ( string  query)
protected

Builds a https Influx query for the given string

Parameters
queryInflux query to encode
Returns
URL for the query

Definition at line 184 of file InfluxReader.cs.

§ BuildUrlTagList()

string ARDesign.Widgets.InfluxReader.BuildUrlTagList ( string  keyName)

Builds a https Influx query to return all tags for a given key Use for building list of types in a measurement

Parameters
keyNameKey to fetch tags for
Returns
URL for the query

Definition at line 242 of file InfluxReader.cs.

§ BuildUrlWithLimit()

string ARDesign.Widgets.InfluxReader.BuildUrlWithLimit ( int  limit)

Builds a https Influx query to return a fixed limit of values

Parameters
limitNumber of values to return
Returns
URL for the query

Definition at line 194 of file InfluxReader.cs.

§ BuildUrlWithLimitSetType()

string ARDesign.Widgets.InfluxReader.BuildUrlWithLimitSetType ( string  type,
int  limit 
)

Builds a https Influx query to return a fixed limit of values of a given type

Parameters
typeType of value to fetch
limitNumber of values to return
Returns
URL for the query

Definition at line 218 of file InfluxReader.cs.

§ BuildUrlWithoutLimit()

string ARDesign.Widgets.InfluxReader.BuildUrlWithoutLimit ( )

Builds a https Influx query to return all values

Returns
URL for the query

Definition at line 205 of file InfluxReader.cs.

§ BuildUrlWithoutLimitSetType()

string ARDesign.Widgets.InfluxReader.BuildUrlWithoutLimitSetType ( string  type)

Builds a https Influx query to return all values of a given type

Parameters
typeType of value to fetch
Returns
URL for the query

Definition at line 229 of file InfluxReader.cs.

§ ParseSetUpText()

abstract void ARDesign.Widgets.InfluxReader.ParseSetUpText ( string  webReturn)
protectedpure virtual

Call back function for building the widget

Parameters
webReturnResult from setup query

§ ParseUpdateText()

abstract void ARDesign.Widgets.InfluxReader.ParseUpdateText ( string  webReturn)
protectedpure virtual

Call back function for updating the widget

Parameters
webReturnResult from update query

§ SetDBVals()

void ARDesign.Widgets.InfluxReader.SetDBVals ( string  m,
string  b,
string  r 
)

Sets the base database values - should be called before anything else!

Parameters
mMeasure name
bBuilding
rRoom

Definition at line 78 of file InfluxReader.cs.

§ SetQueryUrl()

abstract string ARDesign.Widgets.InfluxReader.SetQueryUrl ( )
protectedpure virtual

Sets the URL and query for setting up the widget Called automatically on widget creation

Returns
URL for setup query

§ SetUpdateUrl()

abstract string ARDesign.Widgets.InfluxReader.SetUpdateUrl ( )
protectedpure virtual

Sets the URL and query for updating up the widget Called automatically on widget creation

Returns
URL for update query

§ SetVals()

void ARDesign.Widgets.InfluxReader.SetVals ( )

Set the values in the widget, by querying the database. Heavy overhead, depending on data type

Definition at line 101 of file InfluxReader.cs.

§ UpdateVals()

void ARDesign.Widgets.InfluxReader.UpdateVals ( )

Update the values in the widget, by querying the database.

Definition at line 92 of file InfluxReader.cs.

Member Data Documentation

§ building

string ARDesign.Widgets.InfluxReader.building
protected

Definition at line 61 of file InfluxReader.cs.

§ isDataBuilt

bool ARDesign.Widgets.InfluxReader.isDataBuilt = false

Definition at line 55 of file InfluxReader.cs.

§ isSetup

bool ARDesign.Widgets.InfluxReader.isSetup = false

Definition at line 57 of file InfluxReader.cs.

§ measure

string ARDesign.Widgets.InfluxReader.measure
protected

Definition at line 60 of file InfluxReader.cs.

§ room

string ARDesign.Widgets.InfluxReader.room
protected

Definition at line 62 of file InfluxReader.cs.

§ toUpdate

bool ARDesign.Widgets.InfluxReader.toUpdate = false

Definition at line 53 of file InfluxReader.cs.

§ widget

WidgetHandler ARDesign.Widgets.InfluxReader.widget
protected

Definition at line 68 of file InfluxReader.cs.


The documentation for this class was generated from the following file: