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

📄 timesync.vts

📁 BacNet ScriptsExamples(英文的)。用于数据采集。
💻 VTS
字号:
  ; Testing Support for Executing the BACnet TimeSynchronization Service
  ; Version 2.0
  ;
  ;       written by Steven T. Bushby, 09/16/96
  ;               modified 10/31/96  added DER bit
  ;               modified 03/18/97   updated to match current draft test std
  ;		  modified 04/22/99  changed TUES to TUE
  ; *** note: this version does not account for UTC change in addendum B
  ;
  ;  In the REFERENCE sections "(B)" refers to the BACnet standard and
  ;  "(T)" refers to the testing addendum.
  ;--------------------------------------------------------------

SETUP BACnet TimeSynchronization Service Execution

  ;--------------------------------------------------------------
  ;
  ; Setting up the hardware parameters for the VTS computer (TD).
  ;
  ;
  ;
  ; the network parameter 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 hardware parameters for the IUT.
  ;
  ;
  IUT_MAC = 00602d00006b   -- MAC address of IUT
                           -- replace with your IUT address
                            
  DEVICE_ID = 207          -- Device object instance for IUT.

  ;--------------------------------------------------------------

SECTION Testing the execution of the TimeSynchronization service

  ;--------------------------------------------------------------
  ; Test group 1 implements the positive TimeSynchronization service
  ; execution tests.

  TEST #1a
  -- Local braodcast of TimeSynchronization

  DEPENDENCIES none                         -- add ReadProperty

  REFERENCE (B)16.7; (T) 9.26.1.1

  SEND (
    Network = NET_1
    Destination = BROADCAST
    DER = FALSE
    PDU = Unconfirmed-Request
    Service = TimeSynchronization
    Date = MON, JANUARY 01,1996
    Time = 12:00:00.00 PM	
    )

AND (
    Network = NET_1
    Destination = IUT_MAC
    DER = TRUE
    PDU = Confirmed-Request
    Service = ReadProperty
    Object = 0, DEVICE, DEVICE_ID
    Property = 1, Local-Time
    )

AND (
    Network = NET_1
    Destination = IUT_MAC
    DER = TRUE
    PDU = Confirmed-Request
    Service = ReadProperty
    Object = 0, DEVICE, DEVICE_ID
    Property = 1, Local-Date
    )

  -- The IUT should reset the time clock and return the new time
  -- and date in response to the ReadProperty request. This version
  -- does not account for the possibility of a time change between 
  -- the synchronization and the readback.

  EXPECT (
    Network = NET_1
    Destination = MY_MAC
    DER = FALSE
    PDU = Complex-Ack
    Service = ReadProperty
    Object = 0, DEVICE, DEVICE_ID
    Property = 1, Local-Time
    OpenTag 3                               ;Property Value(s)
       Time = 12:00:00.00 PM	
    CloseTag 3
    )

  AND (
    Network = NET_1
    Destination = MY_MAC
    DER = FALSE
    PDU = Complex-Ack
    Service = ReadProperty
    Object = 0, DEVICE, DEVICE_ID
    Property = 1, Local-Date
    OpenTag 3                               ;Property Value(s)
       Date = MON, JANUARY 01,1996
    CloseTag 3
    )

;--------------------------------------------------------------
  TEST #1b
  --- local  TimeSynchronization directed to IUT

  DEPENDENCIES none                         -- add ReadProperty

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

  SEND (
    Network = NET_1
    Destination = IUT_MAC
    DER = FALSE
    PDU = Unconfirmed-Request
    Service = TimeSynchronization
    Date = TUE, JANUARY 02,1996
    Time = 01:01:00.00 PM	
    )

AND (
    Network = NET_1
    Destination = IUT_MAC
    DER = TRUE
    PDU = Confirmed-Request
    Service = ReadProperty
    Object = 0, DEVICE, DEVICE_ID
    Property = 1, Local-Time
    )

AND (
    Network = NET_1
    Destination = IUT_MAC
    DER = TRUE
    PDU = Confirmed-Request
    Service = ReadProperty
    Object = 0, DEVICE, DEVICE_ID
    Property = 1, Local-Date
    )

  --- The IUT should reset the time clock and return the new time
  --- and date in response to the ReadProperty request. 

  EXPECT (
    Network = NET_1
    Destination = MY_MAC
    DER = FALSE
    PDU = Complex-Ack
    Service = ReadProperty
    Object = 0, DEVICE, DEVICE_ID
    Property = 1, Local-Time
    OpenTag 3                               ;Property Value(s)
       Time = 01:01:00.00 PM	
    CloseTag 3
    )

  AND (
    Network = NET_1
    Destination = MY_MAC
    DER = FALSE
    PDU = Complex-Ack
    Service = ReadProperty
    Object = 0, DEVICE, DEVICE_ID
    Property = 1, Local-Date
    OpenTag 3                               ;Property Value(s)
       Date = TUE, JANUARY 02,1996
    CloseTag 3
    )

⌨️ 快捷键说明

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