listenerDataTable: Fetches a data frame containing information captured by...

listenerDataTableR Documentation

Fetches a data frame containing information captured by listener

Description

A number of listerner capture information. This method extracts the data as a data frame for further processing.

Usage

listenerDataTable(listener, appid = character())
## S4 method for signature 'RefListener'
listenerDataTable(listener, appid = character())

Arguments

listener

A Listener subclass where the information was stored.

appid

The name of the application whose data is to be extracted. (In case data from more than one application is stored in the same collection.)

Value

A data.frame giving the requested data.

Note that this data frame could in fact contain columns which are themselves data frames. Consider calling jsonlite::flatten or Peanut::flattenStats on the output.

Author(s)

Russell Almond

See Also

InjectionListener, registerOutput

Examples

## Not run: 
jspecs <- '{
     "listeners":[
	{
	    "name":"ToAS",
	    "type":"InjectionListener",
	    "dbname":"ASRecords",
	    "colname":"Statistics",
	    "messages":["Statistics"]
	}

    ]}'

speclist <- jsonlite::fromJSON(jspecs,FALSE)
appid <- "ecd://pluto.coe.fsu.edu/P4Test"
outdir <- "/usr/local/share/Proc4/data"

lset <- buildListenerSet("TestEngine",speclist$listeners,
                         appid=appid,
                         lscol="Messages",dbname="test",
                         dburi="", sslops=mongolite::ssl_options(),
                         registrycol="OutputFiles",
                         registrydbname="Proc4")


## After engine running.

sl <- lset$listeners[["ToAS"]]
sdat <- listenerDataTable(sl,NULL,appid)
registerOutput(ls,"PP Statistics",
               file.path(outdir,"PPstats.csv"),
               appid,"EA")


## End(Not run)


ralmond/Proc4 documentation built on June 13, 2025, 7:13 a.m.