Skip to content

Source: IpList.h

IpList

One human-typed text control turned into the list of addresses a driver sends to.

Functions

Return Name Description
const char * parseIpList inline Parse s into out as 4-byte quads, nOut receiving the count, a blank string yielding none.

parseIpList

inline

inline const char * parseIpList(const char * s, uint8_t(*) out, uint8_t maxIps, uint8_t & nOut)

Parse s into out as 4-byte quads, nOut receiving the count, a blank string yielding none.

More info

Why a list rather than one address per driver

This sits beside parsePinList, the GPIO CSV parser, as the same shape of thing: a human-typed list of hardware endpoints. A driver that fans one buffer out to several receivers therefore reads its destinations the way a driver fanning out to several GPIO lanes reads its pins.

Art-Net 4 requires ArtDmx to be unicast to the node that owns each universe, stating that there are no conditions in which broadcast is allowed. Driving several receivers therefore means several destinations. Expressing that as one control keeps the common case, a row of identical tubes on consecutive addresses, to a single field instead of one driver instance each.

The two syntaxes, which mix freely

Written What it means
192.168.1.60-70 a range over the last octet alone, giving .60 through .70, the first three octets having to match
192.168.1.60,61,62,65 a list where, after one full dotted quad, a bare number is the next host on the same /24, and a further full quad switches subnet
192.168.1.60, 10.0.0.5 explicit full quads, across any subnets

The parser returns null on success, or a static error literal the caller hands straight to setStatus. unit_IpList.cpp pins it on the host.