Page tree
Skip to end of metadata
Go to start of metadata

Contents


We can deliver detailed radio information from all gateways that received a given frame. Our server caches a number of last received messages in a circular buffer, per application.

If you suspect you missed some messages, you can query the cache and retrieve the messages at a later point.

The response will always return newest cache records on the first page, and by increasing the page number, you can access older cache records.


Query message (client to server)



Message format Typescript interface notation

{
    cmd      : 'cq';	   // identifies type of message, cq = cache query
    filter?  : {
        from?   : number;  // filter messages from this timestamp
        to?     : number;  // filter messages up to this timestamp
        EUI?    : string;  // filter only messages from this EUI
    },
    page?    : number;     // page indicator (one-based), default 1
    perPage? : number;     // results to return per page, default 100
}


Example Message

 {
    "cmd"  : "cq",
    "filter" : {
    	"from" : 1470850675433,
    	"EUI"  : "0102030405060708",
    },
    "page":1,
    "perPage":100
}


ParameterTypeDescription
cmdstringalways 'cq' for this type of message
filterobject (optional)filters the messages by parameters
pagenumber (optional)requested page, one-based, default 1


Response message (server to client)



Message format Typescript interface notation

	{
    cmd      : 'cq';	   // identifies type of message, cq = cache query
    filter?  : {           // repeats query filter
        from?   : number;
        to?     : number;
        EUI?    : string;
    },
    page     : number;     // repeats query page
    perPage  : number;     // repeats query perPage
    total    : number;     // total number of matching results in cache
                           // use for paging through history
    cache    : array;      // array of cached messages, ordered by descending timestamp
                           // format corresponds to your selected Data Format / verbosity
                           // if gateway information output is enabled,
                           // only 'gw' messages will be returned
}
                


Example Message

{
  "cmd"  : "cq",
  "filter" : {
    "from" : 1470850675433,
    "EUI"  : "0102030405060708",
  },
  "page":1,
  "perPage":100,
  "total":1,
  "cache":[
      {
          "cmd"  : "rx",
          "EUI"  : "0102030405060708",
          "ts"   : 1470850675433,
          "ack"  : false,
          "fcnt" : 1,
          "port" : 1,
          "data" : "0102AABB"
      }
  ]
}
          


ParameterTypeDescription
cmdstringalways 'cq' for this type of message
filterobject (optional)filters the messages by parameters
pagenumberrequested page, one-based, default 1
perPagenumberresults to return per page, default 100
totalnumbertotal number of matching results in cache, use for paging through history
cachearrayarray of cached messages, ordered by descending timestamp. Format corresponds to the format / verbosity selected for the application. If gateway information output is enabled, only 'gw' messages will be returned.
  • No labels