Menu

Using VTS to test Event Notifications

Help
Babanz
2017-02-09
2017-02-09
  • Babanz

    Babanz - 2017-02-09

    Hello,

    I'm using VTS scripts now to test my bacnet server "protoype" and wanted to know if it is possible to use scripts to test Alarms and event notifications like the Alarm Acknowledgment.

    My probleme is that i can't find a way to put data taken from a received packet into the ACK-request for example.

    Regards.

     
  • John Hartman

    John Hartman - 2017-02-11

    VTS scrips are pretty limited as far as conditional operations go. Read other discussion items here for more informantion and a few suggestions.

    You CAN do a little some passing from received to transmitted packets using script variables.

    For example, int eh SETUP section of your script, declar a variable
    SCHEDULE_1 = Schedule, 9999999 -- Analog (Real) Schedule object to be tested

    Then you might have a TEST that creates a schedule object:
    SEND (
    PDU = Confirmed-Request
    Service = CreateObject
    OpenTag 0
    Enum = 0, 17
    CloseTag 0
    )

    EXPECT (
    -- object created
    PDU = ComplexAck
    Service = CreateObject
    Object >> SCHEDULE_1
    )

    The server returns the object ID of the schedule it created, and the >> stores it in the variable SCHEDULE_1

    Then you could write to that schedule by using its value

    SEND (
    PDU = Confirmed-Request
    Service = WritePropertyMultiple

    Object = 0, SCHEDULE_1
    OpenTag 1
    Property = 0, 21026
    OpenTag 2
    Enum = 3
    CloseTag 2

      Property = 0, object-name
      OpenTag 2
         Characterstring = "Real/Analog Schedule"
      CloseTag 2
    

    CloseTag 1
    )

    EXPECT (
    PDU = SimpleAck
    Service = WritePropertyMultiple
    )

    In an EXPECT statement without >>, VTS will COMPARE the returned value to the variable:
    SEND (
    PDU = Confirmed-Request
    Service = ReadProperty
    Object = 0, SCHEDULE_1
    Property = 1, Effective-Period
    )

    EXPECT (
    PDU = ComplexAck
    Service = ReadProperty
    Object = 0, SCHEDULE_1
    Property = 1, Effective-Period
    OpenTag 3
    Date DATE_NULL
    Date DATE_NULL
    CloseTag 3
    )

     

Log in to post a comment.