FSM/vscode/FSM_OOP/childtest/childFSM.h

58 lines
1.4 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef __CHILD_FSM_H_
#define __CHILD_FSM_H_
/* -------------------------------------------------------------------------- */
/* 提前做类型声明 */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* 自定义数据和信号 */
/* -------------------------------------------------------------------------- */
/**
* @brief 自定义外部信号目前最多15个
* @details 因为是Unint16存储的信号位
*
*/
enum ChildFSMSignals{
Signal_toD = 1, /**< 必须从1开始0预留给Idle信号了*/
Signal_toE,
};
/**
* @brief 自定义外部数据
*
*/
typedef struct ChildFSMExternalData
{
int arrindex;
int x;
}ChildFSMExternalData;
/**
* @brief 自定义内部数据
*
*/
typedef struct ChildFSMInnerData
{
int y1;
int inner1;
}ChildFSMInnerData;
/* -------------------------------------------------------------------------- */
/* 下面的改个名字就行了 */
/* -------------------------------------------------------------------------- */
typedef struct ChildFSMData
{
ChildFSMExternalData external;
ChildFSMInnerData internal;
}ChildFSMData;
typedef struct ChildFSM ChildFSM;
ChildFSM *createChildFSM();
#endif