⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 monitor.cc

📁 一个用system C来实现的交通灯控制算法
💻 CC
字号:
#include "monitor.h"#include <cassert>Monitor::Monitor(sc_module_name name, char *outfile)  : sc_module(name){  assert(outfile != 0);  out = new ofstream(outfile);  assert(*out);  SC_METHOD(monitor_method);  dont_initialize();  sensitive << lights;}Monitor::~Monitor(){ delete out; }void Monitor::monitor_method(){  double l = lights->read();  *out << "lights (" << sc_time_stamp() << ") = " << l << endl;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -