愛招飛幫助手冊 愛招飛幫助手冊
  • FastERP-1
  • Smart
  • PinToo
  • FastWeb
  • FastERP-2 企業管理系統 (opens new window)
  • 印染業ERP (opens new window)
  • 工廠終端機 (opens new window)
  • TARS
  • MARS
  • TaskRunner
  • Flying
  • FastDesk
  • HiDesk
  • HiNAT
  • FastBPM
  • 設備故障診斷 (opens new window)
  • 設備最佳運轉效益 (opens new window)
  • 企業智能助手SmeGPT (opens new window)
  • 燈號管理 (opens new window)
  • 戰情室 (opens new window)
  • 能源管理 (opens new window)
  • 人車定位 (opens new window)
  • 戰情指揮系統 (opens new window)
  • FastERP-1
  • FastWeb
  • Smart
  • PinToo
  • Flying
  • TARS
  • 通用功能

    • Report
    • Script
    • Echarts
    • Chart
    • DB Install
  • FastERP-1
  • Smart
  • PinToo
  • FastWeb
  • FastERP-2 企業管理系統 (opens new window)
  • 印染業ERP (opens new window)
  • 工廠終端機 (opens new window)
  • TARS
  • MARS
  • TaskRunner
  • Flying
  • FastDesk
  • HiDesk
  • HiNAT
  • FastBPM
  • 設備故障診斷 (opens new window)
  • 設備最佳運轉效益 (opens new window)
  • 企業智能助手SmeGPT (opens new window)
  • 燈號管理 (opens new window)
  • 戰情室 (opens new window)
  • 能源管理 (opens new window)
  • 人車定位 (opens new window)
  • 戰情指揮系統 (opens new window)
  • FastERP-1
  • FastWeb
  • Smart
  • PinToo
  • Flying
  • TARS
  • 通用功能

    • Report
    • Script
    • Echarts
    • Chart
    • DB Install
  • FastWeb幫助主頁
  • 學習手冊

    • 基本入門

    • 功能介紹

    • 控制元件說明

    • 系統工具

    • 系統管理

    • 云服務工具

    • 資料庫工具

    • 專用模板

    • 外部功能

    • 開發流程

      • 開發案例
      • 紡織印染業ERP設計實務
      • 頁面佈局
      • URLFrame與JS的互動
      • 自定控制元件擴充套件

      • RestAPI擴充套件

        • 視訊監控-登錄
        • 視訊監控-獲取監視器
          • 1. 分析
          • 2. 用法
        • 視訊監控-開啟監控
        • 視訊監控-停止監控
        • 遠端桌面-登錄
        • 遠端桌面-登出
        • FastWeb-Webhook
      • IsoBean開發

    • 函式程式

  • 開發手冊

目录

視訊監控-獲取監視器

# FastWeb 視訊監控-獲取監視器

  如果尚未了解視訊監控的資訊,請參閱shinobi說明。以下是Shinobi獲取監視器列表的API引入說明。

  • 獲取所有儲存的監視器資訊。返回的結果為JSON集合。
http://xxx.xxx.xxx.xxx/[API KEY]/monitor/[GROUP KEY]
1

# 1. 分析

  在上述API中,API KEY是通過Shinobi登錄的API獲取到的,GROUP KEY是設定的分組的ID資訊,在控制檯界面可以檢視。

  上述API資訊可通過以下方式進行設定。如尚未呼叫過Shinobi登錄的API,則此處將無法使用,請參考視訊監控-登錄設定登錄獲取API KEY的相關資訊。

  點選[系統工具]-[介面整合(API)],打開介面整合(API)界面,在其中設定shinobi的RestAPI請求資訊。

  點選[新增]按鈕,打開新增API界面,在其中輸入API的資訊。API名稱與API描述部分可自行設定。

  選擇API供應商為Shinobi,請求方法為GET,URL處改寫[API KEY]/monitor/[GROUP KEY]為%s/monitor/%s,點選[儲存]按鈕。

# 2. 用法

  在視訊監控-登錄的基礎上,再增加一個TUgRestApi與TUgButton控制元件,分別命名為restMonitor與btnMonitor,雙擊restMonitor,打開管理頁面,選擇視訊監控-獲取監視器,點選[OK]按鈕匯入此API,設定btnMonitor的OnClick事件與restMonitor的ResultData事件。以下給出示例用來提取獲取到的監視器資訊。詳情可參考RestAPI綜合運用2。

procedure btnMonitorOnClick(sender: tobject);
//獲取監視器
begin
  restMonitor.URL := Format(restMonitor.Url,[shinobiAuthToken,shinobiGroupKey]);
  restMonitor.Send;
end;

procedure restMonitorResultData(sender: tobject;aresult: string);
//獲取結果
var
  vJSON: TJSONObject;
  vValueList: TJSONArray;
  vCount: Integer;
  i: Integer;
begin
  vJSON := TJSONObject.Create;
  vValueList := TJSONArray.Create;
  Try
    vJSON := TJSONObject(vJSON.ParseJSONValue(aresult,False,False));
    vValueList := TJSONArray(vJSON.ParseJSONValue(aresult,False,False));
    vCount := vValueList.Size;
    if vCount = 0 then exit;
    for i := 0 to (vCount - 1) Do
    begin 
      shinobiMonitorID := UGCM.GetJSONString(vJSON,'['+ IntToStr(i) + '].mid'); //獲取JSON序列
      shinobiMonitorList.Items.Add(shinobiMonitorID);
      mmLog.Lines.Add('monitorid:'+ shinobiMonitorID);
    End;
      shinobiMonitorList.ItemIndex := 0;
  Finally
    vJSON.Free;
    vValueList.Free;
  End;  
end;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
視訊監控-登錄
視訊監控-開啟監控

← 視訊監控-登錄 視訊監控-開啟監控→

Copyright © 2021-2025 愛招飛IsoFace | ALL Rights Reserved
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式