Last Updated on : 2024-11-20 08:51:36download
The generic system service components based on the characteristics of the IoT operating system are encapsulated in the APIs of the OS kernel layer.
The APIs shield the differences in hardware and systems, which makes software compatible with different systems and chip platforms. Common system services are also available, including secure data storage, secure boot, secure memory management, messages, timers, job queues, and events.
Your required OS features and software can be implemented simply by making API calls in the OS kernel and application layers respectively, which can notably boost your development efficiency.
The differences in chips, operating systems, resources, and performances across various IoT platforms can be huge. But there are common requirements of IoT hardware for storage.
TuyaOS provides an encrypted key-value database for the file system and flash memory. Shielding the differences in the hardware and operating systems, TuyaOS enables a safe, reliable, and efficient data storage service.
For more information about the function description of ADC peripherals, see Memory Management.
The message queue provides the common capability of message processing. Create a message, register the message callback, and send the message ID to implement asynchronous messaging as well as serial processing.
In TuyaOS, all messages are processed in the cmmod
task. You should minimize complex logic processing in the message callback to ensure messaging efficiency. Otherwise, stack overflow might occur.
The millisecond timer is supported. You can create, start, tailor, and delete a timer. Two types of timers are available.
TIMER_ONCE
: A non-repeating timer executes once and then invalidates itself automatically. Then, you can delete it.TIMER_CYCLE
: A repeating timer executes and then reschedules itself on the same run loop until you stop or delete it.When a timer works with the message queue, the scheduled message processing can be implemented. Create a message and register the callback for scheduled messages to trigger scheduled messaging and perform serial processing.
The common asynchronous task scheduler can send a task to a specified job queue. Tasks will be processed serially. You can create a job queue as needed and schedule tasks.
TuyaOS provides a lightweight event notification library, with the following features.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback