Knowledge Base

# GetRTC() hash function

Valid for use with hash command: HMI

Implemented on the following platforms: Android, Windows

Request the SimpleHMI client to send its current date and time information. This allows the SPLat controller to tap into the HMI device to set its own RTC.

This hash function only makes sense if you also have a SetRTCEvent, and if the controller you are programming has a Real Time Clock (RTC).

When GetRTC is executed, providing a serial port has been appropriately opened for SimpleHMI use, the board will send a message to the SimpleHMI device asking it to send back the date and time from its internal clock. When the SimpleHMi device responds, the SPLat board will automatically update its own RTC. If the SetRTCEvent specifies a handler, it will be executed immediately after the internal RTC has been updated. There’s a fully worked example for the EC1 controller online here.

See also SetRTCEventOpen_Serial, User