Skip to content

3.1r1: 9.5.1's UDP broadcast tests and 9.5.2, UDP Solicited - #52

Merged
jadamcrain merged 1 commit into
mainfrom
section-9-udp
Oct 14, 2026
Merged

jadamcrain merged 1 commit into
mainfrom
section-9-udp

Conversation

@jadamcrain

Copy link
Copy Markdown
Member

The second part of 3.1r1's section 9, after #51's TCP tests.

Tests

  • 9.5.1.5 and 9.5.1.6 (UDP Unicast / Multicast IP Address with TCP as the Main Communication Method):
    • with a TCP connection open, a broadcast goes over UDP from the connection's address, either to the device's port 20000 or to a multicast group that the setup has the device join;
    • the broadcast is a write that clears IIN1.7, which IEEE 1815-2012 4.7 (Table 4-16) has every device accept as a broadcast;
    • the next poll over TCP must have IIN1.0 set.
  • 9.5.2.1 to 9.5.2.5 (UDP Solicited): Port 20000, Port Other Than 20000, Specific IP Address, Wildcard IP Address and Responses to Port 20000.
    • They use UDP alone, or UDP with TCP where the device can't use UDP alone.
    • For Responses to Port 20000, the harness sends from port 20000 and receives there, as 1815-2012 13.2.3.2.2 b) has a master do.

Harness

  • TestDriver.connect now takes a UdpConnection too. The harness sends datagrams from a local address and port, and receives the device's datagrams only there and only from the device's address. A reconnection after a close binds the same port again.
  • TestDriver.sendDatagrams sends a message as datagrams, one per link frame, alongside the connection.
  • The parser decodes each datagram whole:
    • a link frame that doesn't end in its datagram fails, since 1815-2012 13.2.3.2.3 forbids it, even when valid frames come before it;
    • empty datagrams are ignored.

Options. As in #51, each test runs only where the options say the device can do what it tests:

  • network.tcp.udpBroadcast
  • network.tcp.multicast, with network.multicastGroup
  • network.udp
  • network.udp.respondToOriginatingPort, which every 9.5.2 test needs, as 9.5.2.1 step 2 says
  • network.udp.respondTo20000
  • network.udp.alone and network.udp.anyAddress
  • network.udp.configurablePort, network.udp.specificAddress and network.udp.wildcard

The UDP Unsolicited tests (9.5.3) and 9.5.4 come next. The 2.7 -describe output is unchanged.

- 9.5.1's UDP Unicast and UDP Multicast tests: with a TCP connection open,
  a broadcast that clears IIN1.7 (which IEEE 1815-2012 4.7 has every
  device accept as a broadcast) goes over UDP to the device's port 20000,
  or to a multicast group the setup has it join, from the connection's
  address; the next poll over TCP has IIN1.0 set.
- 9.5.2's Port 20000, Port Other Than 20000, Specific IP Address, Wildcard
  IP Address and Responses to Port 20000, over UDP alone, or with TCP
  where the device can't use UDP alone.
- The driver connects over UDP too: datagrams to the device from a local
  address and port, which alone receives the device's, from its address.
  It also sends a message as datagrams alongside its connection.
- Each datagram is parsed whole, and a link frame that doesn't end in its
  datagram fails, as IEEE 1815-2012 13.2.3.2.3 forbids it.
- Options for each capability: network.tcp.udpBroadcast,
  network.tcp.multicast with network.multicastGroup, network.udp,
  network.udp.respondToOriginatingPort, network.udp.respondTo20000,
  network.udp.alone, network.udp.anyAddress, network.udp.configurablePort,
  network.udp.specificAddress, network.udp.wildcard.
@jadamcrain
jadamcrain merged commit b7598dc into main Oct 14, 2026
5 checks passed
@jadamcrain
jadamcrain deleted the section-9-udp branch October 14, 2026 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant