- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
private fun GetDeviceInfo(request: HttpServerRequest): HashMap<String, Info>
{
val deviceInfo = request.getParam(NAME_ID)?.let { id ->
(Ports.ById(id) ?: Ports.ByDeviceId(id))?.let(DeviceInfo.Companion::Create)
?: Files.FromPath(id)?.let { file ->
FileInfo.GetInfo(file)
} ?: (Core.GetTask(id) as? Scenario)?.SourceFile?.let(::FileInfo)
}
return deviceInfo?.let { hashMapOf(REQUEST_RESULT to it) } ?: hashMapOf()
}