mirror of
https://github.com/QuantumLeaps/qpc.git
synced 2025-01-28 07:03:10 +08:00
64 lines
2.0 KiB
C
64 lines
2.0 KiB
C
/*****************************************************************************
|
|
* Model: comp.qm
|
|
* File: ./clock.h
|
|
*
|
|
* This code has been generated by QM tool (see state-machine.com/qm).
|
|
* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
|
|
*
|
|
* This program is open source software: you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License as published
|
|
* by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
* for more details.
|
|
*****************************************************************************/
|
|
/*${.::clock.h} ............................................................*/
|
|
#ifndef clock_h
|
|
#define clock_h
|
|
|
|
enum AlarmClockSignals {
|
|
TICK_SIG = Q_USER_SIG, /* time tick event */
|
|
ALARM_SET_SIG, /* set the alarm */
|
|
ALARM_ON_SIG, /* turn the alarm on */
|
|
ALARM_OFF_SIG, /* turn the alarm off */
|
|
ALARM_SIG, /* alarm event from Alarm component to AlarmClock container */
|
|
CLOCK_12H_SIG, /* set the clock in 12H mode */
|
|
CLOCK_24H_SIG, /* set the clock in 24H mode */
|
|
TIME_SIG, /* time event sent to Alarm (contains current time) */
|
|
TERMINATE_SIG /* terminate the application */
|
|
};
|
|
|
|
|
|
#if ((QP_VERSION < 580) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8)))
|
|
#error qpc version 5.8.0 or higher required
|
|
#endif
|
|
|
|
/*${Events::SetEvt} ........................................................*/
|
|
typedef struct {
|
|
/* protected: */
|
|
QEvt super;
|
|
|
|
/* public: */
|
|
uint8_t digit;
|
|
} SetEvt;
|
|
|
|
/*${Events::TimeEvt} .......................................................*/
|
|
typedef struct {
|
|
/* protected: */
|
|
QEvt super;
|
|
|
|
/* public: */
|
|
uint32_t current_time;
|
|
} TimeEvt;
|
|
|
|
|
|
extern QActive * const APP_alarmClock;
|
|
|
|
/*${Components::AlarmClock_ctor} ...........................................*/
|
|
void AlarmClock_ctor(void);
|
|
;
|
|
|
|
#endif /* clock_h */
|