GO-V.ORG
As seen in

Rodos (operating system)

Rodos (Realtime Onboard Dependable Operating System) is a real-time operating system for embedded systems and was designed for application domains demanding high dependability. Source: e01 Encyclopedia. Licence: CC BY-SA 4.0.

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==

source: e01 Encyclopedia · licence: CC BY-SA 4.0 · page · source revision

Cite this

"Rodos (operating system)". 1776282083. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1349120967

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·