📄 router.vts
字号:
DER = TRUE
SNET = NET_1
SADR = MY_MAC_NET_1
PDU = Confirmed-Request
Service = ReadProperty
)
;--------------------------------------------------------------
TEST #4
--- Sending a local broadcast on network 1 to all devices
--- on the local network, containing a WhoIs-Request APDU.
DEPENDENCIES none
REFERENCE Clause 6.5.2 and 6.5.2.1
SEND (
NETWORK = NET_1
DESTINATION = Local-Broadcast
DER = FALSE
PDU = Unconfirmed-Request
Service = Who-Is
)
--- The router should not take any actions.
EXPECT (
NETWORK = NET_1
)
AND (
NETWORK = NET_2
)
;--------------------------------------------------------------
TEST #5a
--- Sending a remote broadcast from network 1 to all devices
--- on the remote network 2 using a broadcast to determine the
--- router, containing a WhoIs-Request APDU.
DEPENDENCIES none
REFERENCE Clause 6.5.4
SEND (
NETWORK = NET_1
DNET = NET_2
DER = FALSE
PDU = Unconfirmed-Request
Service = Who-Is
)
--- The router should forward message to all devices on network
--- 2 by sending a local broadcast, removing the DNET, DADR and
--- HOPCNT and adding SNET and SADR.
EXPECT (
NETWORK = NET_2
DA = BROADCAST
DER = FALSE
SNET = NET_1
SADR = MY_MAC_NET_1
PDU = Unconfirmed-Request
Service = Who-Is
)
;--------------------------------------------------------------
TEST #5b
--- Sending a remote broadcast from network 1 to all devices
--- on the remote network 3 using a broadcast to determine the
--- router, containing a WhoIs-Request APDU.
DEPENDENCIES #0
REFERENCE Clause 6.5.4
SEND (
NETWORK = NET_1
DNET = NET_3
DER = FALSE
PDU = Unconfirmed-Request
Service = Who-Is
)
--- The router should forward message to the router for network 3
--- on network 2, decrementing HOPCNT and adding SNET and SADR.
EXPECT (
NETWORK = NET_2
DNET = NET_3
SNET = NET_1
DER = FALSE
PDU = Unconfirmed-Request
Service = Who-Is
)
;--------------------------------------------------------------
TEST #5c
--- Sending a remote broadcast from network 1 to all devices
--- on the remote network 5 using a broadcast to determine the
--- router, containing a WhoIs-Request APDU.
DEPENDENCIES #0
REFERENCE Clause 6.5.4
SEND (
NETWORK = NET_1
DNET = NET_5
DER = FALSE
PDU = Unconfirmed-Request
Service = Who-Is
)
--- The router should not take any actions.
EXPECT (
NETWORK = NET_1
)
AND (
NETWORK = NET_2
)
;--------------------------------------------------------------
TEST #6a
--- Sending a global broadcast from network 1 to all devices
--- on all attached networks, containing a WhoIs-Request APDU.
DEPENDENCIES none
REFERENCE Clause 6.5.2.2 and 6.5.4
SEND (
NETWORK = NET_1
DESTINATION = Global-Broadcast
DER = FALSE
PDU = Unconfirmed-Request
Service = Who-Is
)
--- The router should forward message to all devices on all
--- downstreamed networks, adding SNET and SADR and
--- decrementing HOPCNT.
EXPECT (
NETWORK = NET_2
DNET = 0xFFFF
SNET = NET_1
SADR = MY_MAC_NET_1
DER = FALSE
PDU = Unconfirmed-Request
Service = Who-Is
)
;--------------------------------------------------------------
TEST #6b
--- Sending a global broadcast from a device on network 3 via the
--- router on network 2 to all devices on all attached networks,
--- containing a WhoIs-Request APDU.
DEPENDENCIES #0
REFERENCE Clause 6.5.2.2 and 6.5.4
SEND (
NETWORK = NET_2
DNET = 0xFFFF
SNET = NET_3
SADR = DEVICE_NET_3
DER = FALSE
PDU = Unconfirmed-Request
Service = Who-Is
)
--- The router should forward message to all devices on all
--- downstreamed networks, decrementing HOPCNT.
EXPECT (
NETWORK = NET_1
DNET = 0xFFFF
SNET = NET_3
SADR = DEVICE_NET_3
DER = FALSE
PDU = Unconfirmed-Request
Service = Who-Is
)
;--------------------------------------------------------------
TEST #7a
--- Sending a routing message on network 1 to a non
--- existing device on a non existing network 7 via the
--- router, containing a ReadProperty-Request APDU.
DEPENDENCIES none
REFERENCE Clause 6.5.4
SEND (
NETWORK = NET_1
ROUTER = ROUTER_NET_1
DNET = NET_7
DADR = DEVICE_NET_7
DER = FALSE
PDU = Confirmed-Request
Service = ReadProperty
Object = 0, Analog-Input, 5
Property = 1, Present-Value
)
--- The router should recognize that network 7 isn't in its
--- routing table and send a local broadcast to all
--- downstreamed networks, containing a Who Is Router To
--- Network 7 message.
EXPECT (
NETWORK = NET_2
MESSAGE = Who-Is-Router-To-Network, NET_7
)
AND (
NETWORK = NET_1
)
--- The router should observe after an elapsed time period
--- without a responding message, that a router to network 7
--- doesn't exist and should send back a local message,
--- containing a Reject Message To Network 7
--- message with reason 1 (router not directly-connected to the
--- DNET and cannot find a router to the DNET).
;
; possible timing problems...
;
EXPECT (
NETWORK = NET_1
MESSAGE = Reject-Message-To-Network, 1, NET_7
)
;--------------------------------------------------------------
TEST #7b
--- Sending a routing message on network 1 to a device on network 4
--- via the router, containing a ReadProperty-Request APDU.
DEPENDENCIES none
REFERENCE Clause 6.5.4
SEND (
NETWORK = NET_1
ROUTER = ROUTER_NET_1
DNET = NET_4
DADR = DEVICE_NET_4
DER = FALSE
PDU = Confirmed-Request
Service = ReadProperty
Object = 0, Analog-Input, 5
Property = 1, Present-Value
)
--- The router should recognize that network 4 isn't in its
--- routing table and send a local broadcast to all
--- downstreamed networks, containing a Who Is Router To
--- Network 4 message.
EXPECT (
NETWORK = NET_2
MESSAGE = Who-Is-Router-To-Network, NET_4
)
--- Sending a local message on network 2 to the router, containing
--- an I Could Be Router To Network message with performance index
--- of 6.
SEND (
NETWORK = NET_2
DA = ROUTER_NET_2
MESSAGE = I-Could-Be-Router-To-Network, NET_4, 6
)
--- The router should recognize that network 4 is reachable via a
--- halfrouter and should send an Establish Connection To Network
--- 4 message with any time out parameter.
EXPECT (
NETWORK = NET_2
DA = MY_MAC_NET_2
MESSAGE = Establish-Connection-To-Network, NET_4
)
--- Sending a local broadcast on network 2, containing a I Am
--- Router To Network 4 message, as a result of an established
--- connection.
SEND (
NETWORK = NET_2
MESSAGE = I-Am-Router-To-Network, NET_4
)
--- The router should recognize that the connection to network
--- 4 is established and should forward the pending message to
--- the router for network 4.
EXPECT (
NETWORK = NET_2
ROUTER = MY_MAC_NET_2
DNET = NET_4
DADR = DEVICE_NET_4
DER = FALSE
PDU = Confirmed-Request
Service = ReadProperty
Object = 0, Analog-Input, 5
Property = 1, Present-Value
)
;--------------------------------------------------------------
TEST #8
--- Sending two routing messages on network 2 with different
--- priorities, containing an Unconfirmed Private Transfer APDU.
;
; This test won't work with the current version of SBT and VTS,
; because VTS is to slow to send the second message before the
; router already processed the first message, and SBT doesn't
; check the messages for special order.
;
DEPENDENCIES none
REFERENCE unknown
SEND (
NETWORK = NET_2
DNET = NET_1
DADR = MY_MAC_NET_1
PRIORITY = Normal
DER = FALSE
PDU = Unconfirmed-Request
Service = UnconfirmedPrivateTransfer
Unsigned = 0, 25
Unsigned = 1, 8
OpenTag 2
Real = 72.4
CloseTag 2
)
AND (
NETWORK = NET_2
DNET = NET_1
DADR = MY_MAC_NET_1
PRIORITY = LifeSafety
DER = FALSE
PDU = Unconfirmed-Request
Service = UnconfirmedPrivateTransfer
Unsigned = 0, 24
Unsigned = 1, 7
OpenTag 2
Real = 70.0
CloseTag 2
)
--- The router should receive both messages and store them in
--- different priority queues and send the higher priority
--- message first.
EXPECT (
NETWORK = NET_1
PRIORITY = LifeSafety
DER = FALSE
PDU = Unconfirmed-Request
Service = UnconfirmedPrivateTransfer
Unsigned = 0, 24
Unsigned = 1, 7
)
AND (
NETWORK = NET_1
PRIORITY = Normal
DER = FALSE
PDU = Unconfirmed-Request
Service = UnconfirmedPrivateTransfer
Unsigned = 0, 25
Unsigned = 1, 8
)
;--------------------------------------------------------------
TEST #9a
--- Sending a routing message from a device on network 5 via the
--- router on network 1 to a device on network 3, containing a
--- HOPCNT of 1 and a ReadProperty-Request APDU (coded as NL octets).
DEPENDENCIES none
REFERENCE Clause 6.5.4
SEND (
NETWORK = NET_1
ROUTER = ROUTER_NET_1
DNET = NET_3
DADR = DEVICE_NET_3
HOPCNT = 1
SNET = NET_5
SADR = DEVICE_NET_5
DER = TRUE
NL = X'00000F' ; PDU = Confirmed-Request
NL = X'0C' ; Service = ReadProperty
NL = X'0C00000005' ; Object = 0, Analog-Input, 5
NL = X'1955' ; Property = 1, Present-Value
)
--- The router should discard message after decrementing HOPCNT.
EXPECT (
NETWORK = NET_1
)
AND (
NETWORK = NET_2
)
;--------------------------------------------------------------
TEST #9b
--- Sending a routing message from device D_5_1 via router
--- R_1_5 to device D_3_1 on network 3 via router R_1_2,
--- containing a HOPCNT of 0 and a ReadProperty-Request APDU
--- (coded as NL octets).
DEPENDENCIES none
REFERENCE Clause 6.5.4
SEND (
NETWORK = NET_1
ROUTER = ROUTER_NET_1
DNET = NET_3
DADR = DEVICE_NET_3
HOPCNT = 0
SNET = NET_5
SADR = DEVICE_NET_5
DER = TRUE
NL = X'000010' ; PDU = Confirmed-Request
NL = X'0C' ; Service = ReadProperty
NL = X'0C00000005' ; Object = 0, Analog-Input, 5
NL = X'1955' ; Property = 1, Present-Value
)
--- The router should discard message after decrementing HOPCNT.
EXPECT (
NETWORK = NET_1
)
AND (
NETWORK = NET_2
)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -