Esempio n. 1
0
def get_data_sensors():
    sensors = EquipmentModel.find_by(type="Sensor",
                                     order_by=EquipmentModel.name,
                                     get_first=False)
    return response.model_to_response(sensors)
Esempio n. 2
0
 def test_equipment_model(self):
     equipment: EquipmentModel = EquipmentModel.find_by(name="DATACUBE")
     self.assertIsNotNone(equipment)
     print(equipment.to_dict())
Esempio n. 3
0
def get_data_loggers():
    dataloggers = EquipmentModel.find_by(type="Datalogger",
                                         order_by=EquipmentModel.manufactory,
                                         get_first=False)
    return response.model_to_response(dataloggers)