represents a single value in a senml pack object
__enter__(self)
for supporting the 'with' statement
returns: self
__exit__(self, exc_type, exc_val, exc_tb)
when destroyed in a 'with' statement, make certain that the item is removed from the parent list.
returns: None
__init__(self, name, **kwargs)
create a new senml record
parameters:
kwargs:
optional parameters:- value: the value to store in the record
- time: the timestamp to use (when was the value measured)
- name: the name of hte record
- unit: unit value
- sum: sum value
- update_time: max time before sensor will provide an updated reading
- callback: a callback function taht will be called when actuator data has been found. Expects no params
do_actuate(self, raw, naming_map)
called when a raw senml record was found for this object. Stores the data and if there is a callback, calls it.
parameters:
raw:
raw senml object
returns: None
get the time at which the measurement for the record was taken.
returns: a unix time stamp. This is the absolute value, not adjusted to the base time of the pack.
get the time at which the next measurement is expected to be taken for this record.
returns: a unix time stamp. This is the absolute value, not adjusted to the base time of the pack.
get the value currently assigned to the object