Rodos (operating system)
≈ 2 min read
Names in other languages
No names in other languages are held for this entry yet.
Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.
Rodos (Realtime Onboard Dependable Operating System) is a real-time operating system for embedded systems and was designed for application domains demanding high dependability.
Rodos (Realtime Onboard Dependable Operating System) is a real-time operating system for embedded systems and was designed for application domains demanding high dependability. include "rodos.h" class HelloWorld : public StaticThread<> { void run(){ PRINTF("Hello World!\n"); } } helloworld; The class Thread is extended by a custom run() procedure, which writes Hello World to the standard output with PRINTF.
All Rodos components needed for application development are accessible via the rodos.h header file. include class HighPriorityThread: public StaticThread<> { public: HighPriorityThread() : StaticThread("HiPriority", 25) { } void run() { while (1) { PRINTF("*"); suspendCallerUntil(NOW() + 1*SECONDS); } } } highprio; class LowPriorityThread: public StaticThread<> { public: LowPriorityThread() : StaticThread("LowPriority", 10) { } void run() { while (1) { PRINTF("."); } } } lowprio; The thread LowPriorityThread constantly writes the character "." and is interrupted every second by the thread HighPriorityThread, which writes the character "*". include Topic counter1(-1, "counter1"); class MyPublisher : public StaticThread<> { public: MyPublisher() : StaticThread("SenderSimple") { } void run() { long cnt = 0; TIME_LOOP(3*SECONDS, 3*SECONDS) { PRINTF("Publish: %ld\n", ++cnt); counter1.publish(cnt); } } } publisher; class MySubscriber : public SubscriberReceiver { public: MySubscriber() : SubscriberReceiver (counter1) { } void put(long &data) { PRINTF("Received: %ld\n", data); } }subscriber; The Publisher-Thread post every three seconds an ascending counter value, while the Subscriber-Thread simply displays the received integer value.
References
Text derived from https://en.wikipedia.org/w/index.php?oldid=1349120967 under CC BY-SA 4.0; modifications have been made.