📄 feux.cpp
字号:
/************************************************************************* Feux.cpp - description ------------------- d閎ut : mar mar 9 2004 copyright : (C) 2004 par Xin ZHOU & Robin WETZEL e-mail : rwetzel@mail.insa-lyon.fr*************************************************************************///---------- R閍lisation de la t鈉he <Feux> (fichier Feux.cpp) -------------////////////////////////////////////////////////////////////////// INCLUDE//-------------------------------------------------------- Include syst鑝e#include <signal.h>#include <unistd.h>#include <stdlib.h>#include <sys/shm.h>#include <sys/sem.h>//------------------------------------------------------ Include personnel#include "/public/tp/tp-multitache/Outils.h"#include "Feux.h"//////////////////////////////////////////////////////////////////// PRIVE//------------------------------------------------------------- Constantes#define SEUIL_1_3 15#define SEUIL_2_4 10#define TEMPS_ORANGE 3#define TEMPS_ROUGE 2//------------------------------------------------------------------ Typestypedef struct{ bool voie1_3Libre; bool voie2_4Libre;}FormatEtatFeux;enum Couleur { VERT, ORANGE, ROUGE };//------------------------------------------------------ Variables priv閑sstatic FormatEtatFeux * zoneFeux;static bool voiturePresente;// bool閑n associ
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -