📄 readme
字号:
************************************************************************************************
** Project: FSMGenerator
** Module: FSMGenerator::examples::Cpp
** File: README
** Date: 2002.08.01
** Author: Pavel Bekkerman (chpavel@tx.technion.ac.il)
** Copyright: Copyright (C) 2002 Pavel Bekkerman
** License:
** This program is free 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; either version 2 of
** the License, or (at your option) any later version.
**
** 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.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Contact: Pavel Bekkerman (chpavel@tx.technion.ac.il)
************************************************************************************************
All the explanations refer to the FSM configuration from "test.fsm" file.
You can generalize the approach for any othe FSM configuration file and the software with which the generated FSM should interface. See the documentation for more information.
To run the example you should follow the next steps:
1) (source distribution) Compile "fsmgenerator" from sources
make all
make install
rehash
2) (executable distribution) Run "fsmgenerator" on "test.fsm"
fsmgenerator test.fsm Cpp .
3) Compile 3 modules: Main_FSMIsEven Api FSMIsEven (the generated FSM)
4) Link the modules together into an executable: e.g. "test"
If you now try to link all the files together, you will fail. The reason is that you, obiously, should notify the generated FSM about all the necessary software modules it needs to interface with. To do so, in the case of FSMIsEven generated from "test.fsm", simply add the following lines in the include section of the generated FSM (FSMIsEven.java):
import Main_FSMIsEven.*;
This way the FSMIsEven will know that its callbacks are located in Main module and link with them with no problem.
5) Run executable and watch the produced output.
6) Check the produced output against FSM configuration.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -