USM02 Measurements CRUD
Description
Create the abstract class Measurement and it's 3 non-abstract child classes: MonthlyMeasurements, MinutelyMeasurements and QuarterlyMeasurement. each representing the measurements that are to be collected from the slave server.
Tasks
-
Create the abstract class Measurement as represented at Architecture Diagram. - collection_date: datetime
- transductor: Transductor
-
Create the non-abstract class MonthlyMeasurements as represented at Architecture Diagram. - frequency_a: float
- voltage_a : float
- voltage_b: float
- voltage_c: float
- current_a: float
- current_b: float
- current_c: float
- active_power_a: float
- active_power_b: float
- active_power_c: float
- total_active_power: float
- reactive_power_a: float
- reactive_power_b: float
- reactive_power_c: float
- total_reactive_power_a: float
- apparent_power_a: float
- apparent_power_b: float
- apparent_power_c: float
- total_apparent_power: float
- power_factor_a: float
- power_factor_b: float
- power_factor_c: float
- total_power_factor: float
- dht_voltage_a: float
- dht_voltage_b: float
- dht_voltage_c: float
- dht_current_a: float
- dht_current_b: float
- dht_current_c: float
-
Create the non-abstract class QuarterlyMeasurement as represented at Architecture Diagram. - generated_energy_peak_time: float
- generated_energy_off_peak_time: float
- consumption_peak_time: float
- consumption_off_peak_time: float
- inductive_power_peak_time: float
- inductive_power_off_peak_time: float
- capacitive_power_peak_time: float
- capacitive_power_off_peak_time: float
-
Create the non-abstract class MinutelyMeasurements as represented at Architecture Diagram. - generated_energy_peak_time: float
- generated_energy_off_peak_time: float
- consumption_peak_time: float
- consumption_off_peak_time: float
- inductive_power_peak_time: float
- inductive_power_off_peak_time: float
- capacitive_power_peak_time: float
- capacitive_power_off_peak_time: float
- active_max_power_peak_time: float
- active_max_power_off_peak_time: float
- reactive_max_power_peak_time: float
- reactive_max_power_off_peak_time: float
Acceptance Criteria
-
Code have to be tested. -
Code according with codestyle tests. -
The MonthlyMeasurement create method must create a slave in master server database. -
It should not exist a MonthlyMeasurement Create endpoint in the master server. -
The MonthlyMeasurement measurement read method must show all or one slave created in master database. -
The MonthlyMeasurement Read endpoint must show all measurement in the master server db. -
The MonthlyMeasurement update method must update a slave created in master database. -
It should not exist a MonthlyMeasurement Update endpoint in the master server. -
The MonthlyMeasurement delete method must delete a slave created in master database. -
It should not exist a MonthlyMeasurement Delete endpoint in the master server. -
The QuarterlyMeasurement create method must create a slave in master server database. -
It should not exist a QuarterlyMeasurement Create endpoint in the master server. -
The QuarterlyMeasurement measurement read method must show all or one slave created in master database. -
The QuarterlyMeasurement Read endpoint must show all measurement in the master server db. -
The QuarterlyMeasurement update method must update a slave created in master database. -
It should not exist a QuarterlyMeasurement Update endpoint in the master server. -
The QuarterlyMeasurement delete method must delete a slave created in master database. -
It should not exist a QuarterlyMeasurement Delete endpoint in the master server. -
The MinutelyMeasurement create method must create a slave in master server database. -
It should not exist a MinutelyMeasurement Create endpoint in the master server. -
The MinutelyMeasurement measurement read method must show all or one slave created in master database. -
The MinutelyMeasurement Read endpoint must show all measurement in the master server db. -
The MinutelyMeasurement update method must update a slave created in master database. -
It should not exist a MinutelyMeasurement Update endpoint in the master server. -
The MinutelyMeasurement delete method must delete a slave created in master database. -
It should not exist a MinutelyMeasurement Delete endpoint in the master server.
Edited by Arthur Assis