redvypr.data_packets

Functions

add_keyinfo2datapacket(datapacket, datakey)

param datapacket:

addr_in_data(devicestring, datapacket[, ...])

Checks if the redvypr addr is in the datapacket.

check_for_command([datapacket, uuid, ...])

param datapacket:

commandpacket([command, device_uuid, ...])

param command:

'stop'

compare_datastreams(datastream1, datastream2)

Checks if the two datastreams match

create_addrstr([datakey, devicename, ...])

Creates an address string from given ingredients :param datakey: :param devicename: :param hostname: :param addr: :param uuid: :param local_hostinfo:

create_data_statistic_dict()

datapacket([data, datakey, tu, device, hostinfo])

A datapacket dictionary used as internal datastructure in redvypr

do_data_statistics(data, statdict)

Fills in the statistics dictionary with the data packet information :param data: :param statdict:

expand_address_string(addrstr)

Expands an address string, i.e. it fills non existing entries with wildcards.

get_address_from_data(datakey[, data, ...])

Returns an address string based either on a data packet or on hostname

get_data(datastream, datapacket)

Returns the data from the datapacket associated with the datastream

get_datastream_from_data(data, datakey[, uuid])

Returns a redvypr datastream string including the hostname, ip with the optional uuid.

get_datastreams_from_data(data[, uuid, add_dict])

Returns all datastreams of the datapacket

get_deviceaddress_from_redvypr_meta(_redvypr)

get_devicename_from_data(data[, uuid])

Returns a redvypr devicename string including the hostname, ip with the optional uuid.

get_keys_from_data(data)

Returns the keys of a redvypr data packet without the potentially existing standard keys: -'_redvypr' -'_redvypr_command' -'_deviceinfo' -'_keyinfo'

modify_addrstr(addrstr[, datakey, ...])

Modifies address string with optionally given arguments. Note that missing parts are replaced by wildcards: modify_addrstr('test') becomes /test:*@::*.

parse_addrstr(address_string[, local_hostinfo])

Parses as redvypr address string and returns a dictionary with the parsed result

rem_device_from_statistics(deviceaddress, ...)

Remove a deviceaddress from the statistic :param deviceaddress: :param statdict:

treat_datadict(data, devicename, hostinfo, ...)

Treats a datadict received from a device and adds additional information from redvypr as hostinfo, numpackets etc.

Classes

redvypr_address([addrstr, datapacket, ...])

redvypr address