The ArtTimeSync packet is used to set the real time clock in network devices.
Broadcast and Unicast algorithms
The ArtTimeSync packet can be broadcast or unicast to the network. The decision on which to use is very much application specific. The most common implementation involves a single controller broadcasting to all other devices.
In some circumstances a controller may wish to programme a single device; in which case the controller will unicast ArtTimeSync.
Nodes respond with an ArtTimeSync packet with the field ArtTimeSync->Prog = 0. The response packet should be broadcast if the controller packet was a broadcast, otherwise it should be unicast to the controller.
ArtTimeSync – Packet Definition
The ID field is 8 bytes in length and contains the null terminated string of ASCII characters:
A r t – N e t
The purpose of the field is to identify the packet as an Art-Net protocol packet. All Art-Net packets start with this field. Receivers must check this field is correct and discard the packet if it is not.
The OpCode field is a 16-bit word transmitted low byte first. The OpCode identifies the packet type. In the ArtTimeSync packet this field is set to ‘OpTimeSync’.
The ProtVer field is a 16-bit word transmitted high byte first. It identifies the version of the Art-Net protocol. The protocol version is not related to Art-Net 1, II, 3 or 4. Only one protocol version has ever existed in production equipment which is 1410. Receivers should use the following good packet test:
ProtVer >= 14
The ProtVer may be increased in a future releases to identify significant functionality changes.
These fields are used to pad the length of this packet to match the ArtPoll header. They are transmitted as zero and never tested by receivers.
The tm_sec field is an 8-bit number that defines the number of seconds encoded in the time. The value ranges from 010 to 5910.
The tm_min field is an 8-bit number that defines the number of minutes encoded in the time. The value ranges from 010 to 5910.
The tm_hour field is an 8-bit number that defines the number of hours encoded in the time. The value ranges from 010 to 2310.
The tm_mday field is an 8-bit number that defines the day of the month. The value ranges from 110 to 3110.
The tm_mon field is an 8-bit number that defines the month. The value ranges from 010 to 1110.
The tm_year field is a 16-bit number that defines the number of years since 190010. For example, the year 201210 is encoded as 11210 or 007016.
The tm_wday field is an 8-bit number that defines the day of the week in the range 010 to 610. The enumeration is shown in the table below:
The tm_isdst field is an 8-bit number that defines whether daylight saving is active. The enumeration is shown in the table below: