Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section


Column
width35%


Panel
borderColor#CCCCCC
bgColor#FFFFFF
titleBGColor#F0F0F0
borderStylesolid
titleOn this page:
Table of Contents



Column



Tip

Manage macros using gRPC API methods메서드를 사용하여 매크로 관리

매크로 구성은 Macros configuration is described in the LogicService.proto file파일에 설명되어 있습니다.

Each macro consists of각 매크로는 다음으로 구성됩니다:

  • guid − an id;
  • namea name;이름
  • modeoperation mode;작동 모드
  • conditionslaunch conditions;실행 조건
  • rulesrules.

Operation modes

  • 규칙

작동 모드

 mode는 일반 정보를 포함합니다 mode contains the general information:

  • enabled or 또는 disabled − whether the macro is enabled or disabled;매크로가 활성화되었는지 비활성화되었는지 여부
  • user_role − a role for which the macro will be available in the layout menu;  매크로가 레이아웃 메뉴에서 사용할 수 있는 역할
  • is_add_to_menu − add macros to the layout menu; 매크로를 레이아웃 메뉴에 추가 여부
  • time_zone − time zone id, if the macro should be launched on time 매크로가 시간에 따라 실행되어야 하는 경우의 시간대 ID

    Code Block
    "time_zone": {
                        "timezone_id": "6fb68cf4-ca6a-46a1-b2e3-ab4cfdaa0444"
                    }

     

  • 자동 규칙autorule

    Info
    titleNote

    Contains the general information for launching the automatic rules:자동 규칙 실행을 위한 일반 정보를 포함합니다.

    • zone_ap − a camera under which the rule is created; 규칙이 생성된 카메라
    • only_if_armed − operate only in armed mode; 무장 모드에서만 작동
    • timezone_id −  id of the time zone.시간대의 ID
    Code Block
    "autorule": {
                        "zone_ap": "hosts/Server1/DeviceIpint.30/SourceEndpoint.video:0:0",
                        "only_if_armed": false,
                        "timezone_id": "00000000-0000-0000-0000-000000000000"
                    }



  • 지속적인 매크로continuous

    Info
    titleNote

    Contains the general information for launching the continuous macros:지속적인 매크로 실행을 위한 일반적인 정보는 다음과 같습니다.

    • server − a Server; 서버
    • timezone_id − id of the time zone; 시간대 ID
    • heartbeat_ms − launch cycle in millisecond; 실행 주기 (밀리초 단위)
    • random − random launch of a macro. 매크로의 랜덤 실행
    Code Block
     "continuous": {
                        "server": "Server1",
                        "timezone_id": "00000000-0000-0000-0000-000000000000",
                        "heartbeat_ms": 3600000,
                        "random": true
                    }

Launch conditions



실행 조건

다음 옵션을 사용할 수 있습니다(이벤트 기반 매크로에 대한 필터 설정, 통계 데이터 기반 매크로 트리거 참조)The following are available (see Configuring filters for event-driven macros, Triggering macros by statistical data):

  • detector

    Code Block
    "detector": {
                            "event_type": "sitDown",
                            "source_ap": "hosts/Server1/HumanBoneDetector.1/EventSupplier",
                            "state": "BEGAN",
                            "details": []
                        }


  • timezone

    Code Block
                  "timezone": {
                            "timezone_id": "6fb68cf4-ca6a-46a1-b2e3-ab4cfdaa0444",
                            "boundary_case": "TB_BEGINING"
                        }


  • alert

    Code Block
    "alert": {
        "zone_ap": "hosts/Server1/DeviceIpint.10/SourceEndpoint.video:0:0",
        "alert_case": "AC_ALERT_DANGEROUS"
    }


  • device

    Code Block
    "device": {
        "device": "hosts/Server1/DeviceIpint.69",
        "state": "IPDS_CONNECTED",
        "threshold": 0
    }


  • archive_write

    Code Block
    "archive_write": {
        "camera": "hosts/Server1/DeviceIpint.28/SourceEndpoint.video:0:0",
        "state": "ON"
    }


  • relay

    Code Block
    "relay": {
        "relay": "hosts/Server1/DeviceIpint.10/StateControl.relay0:0",
        "state": "ON"
    }


  • volume_health

    Code Block
    "volume_health": {
        "storage": "hosts/Server1/MultimediaStorage.AliceBlue/MultimediaStorage",
        "volume": "",
        "health": "VH_CORRUPTED"
    }


  • server_state

    Info
    titleNote

    observer a server from which the macro is launched;subject a server from which the state should be received. 매크로가 실행되는 서버

    subject 상태를 받아야 하는 서버

    Code Block
    "server_state": {
        "observer": "Server1",
        "subject": "Server2",
        "state": "SS_OFFLINE"
    }


     

  • text

    Info
    titleNote

    The Event Source object should be created (see 이벤트 소스 객체가 생성되어야 합니다 (Event source object 참조).

    Code Block
    "text": {
        "source": "hosts/Server1/DeviceIpint.110/SourceEndpoint.textEvent:0",
        "text": "Cash"
    }



  • arm

    Info
    titleNote

    Arming the camera.카메라 활성화

    Code Block
    "arm": {
        "zone": "hosts/Server1/DeviceIpint.10/SourceEndpoint.video:0:0",
        "state": "CS_ArmPrivate"
    }


     

  • recognition

    Code Block
    "recognition": {
        "camera": "hosts/Server1/DeviceIpint.1/SourceEndpoint.video:0:0",
        "list": "797703ea-6917-4341-888b-b6f0579f5d91",
        "type": "DT_Plate",
        "objects": [
            "53502573-a985-4198-a5b6-69db476cc755"
        ]
    }


  • statistics

    Code Block
    "statistics": {
        "point": "archive_usage",
        "item": "hosts/Server1/MultimediaStorage.AntiqueWhite/MultimediaStorage",
        "value": 100,
        "delta": 0,
        "trend": "ET_RISING"
    }

Actions


작업

규칙에는 매크로에서 실행되어야 하는 작업이 포함됩니다 (작업에 대한 특정 설정 참조rules contains the actions that should be run in the macro (see Settings specific to actions). 

  • action

    Code Block
    "action": {
        "timeout_ms": 0,
        "cancel_conditions": {},
        "action": {
            "goto_ptz": {
                "telemetry": "hosts/Server1/DeviceIpint.71/TelemetryControl.0",
                "preset_number": 1,
                "speed": 1
            }
        }
    }


  • wait

    Code Block
    "wait": {
        "timeout_ms": 30000,
        "cancel_conditions": {
            "0": {
                "path": "/E:0/C:0",
                "server_state": {
                    "observer": "Server1",
                    "subject": "Server2",
                    "state": "SS_ONLINE"
                }
            }
        },


  • timeout

    Code Block
    "timeout": {
        "timeout_ms": 5000
    }


  • check

    Code Block
    "check": {
        "check": {
            "camera": "hosts/Server1/DeviceIpint.1/SourceEndpoint.video:0:0",
            "archive": "hosts/Server1/MultimediaStorage.AntiqueWhite/MultimediaStorage",
            "depth_ms": 60000,
            "type": "CT_CHECK_RECORD_SAFETY"
        },
        "success_rules": {},
        "failure_rules": {}
    }