#33 Event-Driven Programming Part-1: GUI example, events, event-loop, run-to-completion, no-blocking

Поделиться
HTML-код
  • Опубликовано: 1 мар 2020
  • This lesson starts a new segment of lessons about *event-driven programming*, which is an important stepping stone in understanding modern software of any kind, not just modern embedded programming.
    In this lesson, you will learn the main concepts of event-driven programming based on its origins in graphical user interfaces (GUIs), which went mainstream during the personal computer revolution in the 1980s. Specifically, in this lesson, you will see the most important characteristics of event-driven programming exemplified by the original, low-level Win32 API in C, which demonstrates the main concepts of event-driven programming in their simplest and most direct form. With this background, in the following lessons, you will see how these main characteristics of event-driven programming can be applied to real-time embedded systems, such as your TivaC LaunchPad board.
    ------
    Resources:
    Companion web page for this video course:
    www.state-machine.com/quickstart
    GitHub repository for projects for this video course:
    github.com/QuantumLeaps/moder...
    Transcript of this lesson:
    www.state-machine.com/course/...
    Video Credits:
    This lesson uses short clips from the following RUclips videos:
    1968 “Mother of All Demos” by SRI’s Doug Engelbart and Team ( • 1968 “Mother of All De... )
    Xerox Star 8010 GUI
    ( • DigiBarn TV: Xerox Sta... )
    Music credits:
    The background music comes from:
    www.bensound.com/royalty-free...
  • НаукаНаука

