Class Index | File Index

Classes


Class Event

The object returned by Subscription.get(). It contains all data received with the event.
Defined in: Event.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Event()
Field Summary
Field Attributes Field Name and Description
<constant>  
An counter of events received since the Subscription has been created.
<constant>  
Array with the data received.
<constant>  
The format string corresponding to this event.
<constant>  
The name of the Subscription this event belongs to.
<constant>  
obj
Object with the data received.
<constant>  
qos
The Quality-of-Service transmitted by this event.
<constant>  
The size in bytes of the event received
<constant>  
The time transmitted with this event, if transmitted.
Class Detail
Event()
Field Detail
<constant> {Integer} counter
An counter of events received since the Subscription has been created. The first event received is 1. 0 corresponds to no event received yet.

<constant> {Array} data
Array with the data received. The contents of the array are sorted in the order of the event format string. The contents of the array can be all kind of objects defined by the format string. If a format described several entries (e.g. I:5) and array will be added.

In the special case that the format string contains only a single format, e.g. "I", "F:5" or "C", data will not be an array, but contain the object data (or the array) directly. If valid data was received, but the size was zero, then null is returned as data

  • data===undefined: no data received (no connection)
  • data===null: an event was received, but it was empty
  • data.length>0: an event was received and it contains data

  • <constant> {String} format
    The format string corresponding to this event.
    See:
    DIM for more details

    <constant> {String} name
    The name of the Subscription this event belongs to.

    <constant> {Object} obj
    Object with the data received. The object contains essentially the same information than the data memeber, but the received data are added as properties instead of enumerable lements. This allows to access the received data by names as specified by the SERVICE_DESC service.

    If an empty event was received, but names are available, the object will be empty. Otherwise 'obj' will be undefined.

  • obj===undefined: no names are available
  • obj!==undefined, length==0: names are available, but no data (no connection)
  • obj!==undefined, length>0: names are available, data has been received

    Note that to get the number of properties (length) you have to call Object.keys(obj).length;


  • <constant> {Integer} qos
    The Quality-of-Service transmitted by this event.

    <constant> {Integer} size
    The size in bytes of the event received

    <constant> {Date} time
    The time transmitted with this event, if transmitted. If nonw was transmitted, this might just be the time the event was received.

    Documentation generated by JsDoc Toolkit 2.4.0 on Sun Sep 18 2016 20:50:08 GMT+0100 (WEST)