DataTypes - ptidejteam/tools4cities-metamenth GitHub Wiki
The DataTypes package has classes that model custom data objects used by various MetamEnTh classes.
Classes and Their Relationships
AbstractDynamicEntity
This is a generic parent class for all MetamEnTh classes that have transducers, e.g., sensors
Parent Class
None
Relationships
AbstractDynamicEntityhas a one-to-many relationship withAbstractTransducer.
Attributes
transducers:List[AbstractTransducer], transducers (sensors and actuators) that classes that inherit fromAbstractDynamicEntitypossess
Behaviours (Methods)
add_transducer(new_transducer: AbstractTransducer): adds a transducer to children classes ofAbstractDynamicEntityremove_transducer(new_transducer: AbstractTransducer): removes a transducer from children classes ofAbstractDynamicEntityget_transducer_by_name(name) -> AbstractTransducer: searches for a transducer by nameget_transducer_by_uid(name) -> AbstractTransducer: searches for a transducer by its unique identifierget_transducers(search_terms: Dict) -> ['AbstractTransducer']: searches for transducers based on attributes and their values
AbstractMeasure
This is a generic parent class for all measurement-related classes in MetamEnTh
Parent Class
None
Relationships
None
Attributes
measurement_unit:MeasurementUnit, the unit of measurement, e.g., DEGREE_CELSIUSmeasure_type:DataMeasurementType, the type of measurement, e.g., OUTSIDE_TEMPERATURE
Behaviours (Methods)
None
AbstractRangeMeasure
This is a generic parent class for all measurements with more than one data point, e.g., min and max values
Parent Class
Relationships
None
Attributes
minimum:float, the minimum value of the measurementmaximum:float, the maximum value of the measurement
Behaviours (Methods)
None
Address
This class models the address of a building
Parent Class
None
Relationships
None
Attributes
city:string, the name of the citystreet:string, the street name of the address e.g., 6911 Ave De la Pepinierestate:stringthe state (or province) e.g., QC or Quebeczip_code:string, the zip code e.g., H1N 1B9country:string, the country where the building is locatedwhat3word:string, the What3word address of the locationgeocoordinate:Pointthe geographical coordinates of the locationnorth_orientation:BinaryMeasure (optiona), the north orientation of a building
Behaviours (Methods)
None
BinaryMeasure
This class models measurements with one data point
Parent Class
Relationships
None
Attributes
value:float, the value of the data point
Behaviours (Methods)
None
ContinuousMeasure
ContinuousMeasure models measures with two data points, e.g., minimum and maximum
Parent Class
Relationships
None
Attributes
- None, inherits all attributes from
AbstractRangeMeasure
Behaviours (Methods)
None
ExponentialMeasure
ExponentialMeasure models measures with mantissa and an exponent in addition to minimum and maximum values
Parent Class
Relationships
None
Attributes
exponent: float, the exponent value of the measurement
mantissa: float, the mantissa value of the measurement
Behaviours (Methods)
None
LinearMeasure
LinearMeasure models measures with minimum, maximum, and slope values
Parent Class
Relationships
None
Attributes
slope: float, the slope value of the measurement
Behaviours (Methods)
None
Measure
Measure models the various measurement data points, e.g., minimum, maximum, slope, mantissa, exponent, and the measurement unit
Parent Class
None
Relationships
None
Attributes
exponent:float (default is 0.0), the exponent value of the measurementmantissa:float (default is 0.0), the mantissa value of the measurementslope:float (default is 0.0), the slope value of the measurementminimum:float (default is 0.0), the minimum value of the measurementmaximum:float (default is 0.0), the maximum value of the measurementunit:Measurement Unit, the measurement unit
Behaviours (Methods)
None
Point
Point models geographical coordinates with latitude and longitude values
Parent Class
None
Relationships
None
Attributes
latitude:float, the latitude value of the geographical coordinatelongitude:float, the longitude value of the geographical coordinate
Behaviours (Methods)
None
RatedDeviceMeasure
Point models the rated device measure of entities in a building
Parent Class
None
Relationships
None
Attributes
voltage_rating:AbstractMeasure, the voltage rating of an entitycurrent_rating:AbstractMeasure, the current rating of an entityfrequency:AbstractMeasure (default is None), the frequency of the rated device measure of an entitypower_factor:float (default is 0.0), the power factor of the rated device measure of an entityphase:float (default is 0.0), the phase of the rated device measure of an entityvoltage_output:AbstractMeasure (default is None), the voltage output of an entitycurrent_output:AbstractMeasure (default is None), the current output of an entitypower_output:AbstractMeasure (default is None), the power output of an entitywave_form:WaveForm, the wave form of the rated device measure of an entity, e.g., SINUSOIDALefficiency:AbstractMeasure (default is None), the efficiency value of the rated device measure of an entity
Behaviours (Methods)
None