🛰️Zafer Satılmış - Aviora

OS Time Source (Linux Local Time)

The JSON node linuxLocalTime targets the Linux simulator / host (and similar environments) where wall-clock time comes from the operating system (time() / settimeofday), not from an external I2C RTC chip. It is intended when both intRTC.use and extRTC.use are false. If both are off and linuxLocalTime.use is true, the generator sets APP_TIME_SERVICE_USE_LINUX_LOCAL_TIME to 1, includes Linux_DateTime.h, and autogen reads epoch via getCurrentUnixTime() and writes via linuxLocalTimeSvcSetEpoch when updating from epoch. If both RTCs are off and linuxLocalTime.use is false, the software tick backend is used instead.

Eligibility

Figure — Choosing Linux Local Versus Soft Tick
flowchart TD
  A[timeService.use] --> B{intRTC or extRTC on?}
  B -->|Yes| C[Linux local node ignored for preferred source priority]
  B -->|No| D{linuxLocalTime.use?}
  D -->|Yes| E[OS host clock backend]
  D -->|No| F[Software tick backend]
              

Driver Header

deviceConfig.driverPath normally points to Middleware/MiddComm/Midd_OS/inc/Linux_DateTime.h. That header provides getCurrentUnixTime, conversion helpers, and the service wrappers used by autogen. On non-Linux targets, settimeofday may fail at runtime; read path still works wherever time() is valid.

Simulator And CI

This backend is ideal for continuous integration and robot-framework style tests on a Linux workstation: Ethernet or USB GSM modem can provide network access, while the process uses the same Time Service API as on embedded hardware with real RTCs — only the generated autogen and Cus macros differ.