|
|
| Строка 20: |
Строка 20: |
|
| |
|
| Для объектов и групп: | | Для объектов и групп: |
| return QJsonObject({
| | [[File:Object_get_last_result.png]] |
| { "objectOptions", QJsonDocument::fromJson(
| |
| __query->value(__query->record().indexOf("objectOptions")).toByteArray()
| |
| ).object() },
| |
| { "resultJSON", QJsonDocument::fromJson(
| |
| __query->value(__query->record().indexOf("resultJSON")).toByteArray()
| |
| ).object() },
| |
| { "tag", __query->value(__query->record().indexOf("tag")).toString() },
| |
| { "resultId", __query->value(__query->record().indexOf("resultId")).toInt() },
| |
| { "objectUUID", __query->value(__query->record().indexOf("objectUUID")).toString() },
| |
| { "calcDate", __query->value(__query->record().indexOf("calcDate")).toString() }
| |
| });
| |
|
| |
|
| Для точек: | | Для точек: |
| return QJsonObject({
| | [[File:Point_get_last_result.png]] |
| { "recordOptions", QJsonDocument::fromJson(
| |
| __query->value(__query->record().indexOf("recordOptions")).toByteArray()
| |
| ).object() },
| |
| { "pointOptions", QJsonDocument::fromJson(
| |
| __query->value(__query->record().indexOf("pointOptions")).toByteArray()
| |
| ).object() },
| |
| { "objectOptions", QJsonDocument::fromJson(
| |
| __query->value(__query->record().indexOf("objectOptions")).toByteArray()
| |
| ).object() },
| |
| { "resultJSON", QJsonDocument::fromJson(
| |
| __query->value(__query->record().indexOf("resultJSON")).toByteArray()
| |
| ).object() },
| |
| { "debugJSON", QJsonDocument::fromJson(
| |
| __query->value(__query->record().indexOf("debugJSON")).toByteArray()
| |
| ).object() },
| |
| { "tag", __query->value(__query->record().indexOf("tag")).toString() },
| |
| { "objectUUID", __query->value(__query->record().indexOf("objectUUID")).toString() },
| |
| { "recordUUID", __query->value(__query->record().indexOf("recordUUID")).toString() },
| |
| { "pointUUID", __query->value(__query->record().indexOf("pointUUID")).toString() },
| |
| { "recordDate", __query->value(__query->record().indexOf("recordDate")).toString() },
| |
| { "calcDate", __query->value(__query->record().indexOf("calcDate")).toString() }
| |
| });
| |
Для контейнеров и объектов:
{} gtld.node.lastResult;
Для точек:
[{}] gtld.node.lastResult;
Назначение:
В зависимости от типа объекта данное свойство содержит последний результат работы, либо мастер-скрипта, либо диагностического скрипта.
Данные содержатся в виде JSON-объекта. Содержимое данного свойства обновляется при каждом запуске процедуры диагностики.
Параметры:
Не предусмотрены.
Пример вызова:
let __lastResult = gtld.node.lastResult;
Результат:
- Для узлов дерева с типом "объект" и "группа" данное свойство возвращает последний результат работы мастер-скрипта.
- Для узлов дерева типа "точка" данное свойство возвращает последний результат работы диагностического скрипта.
Для объектов и групп:
Для точек: