BACnetStack_SendUTCTimeSynchronization
bool BACnetStack_SendUTCTimeSynchronization( const uint8_t yearMinus1900, const uint8_t month, const uint8_t day, const uint8_t weekday, const uint8_t hour, const uint8_t minute, const uint8_t second, const uint8_t hundredthSecond, const uint8_t * connectionString, const uint8_t connectionStringLength, const uint32_t networkPortInstance, const bool broadcast, const uint16_t destinationNetwork, const uint8_t * destinationAddress, const uint8_t destinationAddressLength);Sends an unconfirmed UTCTimeSynchronization request, telling receivers to set their UTC time (see BACnetStack_SendTimeSynchronization() for the local-time variant).
BACnet reference: ANSI/ASHRAE 135-2024 clause 16.8 (UTCTimeSynchronization Service).
Parameters
Section titled “Parameters”| Parameter | Direction | Description |
|---|---|---|
yearMinus1900, month, day, weekday, hour, minute, second, hundredthSecond |
in | The UTC date/time to synchronize to, sent as the request’s one BACnetDateTime (cl. 21: a Date followed by a Time). Date fields are the BACnet WIRE form (cl. 20.2.12): yearMinus1900 is the calendar year MINUS 1900, so 2026 is 126 - these are uint8_t, and passing a 4-digit year truncates silently at the call site into a valid-looking wrong date; month has January = 1 (13 = odd months, 14 = even months); day is 1..31 (32 = last day of month, 33 = odd days, 34 = even days); weekday is Monday = 1 .. Sunday = 7. 255 = unspecified in any of them. |
connectionString, connectionStringLength |
in | The datalink address to send TO (the destination) - not the local address to send from. For IPv4 this is 6 bytes: 4 octets of IPv4 address followed by 2 octets of port, big-endian (e.g. 0xC0,0xA8,0x01,0x05,0xBA,0xC0 = 192.168.1.5:47808; see BACnetStack_SendRegisterForeignDevice() for a worked example); on BACnet/IPv4 the stack refuses to send to a connection string of any other length, except that a broadcast from a device registered as a foreign device goes to its BBMD and does not use the connection string. MS/TP and BACnet/SC use a different connection-string shape; see their respective Set/Send exports. |
networkPortInstance |
in | The Network Port object instance to send the message on, or BACNET_NETWORK_PORT_DEFAULT (4194303) for the default/single port. |
broadcast, destinationNetwork, destinationAddress, destinationAddressLength |
in | broadcast selects a broadcast or a unicast where the data link has the choice: on BACnet/IP an Original-Broadcast-NPDU or an Original-Unicast-NPDU (a broadcast from a device registered as a foreign device goes to its BBMD as a Distribute-Broadcast-To-Network); on BACnet/SC the broadcast VMAC; on MS/TP it is ignored and connectionString decides. destinationNetwork 0 keeps the message on the local network; 1 to 65534 routes it to that network, to the device whose MAC address is destinationAddress/destinationAddressLength or, with NULL and 0 there, to every device on that network; 65535 is a global broadcast to every network. |
Returns
Section titled “Returns”True if the request was sent, otherwise false.
Topic: Client requests. Declared in CASBACnetStackDLL.h.