{"id":8856,"date":"2022-04-04T05:17:19","date_gmt":"2022-04-04T05:17:19","guid":{"rendered":"http:\/\/fastbitlab.com\/?p=8856"},"modified":"2023-08-16T14:06:48","modified_gmt":"2023-08-16T08:36:48","slug":"fsm-lecture-89-clock-alarm-state-machine","status":"publish","type":"post","link":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-89-clock-alarm-state-machine\/","title":{"rendered":"FSM Lecture 89| Exercise-008:Implementation part 8"},"content":{"rendered":"<div class=\"boldgrid-section\" style=\"background-image: linear-gradient(to left, #eeeeee, #eeeeee);\" data-bg-color-1=\"#EEEEEE\" data-bg-color-2=\"#EEEEEE\" data-bg-direction=\"to left\">\n<div class=\"container\">\n<div class=\"row\" style=\"padding-top: 35px; padding-bottom: 0px; background-image: linear-gradient(to left, #eeeeee, #eeeeee);\" data-bg-color-1=\"#EEEEEE\" data-bg-color-2=\"#EEEEEE\" data-bg-direction=\"to left\">\n<div class=\"col-md-1 col-sm-12 col-xs-12 col-lg-1\">\n<p>&nbsp;<\/p>\n<\/div>\n<div class=\"col-md-10 col-sm-12 col-xs-12 col-lg-10\">\n<h1 class=\"\" style=\"text-align: center; font-size: 28px;\"><span style=\"font-weight: 400; color: #000000;\">Exercise-008:Implementation part 8<\/span><\/h1>\n<div class=\"row bg-editor-hr-wrap\">\n<div class=\"col-md-12 col-xs-12 col-sm-12 col-lg-12\">\n<hr>\n<\/div>\n<\/div>\n<p class=\"\"><span style=\"font-weight: 400; color: #000000;\">In the previous article, we implemented the alarm state machine as well as the button machine. It is not yet over, so we have to take care of our clock alarm state machine.<\/span><\/p>\n<p class=\"\"><span style=\"font-weight: 400; color: #000000;\">You see this error state in the clock alarm state machine (Figure 1). There are some missing links. So, we have to draw that.<\/span><\/p>\n<figure id=\"attachment_8859\" aria-describedby=\"caption-attachment-8859\" style=\"width: 1339px\" class=\"wp-caption aligncenter\"><img fetchpriority=\"high\" decoding=\"async\" class=\"wp-image-8859 size-full\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/04\/Figure-1.png\" alt=\"Implementation part 8\" width=\"1339\" height=\"693\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-1.png 1339w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-1-300x155.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-1-768x397.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-1-1024x530.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-1-600x311.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-1-120x62.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-1-500x259.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-1-200x104.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-1-400x207.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-1-800x414.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-1-1200x621.png 1200w\" sizes=\"(max-width: 1339px) 100vw, 1339px\" \/><figcaption id=\"caption-attachment-8859\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 1. Error state<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\"><span style=\"font-weight: 400; color: #000000;\">And also, in the Alarm_Notify state, I have not implemented these links between these substates. We will do that now.&nbsp;<\/span><\/p>\n<figure id=\"attachment_8860\" aria-describedby=\"caption-attachment-8860\" style=\"width: 1153px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-8860 size-full\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/04\/Figure-2.png\" alt=\"Implementation part 8\" width=\"1153\" height=\"571\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-2.png 1153w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-2-300x149.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-2-768x380.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-2-1024x507.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-2-600x297.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-2-120x59.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-2-500x248.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-2-200x99.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-2-400x198.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-2-800x396.png 800w\" sizes=\"(max-width: 1153px) 100vw, 1153px\" \/><figcaption id=\"caption-attachment-8860\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 2. Alarm_Notify state<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\"><span style=\"font-weight: 400; color: #000000;\">When we are in an error state, we flash an error message for every 500 milliseconds. How do we implement that? We implemented that using variables. So, we used one timeout variable, and we incremented that timeout variable whenever the tick signal was received and then compared it with some timeout value like that.&nbsp;<\/span><\/p>\n<p class=\"\"><span style=\"font-weight: 400; color: #000000;\">Now, you can get rid of all those things. You can use the timeout function provided by the framework.&nbsp;<\/span><\/p>\n<p class=\"\"><span style=\"font-weight: 400; color: #000000;\">When we enter the setting_error state, let&#8217;s arm for a periodic timeout, as an entry action of this state. Let&#8217;s go to the entry action and arm a timeout.&nbsp;<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\"><span style=\"font-weight: 400; color: #000000;\">QActive_armX() function, as shown in Figure 3.<\/span><\/p>\n<figure id=\"attachment_8891\" aria-describedby=\"caption-attachment-8891\" style=\"width: 1280px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-8891 size-full\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/04\/Fig-3.png\" alt=\"Implementation part 8\" width=\"1280\" height=\"627\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Fig-3.png 1280w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Fig-3-300x147.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Fig-3-768x376.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Fig-3-1024x502.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Fig-3-600x294.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Fig-3-120x59.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Fig-3-500x245.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Fig-3-200x98.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Fig-3-400x196.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Fig-3-800x392.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Fig-3-1200x588.png 1200w\" sizes=\"(max-width: 1280px) 100vw, 1280px\" \/><figcaption id=\"caption-attachment-8891\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 3. QActive_armX()<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\"><span style=\"font-weight: 400; color: #000000;\">Let\u2019s use QActive_armX(). Here Active object is AO_ClockAlarm. After that, the Tick rate is 0. The number of ticks is 500 ticks or 500 milliseconds. So, you can use MS_TO_TICKS here. In this case, 500 ticks are the same as 500 ms, because our frequency is 1000Hz. And after that, the periodicity you have to mention \u2018interval\u2019, that is also 500 milliseconds. setting_error states entry action code is shown in Figure 4.<\/span><\/p>\n<figure id=\"attachment_8892\" aria-describedby=\"caption-attachment-8892\" style=\"width: 867px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-8892 size-full\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/04\/Fig-4.png\" alt=\"Implementation part 8\" width=\"867\" height=\"461\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Fig-4.png 867w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Fig-4-300x160.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Fig-4-768x408.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Fig-4-600x319.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Fig-4-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Fig-4-500x266.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Fig-4-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Fig-4-400x213.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Fig-4-800x425.png 800w\" sizes=\"(max-width: 867px) 100vw, 867px\" \/><figcaption id=\"caption-attachment-8892\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 4. setting _error states entry action<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\"><span style=\"font-weight: 400; color: #000000;\">Whenever this setting_error state is exited, you have to disarm that. QActive_disarmX() function is shown in Figure 5. <\/span><\/p>\n<figure id=\"attachment_8864\" aria-describedby=\"caption-attachment-8864\" style=\"width: 1278px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-8864 size-full\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/04\/Figure-5.png\" alt=\"Implementation part 8\" width=\"1278\" height=\"665\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-5.png 1278w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-5-300x156.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-5-768x400.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-5-1024x533.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-5-600x312.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-5-120x62.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-5-500x260.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-5-200x104.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-5-400x208.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-5-800x416.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-5-1200x624.png 1200w\" sizes=\"(max-width: 1278px) 100vw, 1278px\" \/><figcaption id=\"caption-attachment-8864\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 5. QActive_disarmX() function<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\"><span style=\"font-weight: 400; color: #000000;\">Put QActive_disarmX() as an exit action. You have to mention the Pointer to the AO and the tick rate 0.&nbsp;<\/span><\/p>\n<figure id=\"attachment_8865\" aria-describedby=\"caption-attachment-8865\" style=\"width: 593px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-8865 size-full\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/04\/Figure-6.png\" alt=\"Implementation part 8\" width=\"593\" height=\"106\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-6.png 593w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-6-300x54.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-6-120x21.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-6-500x89.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-6-200x36.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-6-400x72.png 400w\" sizes=\"(max-width: 593px) 100vw, 593px\" \/><figcaption id=\"caption-attachment-8865\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 6. setting_error states exit action<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\"><span style=\"font-weight: 400; color: #000000;\">Whenever there is a timeout, the state machine receives Q_TIME. That&#8217;s why we will transit like this. The signal name is Q_TIMEOUT. This is shown in Figure 7.<\/span><\/p>\n<figure id=\"attachment_8866\" aria-describedby=\"caption-attachment-8866\" style=\"width: 447px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-8866 size-full\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/04\/Figure-7.png\" alt=\"Q_TIMEOUT signal\" width=\"447\" height=\"208\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-7.png 447w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-7-300x140.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-7-120x56.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-7-200x93.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-7-400x186.png 400w\" sizes=\"(max-width: 447px) 100vw, 447px\" \/><figcaption id=\"caption-attachment-8866\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 7. Q_TIMEOUT signal<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\"><span style=\"font-weight: 400; color: #000000;\">Whenever a tick happens here, then you have to inform the alarm class about the current time. The tick transition code is shown in Figure 8.<\/span><\/p>\n<figure id=\"attachment_8867\" aria-describedby=\"caption-attachment-8867\" style=\"width: 939px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-8867 size-full\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/04\/Figure-8.png\" alt=\"TICK transition code\" width=\"939\" height=\"425\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-8.png 939w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-8-300x136.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-8-768x348.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-8-600x272.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-8-120x54.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-8-500x226.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-8-200x91.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-8-400x181.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-8-800x362.png 800w\" sizes=\"(max-width: 939px) 100vw, 939px\" \/><figcaption id=\"caption-attachment-8867\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 8. TICK transition code<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\"><span style=\"font-weight: 400; color: #000000;\">Now, go to the Alarm_notify state. Here, I have used one timeout variable. I&#8217;ll tell you why that is required. In the entry action of this alarm notify, you have to arm the timer. Let&#8217;s take the same code of setting_error state entry and exit actions. Let&#8217;s put in the entry action of this one.<\/span><\/p>\n<figure id=\"attachment_8868\" aria-describedby=\"caption-attachment-8868\" style=\"width: 560px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-8868 size-full\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/04\/Figure-9.png\" alt=\"Alarm_notify states entry action code\" width=\"560\" height=\"115\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-9.png 560w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-9-300x62.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-9-120x25.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-9-500x103.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-9-200x41.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-9-400x82.png 400w\" sizes=\"(max-width: 560px) 100vw, 560px\" \/><figcaption id=\"caption-attachment-8868\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 9. Alarm_notify states entry action code<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\"><span style=\"font-weight: 400; color: #000000;\">In the exit action, the disarm function.<\/span><\/p>\n<figure id=\"attachment_8869\" aria-describedby=\"caption-attachment-8869\" style=\"width: 380px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-8869 size-full\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/04\/Figure-10.png\" alt=\"Alarm_notify states exit action code\" width=\"380\" height=\"115\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-10.png 380w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-10-300x91.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-10-120x36.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-10-200x61.png 200w\" sizes=\"(max-width: 380px) 100vw, 380px\" \/><figcaption id=\"caption-attachment-8869\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 10. Alarm_notify states exit action code<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\"><span style=\"font-weight: 400; color: #000000;\">And let&#8217;s draw one transition, and I&#8217;ll use one choice node here. The signal name is Q_TIMEOUT.<\/span><\/p>\n<figure id=\"attachment_8870\" aria-describedby=\"caption-attachment-8870\" style=\"width: 1059px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-8870 size-full\" src=\"https:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/04\/Figure-11.png\" alt=\"alarm state machine\" width=\"1059\" height=\"693\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-11.png 1059w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-11-300x196.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-11-768x503.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-11-1024x670.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-11-600x393.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-11-120x79.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-11-500x327.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-11-200x131.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-11-400x262.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-11-800x524.png 800w\" sizes=\"(max-width: 1059px) 100vw, 1059px\" \/><figcaption id=\"caption-attachment-8870\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 11. Alarm_Notify state<\/span><\/figcaption><\/figure>\n<p class=\"\"><span style=\"color: #000000;\"><span style=\"font-weight: 400;\">Whenever Q_TIMEOUT happens, what I do is I decrement a timeout variable&nbsp; <strong>&#8211;<\/strong><\/span><b>-me-&gt;timeout<\/b><span style=\"font-weight: 400;\">; And, in the guard condition of this choice segment, I&#8217;ll put one guard condition, that is <\/span><b>me-&gt;timeout<\/b><span style=\"font-weight: 400;\">.<\/span><\/span><\/p>\n<p class=\"\"><span style=\"font-weight: 400; color: #000000;\">Whenever a timeout signal is received, the timeout variable is decremented by one, and then it will be compared. If it is non-zero, that will transition to this alarm_msg_off state. And, whenever the state machine is in this state, this trigger name is again Q_Timeout.<\/span><\/p>\n<p class=\"\"><span style=\"font-weight: 400; color: #000000;\">After some time, if no one presses this OK button, then after 20 seconds, this timeout variable will be 0. So, this guard fails. When this fails, this Q_Timeout signal will propagate to the superstate, and we will transition from the Alarm_notify state to the Settings state.<\/span><\/p>\n<figure id=\"attachment_8893\" aria-describedby=\"caption-attachment-8893\" style=\"width: 1156px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-8893 size-full\" src=\"https:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/04\/Fig-12.png\" alt=\"Figure 12. Q_TIMEOUT transition - alarm state machine\" width=\"1156\" height=\"607\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Fig-12.png 1156w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Fig-12-300x158.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Fig-12-768x403.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Fig-12-1024x538.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Fig-12-600x315.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Fig-12-120x63.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Fig-12-500x263.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Fig-12-200x105.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Fig-12-400x210.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Fig-12-800x420.png 800w\" sizes=\"(max-width: 1156px) 100vw, 1156px\" \/><figcaption id=\"caption-attachment-8893\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 12. Q_TIMEOUT transition<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\"><span style=\"font-weight: 400; color: #000000;\">The initial state is the Ticking state. It enters into a ticking state. Let me create that variable timeout in the clock alarm. I think that variable is not there. Let me create it.&nbsp;<\/span><\/p>\n<p class=\"\"><span style=\"font-weight: 400; color: #000000;\">Right-click on Clock_Alarm, select Add attribute. Name it as timeout; type is uint8_t; visibility is private, as shown in Figure 13.&nbsp;<\/span><\/p>\n<figure id=\"attachment_8872\" aria-describedby=\"caption-attachment-8872\" style=\"width: 1181px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-8872 size-full\" src=\"https:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/04\/Figure-13.png\" alt=\"alarm state machine\" width=\"1181\" height=\"537\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-13.png 1181w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-13-300x136.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-13-768x349.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-13-1024x466.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-13-600x273.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-13-120x55.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-13-500x227.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-13-200x91.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-13-400x182.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-13-800x364.png 800w\" sizes=\"(max-width: 1181px) 100vw, 1181px\" \/><figcaption id=\"caption-attachment-8872\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 13. Adding a timeout attribute<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\"><span style=\"font-weight: 400; color: #000000;\">Let&#8217;s generate the code. The code has generated successfully. And, let&#8217;s go back to the IDE. Let&#8217;s try to compile this. There are already some errors. So, let&#8217;s see.&nbsp;<\/span><\/p>\n<p class=\"\"><span style=\"font-weight: 400; color: #000000;\">First of all, let&#8217;s start from the alarm.cpp. Go here Alarm_ctor, and it says some problems here.&nbsp;<\/span><\/p>\n<pre class=\"color-5-text-contrast color5-background-color\" style=\"font-size: 12px; box-shadow: #cecece 0px 0px 0px 0px;\"><span style=\"color: #ff99cc;\">void<\/span> Alarm_ctor(Alarm *const me) {\r\n    QHsm_ctor(me,Q_STATE_CAST(&amp;Alarm_initial));\r\n}<\/pre>\n<p class=\"\"><span style=\"font-weight: 400; color: #000000;\">Let&#8217;s copy this ${AOs::Alarm_ctor). Let&#8217;s go to the model and paste the link. It takes you to that code.&nbsp;<\/span><\/p>\n<p class=\"\"><span style=\"font-weight: 400; color: #000000;\">The code is actually &amp;me-&gt;super.<\/span><\/p>\n<figure id=\"attachment_8874\" aria-describedby=\"caption-attachment-8874\" style=\"width: 671px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-8874 size-full\" src=\"https:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/04\/Figure-15.png\" alt=\"alarm state machine\" width=\"671\" height=\"512\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-15.png 671w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-15-300x229.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-15-600x458.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-15-120x92.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-15-500x382.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-15-200x153.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-15-400x305.png 400w\" sizes=\"(max-width: 671px) 100vw, 671px\" \/><figcaption id=\"caption-attachment-8874\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 14. Alarm_ctor<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\"><span style=\"font-weight: 400; color: #000000;\">Now, let&#8217;s go to the next one. Identifier this module is undefined. Go to the model and go to alarm.cpp, here define this macro\u2192 Q_DEFINE_THIS_FILE.(shown in Figure 15)&nbsp;<\/span><\/p>\n<figure id=\"attachment_8875\" aria-describedby=\"caption-attachment-8875\" style=\"width: 1059px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-8875 size-full\" src=\"https:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/04\/Figure-16.png\" alt=\" alarm state machine\" width=\"1059\" height=\"719\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-16.png 1059w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-16-300x204.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-16-768x521.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-16-1024x695.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-16-600x407.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-16-120x81.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-16-500x339.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-16-200x136.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-16-400x272.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-16-800x543.png 800w\" sizes=\"(max-width: 1059px) 100vw, 1059px\" \/><figcaption id=\"caption-attachment-8875\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 15. alarm.cpp file<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\"><span style=\"font-weight: 400; color: #000000;\">There are a couple of errors in the ClockAlarm_SM.cpp. These macros are not available here.<\/span><\/p>\n<pre class=\"color-5-text-contrast color5-background-color\" style=\"font-size: 12px; box-shadow: #cecece 0px 0px 0px 0px;\"><span style=\"color: #ff99cc;\">static<\/span> QState Clock_Alarm_Alarm_Notify(Clock_Alarm * const me) {\r\n&nbsp; &nbsp; &nbsp; QState status_;\r\n&nbsp; &nbsp; &nbsp;<span style=\"color: #ff99cc;\"> switch<\/span> (Q_SIG(me)) {\r\n&nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #008000;\">&nbsp; &nbsp;\/*.${AOs::Clock_Alarm::SM::Alarm_Notify} *\/<\/span>\r\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #ff99cc;\"> case<\/span> Q_ENTRY_SIG: {\r\n  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;me-&gt;timeout = 20;\r\n  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;QActive_armX(AO_ClockAlarm,0,MS_TO_TICKS(500),MS_TO_TICKS(500));\r\n  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;status_ = Q_HANDLED();\r\n  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #ff99cc;\">break<\/span>;\r\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/pre>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\"><span style=\"font-weight: 400; color: #000000;\">Go to the ClockAlarm_SM.cpp and include the main.h(shown in Figure 16).<\/span><\/p>\n<figure id=\"attachment_8877\" aria-describedby=\"caption-attachment-8877\" style=\"width: 878px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-8877 size-full\" src=\"https:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/04\/Figure-18.png\" alt=\" Include the main.h - alarm state machine\" width=\"878\" height=\"536\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-18.png 878w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-18-300x183.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-18-768x469.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-18-600x366.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-18-120x73.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-18-500x305.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-18-200x122.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-18-400x244.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-18-800x488.png 800w\" sizes=\"(max-width: 878px) 100vw, 878px\" \/><figcaption id=\"caption-attachment-8877\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 16. Include the main.h<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\"><span style=\"font-weight: 400; color: #000000;\">After that, there is one more error. We used the Alarm_get_alarm_time method, but we didn&#8217;t give that method. We will do that.<\/span><\/p>\n<p class=\"\"><span style=\"color: #000000;\"><span style=\"font-weight: 400;\">Let&#8217;s go back to the model, Go to the Alarm, add one more operation called get_alarm_time. The return type is uint32_t, which is a public function. And the code is <\/span><b>return me-&gt;alarm_time<\/b><span style=\"font-weight: 400;\">.<\/span><\/span><\/p>\n<figure id=\"attachment_8878\" aria-describedby=\"caption-attachment-8878\" style=\"width: 589px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-8878 size-full\" src=\"https:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/04\/Figure-19.png\" alt=\"Implementation part 8- alarm state machine\" width=\"589\" height=\"539\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-19.png 589w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-19-300x275.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-19-120x110.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-19-500x458.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-19-200x183.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-19-400x366.png 400w\" sizes=\"(max-width: 589px) 100vw, 589px\" \/><figcaption id=\"caption-attachment-8878\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 17. Adding get_alatm_time operation<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\"><span style=\"font-weight: 400; color: #000000;\">In the main.cpp give the definition of that, as shown in figure 18.<\/span><\/p>\n<figure id=\"attachment_8879\" aria-describedby=\"caption-attachment-8879\" style=\"width: 1465px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-8879 size-full\" src=\"https:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/04\/Figure-20.png\" alt=\"main.cpp file - alarm state machine\" width=\"1465\" height=\"759\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-20.png 1465w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-20-300x155.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-20-768x398.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-20-1024x531.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-20-600x311.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-20-120x62.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-20-500x259.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-20-200x104.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-20-400x207.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-20-800x414.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-20-1200x622.png 1200w\" sizes=\"(max-width: 1465px) 100vw, 1465px\" \/><figcaption id=\"caption-attachment-8879\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 18. main.cpp file<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\"><span style=\"font-weight: 400; color: #000000;\">When you start the QF_run here, QF_run runs, and it calls a hook function called startup. It is a startup call back to the application. We will implement this function in our main.cpp.<\/span><\/p>\n<p class=\"\"><span style=\"font-weight: 400; color: #000000;\">Let&#8217;s go to the main.cpp, let&#8217;s implement.&nbsp; QF_onStartup. And from here, we will call that function sys_tick_init().<\/span><\/p>\n<figure id=\"attachment_8880\" aria-describedby=\"caption-attachment-8880\" style=\"width: 1677px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-8880 size-full\" src=\"https:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/04\/Figure-21.png\" alt=\"Implementation part 8 alarm state machine\" width=\"1677\" height=\"845\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-21.png 1677w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-21-300x151.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-21-768x387.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-21-1024x516.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-21-600x302.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-21-120x60.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-21-500x252.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-21-540x272.png 540w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-21-200x101.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-21-400x202.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-21-800x403.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-21-1200x605.png 1200w\" sizes=\"(max-width: 1677px) 100vw, 1677px\" \/><figcaption id=\"caption-attachment-8880\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 19. QF_onStartup function<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\"><span style=\"color: #000000;\"><b>FastBit Embedded Brain Academy Courses,<\/b><\/span><\/p>\n<p class=\"\"><span style=\"color: #000000;\">C<span style=\"font-weight: 400;\"><span style=\"color: #000000;\">lick here:<\/span>&nbsp;<\/span><\/span><span style=\"color: #0000ff;\"><a style=\"color: #0000ff; text-decoration: underline;\" href=\"http:\/\/fastbitlab.com\/course1\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">https:\/\/fastbitlab.com\/course1<\/span><\/a><\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Exercise-008:Implementation part 8 In the previous article, we implemented the alarm state machine as well as the button machine. It is not yet over, so we have to take care of our clock alarm state machine. You see this error state in the clock alarm state machine (Figure 1). There are some missing links. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":8866,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"0","ocean_second_sidebar":"0","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"","ocean_center_header_left_menu":"0","ocean_custom_header_template":"0","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"0","ocean_menu_typo_font_family":"0","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"0","ocean_post_oembed":"","ocean_post_self_hosted_media":"","ocean_post_video_embed":"","ocean_link_format":"","ocean_link_format_target":"self","ocean_quote_format":"","ocean_quote_format_link":"post","ocean_gallery_link_images":"off","ocean_gallery_id":[],"footnotes":""},"categories":[8],"tags":[17],"class_list":["post-8856","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-finite-state-machine","entry","has-media"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Optimizing Clock Alarm State Machine: Error Handling &amp; Timeout<\/title>\n<meta name=\"description\" content=\"Enhance your clock alarm state machine by optimizing error handling and implementing timeouts. Learn how to efficiently manage transitions and\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fastbitlab.com\/blog\/fsm-lecture-89-clock-alarm-state-machine\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Optimizing Clock Alarm State Machine: Error Handling &amp; Timeout\" \/>\n<meta property=\"og:description\" content=\"Enhance your clock alarm state machine by optimizing error handling and implementing timeouts. Learn how to efficiently manage transitions and\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fastbitlab.com\/blog\/fsm-lecture-89-clock-alarm-state-machine\/\" \/>\n<meta property=\"og:site_name\" content=\"FastBit EBA\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/fastbiteba\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-04-04T05:17:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-16T08:36:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-7.png\" \/>\n\t<meta property=\"og:image:width\" content=\"447\" \/>\n\t<meta property=\"og:image:height\" content=\"208\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"FastBitLab\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@fastbiteba\" \/>\n<meta name=\"twitter:site\" content=\"@fastbiteba\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"FastBitLab\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-89-clock-alarm-state-machine\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-89-clock-alarm-state-machine\\\/\"},\"author\":{\"name\":\"FastBitLab\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/person\\\/e32b38e733a0d76ffa7e6bc998652e5d\"},\"headline\":\"FSM Lecture 89| Exercise-008:Implementation part 8\",\"datePublished\":\"2022-04-04T05:17:19+00:00\",\"dateModified\":\"2023-08-16T08:36:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-89-clock-alarm-state-machine\\\/\"},\"wordCount\":1189,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-89-clock-alarm-state-machine\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/Figure-7.png\",\"keywords\":[\"Finite state Machine(FSM)\"],\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-89-clock-alarm-state-machine\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-89-clock-alarm-state-machine\\\/\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-89-clock-alarm-state-machine\\\/\",\"name\":\"Optimizing Clock Alarm State Machine: Error Handling & Timeout\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-89-clock-alarm-state-machine\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-89-clock-alarm-state-machine\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/Figure-7.png\",\"datePublished\":\"2022-04-04T05:17:19+00:00\",\"dateModified\":\"2023-08-16T08:36:48+00:00\",\"description\":\"Enhance your clock alarm state machine by optimizing error handling and implementing timeouts. Learn how to efficiently manage transitions and\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-89-clock-alarm-state-machine\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-89-clock-alarm-state-machine\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-89-clock-alarm-state-machine\\\/#primaryimage\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/Figure-7.png\",\"contentUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/Figure-7.png\",\"width\":447,\"height\":208,\"caption\":\"Figure 7. Q_TIMEOUT signal\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/fsm-lecture-89-clock-alarm-state-machine\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"FSM Lecture 89| Exercise-008:Implementation part 8\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/\",\"name\":\"FastBit EBA\",\"description\":\"Your Online Academy of Embedded Systems\",\"publisher\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#organization\",\"name\":\"FastBit EBA\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/logo-EzNrEnyr.png\",\"contentUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/logo-EzNrEnyr.png\",\"width\":640,\"height\":640,\"caption\":\"FastBit EBA\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/fastbiteba\\\/\",\"https:\\\/\\\/x.com\\\/fastbiteba\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/fastbit-embedded-brain-academy-b3167b124\\\/\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCa1REBV9hyrzGp2mjJCagBg\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/person\\\/e32b38e733a0d76ffa7e6bc998652e5d\",\"name\":\"FastBitLab\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g\",\"caption\":\"FastBitLab\"},\"description\":\"The FastBit Embedded Brain Academy uses the power of internet to bring the online courses related to the field of embedded system programming, Real time operating system, Embedded Linux systems, etc at your finger tip with very low cost. Backed with strong experience of industry, we have produced lots of courses with the customer enrolment over 3000+ across 100+ countries.\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Optimizing Clock Alarm State Machine: Error Handling & Timeout","description":"Enhance your clock alarm state machine by optimizing error handling and implementing timeouts. Learn how to efficiently manage transitions and","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-89-clock-alarm-state-machine\/","og_locale":"en_US","og_type":"article","og_title":"Optimizing Clock Alarm State Machine: Error Handling & Timeout","og_description":"Enhance your clock alarm state machine by optimizing error handling and implementing timeouts. Learn how to efficiently manage transitions and","og_url":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-89-clock-alarm-state-machine\/","og_site_name":"FastBit EBA","article_publisher":"https:\/\/www.facebook.com\/fastbiteba\/","article_published_time":"2022-04-04T05:17:19+00:00","article_modified_time":"2023-08-16T08:36:48+00:00","og_image":[{"width":447,"height":208,"url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-7.png","type":"image\/png"}],"author":"FastBitLab","twitter_card":"summary_large_image","twitter_creator":"@fastbiteba","twitter_site":"@fastbiteba","twitter_misc":{"Written by":"FastBitLab","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-89-clock-alarm-state-machine\/#article","isPartOf":{"@id":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-89-clock-alarm-state-machine\/"},"author":{"name":"FastBitLab","@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/person\/e32b38e733a0d76ffa7e6bc998652e5d"},"headline":"FSM Lecture 89| Exercise-008:Implementation part 8","datePublished":"2022-04-04T05:17:19+00:00","dateModified":"2023-08-16T08:36:48+00:00","mainEntityOfPage":{"@id":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-89-clock-alarm-state-machine\/"},"wordCount":1189,"commentCount":0,"publisher":{"@id":"https:\/\/fastbitlab.com\/blog\/#organization"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-89-clock-alarm-state-machine\/#primaryimage"},"thumbnailUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-7.png","keywords":["Finite state Machine(FSM)"],"articleSection":["Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fastbitlab.com\/blog\/fsm-lecture-89-clock-alarm-state-machine\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-89-clock-alarm-state-machine\/","url":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-89-clock-alarm-state-machine\/","name":"Optimizing Clock Alarm State Machine: Error Handling & Timeout","isPartOf":{"@id":"https:\/\/fastbitlab.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-89-clock-alarm-state-machine\/#primaryimage"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-89-clock-alarm-state-machine\/#primaryimage"},"thumbnailUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-7.png","datePublished":"2022-04-04T05:17:19+00:00","dateModified":"2023-08-16T08:36:48+00:00","description":"Enhance your clock alarm state machine by optimizing error handling and implementing timeouts. Learn how to efficiently manage transitions and","breadcrumb":{"@id":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-89-clock-alarm-state-machine\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fastbitlab.com\/blog\/fsm-lecture-89-clock-alarm-state-machine\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-89-clock-alarm-state-machine\/#primaryimage","url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-7.png","contentUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/04\/Figure-7.png","width":447,"height":208,"caption":"Figure 7. Q_TIMEOUT signal"},{"@type":"BreadcrumbList","@id":"https:\/\/fastbitlab.com\/blog\/fsm-lecture-89-clock-alarm-state-machine\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fastbitlab.com\/blog\/"},{"@type":"ListItem","position":2,"name":"FSM Lecture 89| Exercise-008:Implementation part 8"}]},{"@type":"WebSite","@id":"https:\/\/fastbitlab.com\/blog\/#website","url":"https:\/\/fastbitlab.com\/blog\/","name":"FastBit EBA","description":"Your Online Academy of Embedded Systems","publisher":{"@id":"https:\/\/fastbitlab.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fastbitlab.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/fastbitlab.com\/blog\/#organization","name":"FastBit EBA","url":"https:\/\/fastbitlab.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2026\/04\/logo-EzNrEnyr.png","contentUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2026\/04\/logo-EzNrEnyr.png","width":640,"height":640,"caption":"FastBit EBA"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/fastbiteba\/","https:\/\/x.com\/fastbiteba","https:\/\/www.linkedin.com\/in\/fastbit-embedded-brain-academy-b3167b124\/","https:\/\/www.youtube.com\/channel\/UCa1REBV9hyrzGp2mjJCagBg"]},{"@type":"Person","@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/person\/e32b38e733a0d76ffa7e6bc998652e5d","name":"FastBitLab","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g","caption":"FastBitLab"},"description":"The FastBit Embedded Brain Academy uses the power of internet to bring the online courses related to the field of embedded system programming, Real time operating system, Embedded Linux systems, etc at your finger tip with very low cost. Backed with strong experience of industry, we have produced lots of courses with the customer enrolment over 3000+ across 100+ countries."}]}},"_links":{"self":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/8856","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/comments?post=8856"}],"version-history":[{"count":4,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/8856\/revisions"}],"predecessor-version":[{"id":15419,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/8856\/revisions\/15419"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/media\/8866"}],"wp:attachment":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/media?parent=8856"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/categories?post=8856"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/tags?post=8856"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}