Комментарии • 52

  • @StateMachineCOM
    @StateMachineCOM  2 года назад +4

    NOTE: The source code, as presented in the video, might cause compilation errors with the newer MDK-ARM / uVision toolsets. This is because the underlying compiler in MDK-ARM has been changed to "Compiler-6", while the older "Compiler-5" is considered now obsolete. The updated code that compiles cleanly with "Compiler-6" is available from the companion website at:
    www.state-machine.com/video-course
    and from GitHub:
    github.com/QuantumLeaps/modern-embedded-programming-course

  • @sujeetbadnale9441
    @sujeetbadnale9441 10 месяцев назад +4

    I'm speechless. This is high quality content. This is very practical. You are blessed By God. Please Keep up your amazing work. God Bless You 😊

  • @nolimangulabnan6101
    @nolimangulabnan6101 4 года назад +6

    Big thanks Miro Samek. Please keep going. We love it very much

  • @VolkansSpace
    @VolkansSpace 4 года назад +5

    You are an "embedded hero".

  • @Kodreanu23
    @Kodreanu23 2 года назад +2

    Fantastic video! Short and to the point! Thank you, Dr Samek!

  • @patricko.5277
    @patricko.5277 4 года назад +10

    Thank you for uploading such great programming lessons. I hope this will never end ;)
    Of course we will join you next time! Best regards, Patrick.

  • @jugnu361
    @jugnu361 4 года назад +3

    best on internet sir..........cant thank you enough...........

  • @ashrafkamel1287
    @ashrafkamel1287 3 года назад +1

    after careful rewatches.
    your explanation is very very beautiful.
    Thank You very much.
    May God guides you the Right pass.

  • @10e999
    @10e999 4 года назад +3

    Looking forward part2. This is eyes opening.

  • @alicangul2603
    @alicangul2603 3 года назад +1

    These lessons are invaluable.

  • @syntheticjudah
    @syntheticjudah 4 года назад +1

    Thank you for this great lesson! It was very interesting to learn about historical prerequisites for creating event-based programming methods!

  • @ahmadbanshee9714
    @ahmadbanshee9714 4 года назад +2

    thank you the best lesson in embedded programming

  • @KevinAmadiva
    @KevinAmadiva 4 года назад

    Great great lessons Miro. Really appreciate your efforts.

  • @rajeshkumar-yv9ht
    @rajeshkumar-yv9ht 4 года назад +1

    Thankyou mr author, because of your course only I got a job in ge

  • @marianm5923
    @marianm5923 4 года назад +1

    Clear and superb explanation. Thank you!!!

  • @bhups200689
    @bhups200689 4 года назад +9

    I am not sure what i should write in comment just to appreciate the amazing work you are putting out here..... Please continue the series.... believe me there is a whole lot generation of aspiring embedded engineers waiting to get this level of quality learning. All the very best man.... Just keep making the videos so that learning can come out of the limits of the text books. :)

  • @muhammed_genco
    @muhammed_genco 4 года назад +9

    Amazing, thanks

  • @VasaMusic438
    @VasaMusic438 3 года назад +2

    what a great lesson !!! Thanks so much !!!!!!!

  • @zhitailiu3876
    @zhitailiu3876 4 года назад +1

    Really really amazing, as i am learning QM and QEP!

  • @shraddharaghuvanshi4621
    @shraddharaghuvanshi4621 4 года назад +1

    Thanks for this series waiting for next lesson

  • @maniprevo
    @maniprevo 4 года назад +2

    How Deep you studied this subject I appreciate your work. I studied Charles Petzold win 32 API Book 20 years back when I was learning VC++ this book is necessary to understand MFC Classes. Today software engineers know one knows this subject this much deep

  • @ArshadAli-zk5kj
    @ArshadAli-zk5kj 4 года назад +1

    Thank you for this great lesson sir

  • @cebubikebootcamp
    @cebubikebootcamp 4 года назад +1

    Thank you so much!

  • @abder5453
    @abder5453 4 года назад

    thanks man, keep it up ♥

  • @MrI7asson
    @MrI7asson 4 года назад +2

    While all of your tutorial episodes are of great quality, this episode is next level interesting!

    • @StateMachineCOM
      @StateMachineCOM  4 года назад +6

      Yes, this lesson marks a transition to the "modern" embedded programming, with future lessons exploring the programming paradigms that go beyond the traditional RTOS. Stay tuned! --MMS

    • @MrI7asson
      @MrI7asson 4 года назад

      Quantum Leaps, LLC looking forward to it!

  • @madhawapriyashantha3722
    @madhawapriyashantha3722 3 года назад

    awesome explanation

  • @MohamedAli-xb7kh
    @MohamedAli-xb7kh 4 года назад +1

    Thanks sir keep it up 👏👏👏

  • @anthonyrocha8075
    @anthonyrocha8075 2 года назад +1

    Another high-quality lecture. Would it be possible to inform which open source/commercial products use the Quantum Framework?

  • @ejyjawa352
    @ejyjawa352 4 года назад +1

    Hi ! Is Quantum leaps simular to Rhapsody Ibm ?

    • @StateMachineCOM
      @StateMachineCOM  Год назад +1

      Quantum Leaps company provides, among others, the QM modeling tool (see www.state-machine.com/qm ), which indeed is similar to IBM Rhapsody. The significant differences are that: (1) QM is freeware while Rhapsody is expensive, and (2) QM is lightweight and "low-ceremony" while Rhapsody is quite heavyweight and "high-ceremony." Of course, QM offers much less functionality than Rhapsody, but QM supports hierarchical state machines (UML statecharts) very well and generates efficient, highly-readable C or C++ code (arguably even *better* than Rhapsody. Finally, the QM code generator is coupled with the QP Real-Time Embedded Frameworks, which are much lightweight than the IBM OXF framework coupled with IBM Rhapshody. In the end, to get an idea what Quantum Leaps offers you should try it (state-machine.com/#Downloads ). All Quantum Leaps software is open source. --MMS

  • @TheCarmacon
    @TheCarmacon 3 года назад

    Why is line 67 "MSG msg;" inside the while loop?

    • @StateMachineCOM
      @StateMachineCOM  3 года назад +3

      It is a good programming practice to define variables in the narrowest possible scope. The temporary variable "msg" is needed only inside the while loop, so it is defined only there. Please note that even the old C89 standard allows defining variables right after every opening brace '{'. --MMS

  • @alex12I3
    @alex12I3 Год назад

    Can I do the event-driven concept on Raspberry Pi?

    • @StateMachineCOM
      @StateMachineCOM  Год назад +2

      Yes, you could. Please watch the video: Running QP Real-Time Frameworks on Embedded Linux (ruclips.net/video/0AaPRMSt2jg/видео.html ). That video uses Raspberry Pi.

  • @ramadhanafif
    @ramadhanafif Год назад

    great video, but do you mind to upload a higher quality video? this video is full of texts and having 1080p would be nice

    • @StateMachineCOM
      @StateMachineCOM  Год назад +1

      This video should be still quite legible when played in the original 720p resolution. But this is one of the last ones at 720p. The newer videos are at 1080p. Please check them out! --MMS

  • @giuseppelatorre4500
    @giuseppelatorre4500 Год назад

    Si può avere in Italiano?

  • @ajitsakri9888
    @ajitsakri9888 4 года назад

    I really liked this video
    please help me with this question
    Assume 8 LEDs are connected to the ports p1.5-p1.12, write a C code to implement the functionality of the Johnson counter, upon reading key ‘j’ or ‘J’ from the UART terminal, else continuously blink.

    • @StateMachineCOM
      @StateMachineCOM  4 года назад +9

      Sounds like a homework assignment... Dude, you need to do this yourself!

  • @benravin6547
    @benravin6547 4 года назад

    It is not clear what is application and what is windows system here.

    • @StateMachineCOM
      @StateMachineCOM  4 года назад +4

      "Application" in this case is the code in the 'hellowin.c' module (left panel in the Visual Studio IDE). "Windows System" is everything else. --MMS

    • @benravin6547
      @benravin6547 4 года назад

      @@StateMachineCOM By using Event driven rogramming we don't need an RTOS, is that true ?

    • @StateMachineCOM
      @StateMachineCOM  Год назад

      @@benravin6547 This is actually a complex question. Typically RTOS threads are programmed with blocking calls to the RTOS that explicitly wait for selected events. This programming style is called sequential, which is the opposite of event-driven programming. But it is also possible to structure each RTOS task as an event loop discussed in this video. In that case, RTOS can be *combined* with the event-driven paradigm. The benefit of using RTOS like that is having multiple event loops that can *preempt* each other. And this can be very helpful in achieving an excellent *real-time performance* of the system. Event-driven threads structured as event loops are called "Active Objects" and will be discussed in the upcoming lessons of this video course. --MMS

  • @honggangwei5085
    @honggangwei5085 Год назад

    I like your videos very much, may I get your approval to publish them on a Chinese video website?

    • @StateMachineCOM
      @StateMachineCOM  Год назад +1

      Yes, please feel free to re-publish the videos and spread the word. The only request is to please *give credit*. Specifically, for each re-published video, please provide the RUclips link to the original video (the RUclips link can be obtained by clicking on the "Share" button under each video.) Thanks a lot! --Miro

    • @honggangwei5085
      @honggangwei5085 Год назад

      @@StateMachineCOM thanks very much,may I add mandarin script to these videos?

    • @StateMachineCOM
      @StateMachineCOM  Год назад

      @@honggangwei5085 Yes, please add Mandarin translation to the videos. --MMS

  • @rajeshkumar-yv9ht
    @rajeshkumar-yv9ht 4 года назад

    why nowadays your videos missing audio music

    • @StateMachineCOM
      @StateMachineCOM  4 года назад +2

      Several viewer explicitly requested NOT to use any background music, because presumably they find it distracting. It's hard to win here... --MMS

    • @Ziferten
      @Ziferten 4 года назад

      @@StateMachineCOM I've always appreciated the small clips at the intro and conclusion, but please don't add any during the content!