⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 whohas.vts

📁 BacNet ScriptsExamples(英文的)。用于数据采集。
💻 VTS
📖 第 1 页 / 共 2 页
字号:
  ; Testing Support for Executing the BACnet Who-Has Service
  ; Version 2.0
  ;
  ;       written by Steven T. Bushby, 09/13/96
  ;               updated 10/31/96 DER bit added
  ;               updated 03/18/98 updated to match current draft test std
  ;
  ; 
  ;  In the REFERENCE sections "(B)" refers to the BACnet standard and
  ;  "(T)" refers to the testing addendum.
  ;
  ;--------------------------------------------------------------

SETUP BACnet Who-Has Service Execution

  ;--------------------------------------------------------------
  ;
  ; Setting up the hardware parameters for the VTS computer (TD).
  ;
  ;
  ; the network parameters for the TD
  ;
  NET_1 = 1, ETHERNET, 0
  --- The network which connects the VTS computer to the IUT.
  --- Adjust the parameters as needed to reflect the actual
  --- physical environment. The first value represents the 
  --- physical network number, the second value the physical 
  --- network type and the third value the physical port.

  MY_MAC = 00a0242daf41    -- MAC address of the TD
                           -- replace with you TD address

  ;--------------------------------------------------------------
  ;
  ; Setting up the network environment                                   
                                                                           
  NET_X = 5, ETHERNET      -- A virtual network to simulate 
                           -- requests from a remote network.
    
  ;--------------------------------------------------------------
  ;
  ; Setting up the hardware parameters for the IUT.
  ;
  ;
  IUT_MAC = 0040ae000f9c   -- MAC address of IUT
                           -- replace with your IUT address
                            
  DEVICE_ID = 254          -- Device object instance for IUT.

  LOW_LIMIT = 60     -- low limit of a device range that will include the IUT.

  HIGH_LIMIT = 300   -- high limit of a device range that will include the IUT.

  OUTSIDE_LOW = 10   -- low limit of a device range that won't include the IUT.

  OUTSIDE_HIGH = 50  -- high limit of a device range that won't include the IUT.

  OBJECT_NAME = ANSI X3.4, A'iut~dcu'  
-- The object that will be searched for: change to match PICS database.

  OBJECT_IDENTIFIER = Device,254
-- The object that will be searched for: change to match PICS database.
  

SECTION Testing the execution of the Who-Has service

  ;--------------------------------------------------------------
  ; Test group 1 verifies correct response to messages originating from
  ; the local network.

  TEST #1a
  -- Object ID version, no device range.

  DEPENDENCIES none

  REFERENCE (B)16.8.1,16.8.2,16.8.4; (T)9.29.1.1

  SEND (
    Network = NET_1
    Destination = BROADCAST
    DER = FALSE
    PDU = Unconfirmed-Request
    Service = Who-Has
    Object = 2, OBJECT_IDENTIFIER
    )

  -- The IUT should send a local broadcast I-Have or a global broadcast
  -- I-Have in response.

  EXPECT (                                  ;local broadcast response
    Network = NET_1
    Destination = BROADCAST
    DER = FALSE
    PDU = Unconfirmed-Request
    Service = I-Have
    Object = DEVICE, DEVICE_ID
    Object = OBJECT_IDENTIFIER
    CharString = OBJECT_NAME
     )

  OR (                                      ;global broadcast response
    Network = NET_1
    DNET = 0xffff
    Destination = BROADCAST
    DER = FALSE
    PDU = Unconfirmed-Request
    Service = I-Have
    Object = DEVICE, DEVICE_ID
    Object = OBJECT_IDENTIFIER
    CharString = OBJECT_NAME
    )

TEST #1b
  -- Object Name version, no device range.

  DEPENDENCIES none

  REFERENCE (B)16.8.1,16.8.2,16.8.4; (T)9.27.1.2

SEND (
    Network = NET_1
    Destination = BROADCAST
    DER = FALSE
    PDU = Unconfirmed-Request
    Service = Who-Has
    CharacterString = 3, OBJECT_NAME
    )

  --- The IUT should send a local broadcast I-Have or a global broadcast
  --- I-Have in response.

  EXPECT (                                  ;local broadcast response
    Network = NET_1
    Destination = BROADCAST
    DER = FALSE
    PDU = Unconfirmed-Request
    Service = I-Have
    Object = DEVICE, DEVICE_ID
    Object = OBJECT_IDENTIFIER
    CharString = OBJECT_NAME
     )

  OR (                                      ;global broadcast response
    Network = NET_1
    DNET = 0xffff
    Destination = BROADCAST
    DER = FALSE
    PDU = Unconfirmed-Request
    Service = I-Have
    Object = DEVICE, DEVICE_ID
    Object = OBJECT_IDENTIFIER
    CharString = OBJECT_NAME
    )

