View on GitHub

senml-python-library

senml_record Module

senml_record.SenmlRecord Objects

represents a single value in a senml pack object

enter

__enter__(self)

for supporting the ‘with’ statement

returns: self

exit

__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

__init__(self, name, **kwargs)

create a new senml record

parameters:

do_actuate

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:

returns: None

sum

get/set the sum assigned to the record

time

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.

update_time

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.

value

get the value currently assigned to the object