DbSensorComponent

class mss_dataserver.geometry.db_inventory.DbSensorComponent(orm=None, **kwargs)[source]

Bases: mss_dataserver.geometry.inventory.SensorComponent

The database sensor component.

Parameters

orm (mss_data_server.geometry.databaseFactory.GeomSensorComponent) – The sqlalchemy table mapper class.

Keyword Arguments

**kwargs – The keyword arguments passed to the __init__ method of the parent class mss_dataserver.geoemetry.inventory.SensorComponent.

Properties

assigned_streams

:obj:list of RecorderStream: The recorder streams to which the component is assigned to.

id

int: The database id.

model

str: The parent sensor model.

parent_inventory

Inventory: The inventory holding the sensor component.

producer

str: The parent sensor producer.

serial

str: The parent sensor serial.

Methods

__init__([orm])

Initialize the instance.

add_parameter(cur_parameter)

Add a parameter to the sensor

change_parameter_end_time(position, end_time)

Change a parameter end time.

change_parameter_start_time(position, start_time)

Change a parameter start time.

from_inventory_instance(parent_sensor, instance)

Create a DbSensorComponent instance from a mss_data_server.geometry.inventory.SensorComponent instance.

from_sqlalchemy_orm(parent_sensor, orm)

Create a DbSensorComponent instance from a mss_data_server.geometry.databaseFactory.GeomSensorComponent table mapper class.

get_parameter([start_time, end_time])

Get sensor component parameters.

merge(merge_component)

Merge two components.

remove_parameter(parameter_to_remove)

Remove a parameter from the component.

Inheritence diagram

Inheritance diagram of mss_dataserver.geometry.db_inventory.DbSensorComponent