|
@@ -1,6 +1,7 @@
|
|
|
from fastapi import APIRouter, BackgroundTasks, Depends, Query
|
|
|
from sqlalchemy.orm import Session
|
|
|
|
|
|
+import app.models.domain.devices as domain_devices
|
|
|
from app.api.dependencies.db import get_db
|
|
|
from app.controllers.equipment.ahu.supply_air_temperature_set import get_next_supply_air_temperature_set
|
|
|
from app.controllers.equipment.ahu.thermal_mode import get_thermal_mode
|
|
@@ -10,7 +11,7 @@ from app.controllers.equipment.pau.freq_set import get_next_acatfu_freq_set
|
|
|
from app.controllers.equipment.pau.supply_air_temperature_set import get_next_acatfu_supply_air_temperature_set
|
|
|
from app.controllers.equipment.pau.switch import get_switch_action
|
|
|
from app.controllers.equipment.vrf.basic import get_vrf_instructions
|
|
|
-from app.models.domain.devices import DevicesInstructionsBaseResponse, DevicesEarlyStartTime, ACATVIInstructionsRequest
|
|
|
+from app.models.domain.devices import DevicesInstructionsBaseResponse, DevicesEarlyStartTime
|
|
|
|
|
|
router = APIRouter()
|
|
|
|
|
@@ -105,17 +106,6 @@ async def get_acatfu_freq_set(
|
|
|
}
|
|
|
|
|
|
|
|
|
-@router.post('/instructions/acatvi', response_model=DevicesInstructionsBaseResponse)
|
|
|
-async def get_acatvi_instructions(device_info: ACATVIInstructionsRequest):
|
|
|
- output = await get_vrf_instructions(device_info.equipId, device_info.spaceTempTarget, device_info.spaceRealTimeTemp)
|
|
|
-
|
|
|
- return {
|
|
|
- 'projectId': device_info.projectId,
|
|
|
- 'equipId': device_info.equipId,
|
|
|
- 'output': output
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
@router.get('/early-start/prediction/acatfc', response_model=DevicesEarlyStartTime)
|
|
|
async def get_acatfc_early_start_time(
|
|
|
project_id: str = Query(..., max_length=50, regex='^Pj', alias='projectId'),
|
|
@@ -128,3 +118,25 @@ async def get_acatfc_early_start_time(
|
|
|
'spaceId': space_id,
|
|
|
'minutes': minutes
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+@router.post('/instructions/acatvi', response_model=domain_devices.ACATVIInstructionsTemporaryResponse)
|
|
|
+async def get_acatvi_instructions(device_info: domain_devices.ACATVIInstructionsRequest):
|
|
|
+ output = await get_vrf_instructions(
|
|
|
+ device_info.space_temp_target,
|
|
|
+ device_info.return_air_temp,
|
|
|
+ device_info.space_realtime_temp
|
|
|
+ )
|
|
|
+ resp = {'output': output}
|
|
|
+
|
|
|
+ return resp
|
|
|
+
|
|
|
+
|
|
|
+@router.post('/instructions/acatfc', response_model=domain_devices.ACATFCInstructionsResponse)
|
|
|
+async def get_acatfc_instructions(params: domain_devices.ACATFCInstructionsRequest):
|
|
|
+ pass
|
|
|
+
|
|
|
+
|
|
|
+@router.post('/instructions/acatva', response_model=domain_devices.ACATVAInstructionsResponse)
|
|
|
+async def get_acatva_instructions(params: domain_devices.ACATVAInstructionsRequest):
|
|
|
+ pass
|