TEST #1c
  -- Object ID version, inside device range.

  DEPENDENCIES none

  REFERENCE (B)16.8.1,16.8.2,16.8.4; (T)9.27.1.3

  SEND (
    Network = NET_1
    Destination = BROADCAST
    DER = FALSE
    PDU = Unconfirmed-Request
    Service = Who-Has
    Unsigned = 0, LOW_LIMIT                 ;Device Range low limit
    Unsigned = 1, HIGH_LIMIT                ;Device Range high limit
    Object = 2, OBJECT_IDENTIFIER
    )

  --- The IUT should send a local broadcast I-Have or a global broadcast
  --- I-Have in response.

  EXPECT (                                  ;local broadcast response
    Network = NET_1
    Destination = BROADCAST
    DER = FALSE
    PDU = Unconfirmed-Request
    Service = I-Have
    Object = DEVICE, DEVICE_ID
    Object = OBJECT_IDENTIFIER
    CharString = OBJECT_NAME
     )

  OR (                                      ;global broadcast response
    Network = NET_1
    DNET = 0xffff
    Destination = BROADCAST
    DER = FALSE
    PDU = Unconfirmed-Request
    Service = I-Have
    Object = DEVICE, DEVICE_ID
    Object = OBJECT_IDENTIFIER
    CharString = OBJECT_NAME
    )

TEST #1d
  --- Object ID version, outside device range.

  DEPENDENCIES none

  REFERENCE (B)16.8.1,16.8.2,16.8.4; (T)9.27.1.4

  SEND (
    Network = NET_1
    Destination = BROADCAST
    DER = FALSE
    PDU = Unconfirmed-Request
    Service = Who-Has
    Unsigned = 0, OUTSIDE_LOW               ;Device Range low limit
    Unsigned = 1, OUTSIDE_HIGH              ;Device Range high limit
    Object = 2, OBJECT_IDENTIFIER
    )

  --- The IUT should not respond.

  EXPECT (                                  
    Network = NET_1
     )

TEST #1e
  --- Object Name version, inside device range.

  DEPENDENCIES none

  REFERENCE (B)16.8.1,16.8.2,16.8.4; (T)9.27.1.5

  SEND (
    Network = NET_1
    Destination = BROADCAST
    DER = FALSE
    PDU = Unconfirmed-Request
    Service = Who-Has
    Unsigned = 0, LOW_LIMIT                 ;Device Range low limit
    Unsigned = 1, HIGH_LIMIT                ;Device Range high limit
    CharacterString = 3, OBJECT_NAME
    )

  --- The IUT should send a local broadcast I-Have or a global broadcast
  --- I-Have in response.

  EXPECT (                                  ;local broadcast response
    Network = NET_1
    Destination = BROADCAST
    DER = FALSE
    PDU = Unconfirmed-Request
    Service = I-Have
    Object = DEVICE, DEVICE_ID
    Object = OBJECT_IDENTIFIER
    CharString = OBJECT_NAME
     )

  OR (                                      ;global broadcast response
    Network = NET_1
    DNET = 0xffff
    Destination = BROADCAST
    DER = FALSE
    PDU = Unconfirmed-Request
    Service = I-Have
    Object = DEVICE, DEVICE_ID
    Object = OBJECT_IDENTIFIER
    CharString = OBJECT_NAME
    )

TEST #1f
  --- Object Name version, outside device range.

  DEPENDENCIES none

  REFERENCE (B)16.8.1,16.8.2,16.8.4; (T)9.27.1.6

  SEND (
    Network = NET_1
    Destination = BROADCAST
    DER = FALSE
    PDU = Unconfirmed-Request
    Service = Who-Has
    Unsigned = 0, OUTSIDE_LOW               ;Device Range low limit
    Unsigned = 1, OUTSIDE_HIGH              ;Device Range high limit
    CharacterString = 3, OBJECT_NAME
    )

  --- The IUT should not respond.

  EXPECT (                               
    Network = NET_1
     )

TEST #1g
  --- Object ID version, device object instance =  device range.high limit

  DEPENDENCIES none

  REFERENCE (B)6.8.1,16.8.2,16.8.4; (T)9.27.1.7

  SEND (
    Network = NET_1
    Destination = BROADCAST
    DER = FALSE
    PDU = Unconfirmed-Request
    Service = Who-Has
    Unsigned = 0, LOW_LIMIT                 ;Device Range low limit

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -