Practical UML Statecharts in C/C++: Event-Driven Programming for Embedded Systems

Miro Samek

  • 出版商: CRC
  • 出版日期: 2018-04-04
  • 售價: $7,640
  • 貴賓價: 9.5$7,258
  • 語言: 英文
  • 裝訂: Hardcover
  • ISBN: 1138436380
  • ISBN-13: 9781138436381
  • 相關分類: C++ 程式語言嵌入式系統UML
  • 海外代購書籍(需單獨結帳)

相關主題

商品描述

Practical UML Statecharts in C/C plus plus Second Edition bridges the gap between high-level abstract concepts of the Unified Modeling Language (UML) and the actual programming aspects of modern hierarchical state machines (UML statecharts). The book describes a lightweight, open source, event-driven infrastructure, called QP that enables direct manual coding UML statecharts and concurrent event-driven applications in C or C plus plus without big tools.This book is presented in two parts. In Part I, you get a practical description of the relevant state machine concepts starting from traditional finite state automata to modern UML state machines followed by state machine coding techniques and state-machine design patterns, all illustrated with executable examples. In Part II, you find a detailed design study of a generic real-time framework indispensable for combining concurrent, event-driven state machines into robust applications. Part II begins with a clear explanation of the key event-driven programming concepts such as inversion of control (�Hollywood Principle�), blocking versus non-blocking code, run-to-completion (RTC) execution semantics, the importance of event queues, dealing with time, and the role of state machines to maintain the context from one event to the next. This background is designed to help software developers in making the transition from the traditional sequential to the modern event-driven programming, which can be one of the trickiest paradigm shifts. The lightweight QP event-driven infrastructure goes several steps beyond the traditional real-time operating system (RTOS). In the simplest configuration, QP runs on bare-metal microprocessor, microcontroller, or DSP completely replacing the RTOS. QP can also work with almost any OS/RTOS to take advantage of the existing device drivers, communication stacks, and other middleware. The accompanying website to this book contains complete open source code for QP, ports to popular proc

商品描述(中文翻譯)

《C/C++ 實用 UML 狀態圖(第二版)》彌補了統一建模語言(UML)的高層次抽象概念與現代層次狀態機(UML 狀態圖)實際編程方面之間的差距。本書描述了一個輕量級的開源事件驅動基礎架構,稱為 QP,該基礎架構使得在 C 或 C++ 中直接手動編碼 UML 狀態圖和並發事件驅動應用程序成為可能,而無需大型工具。本書分為兩部分。第一部分提供了相關狀態機概念的實用描述,從傳統的有限狀態自動機開始,進而介紹現代 UML 狀態機,接著是狀態機編碼技術和狀態機設計模式,所有內容均以可執行的範例進行說明。第二部分則詳細研究了一個通用的實時框架,這對於將並發的事件驅動狀態機結合成穩健的應用程序是不可或缺的。第二部分首先清楚解釋了關鍵的事件驅動編程概念,如控制反轉(「好萊塢原則」)、阻塞與非阻塞代碼、執行語義的完成執行(RTC)、事件隊列的重要性、時間處理,以及狀態機在維持從一個事件到下一個事件的上下文中的角色。這些背景知識旨在幫助軟體開發人員從傳統的順序編程過渡到現代的事件驅動編程,這可能是最具挑戰性的範式轉變之一。輕量級的 QP 事件驅動基礎架構在傳統的實時操作系統(RTOS)之上更進一步。在最簡單的配置中,QP 可以在裸金屬微處理器、微控制器或 DSP 上運行,完全取代 RTOS。QP 也可以與幾乎任何操作系統/RTOS 一起工作,以利用現有的設備驅動程序、通信堆疊和其他中介軟體。本書附帶的網站包含 QP 的完整開源代碼,以及流行處理器的移植版本。