parser-event.h

来自「模拟器提供了一个简单易用的平台」· C头文件 代码 · 共 73 行

H
73
字号
/* * File: parser-event.h * Author: Suman Banerjee <suman@cs.umd.edu> * Date: July 31, 2001 * Terms: GPL * * myns simulator */#ifndef _PARSER_EVENT_H_#define _PARSER_EVENT_H_#include <linked-list.h>#include <node.h>#include <agent.h>#define MAX_NAME_SIZE   256struct Edge {  int node1;  int node2;  double wt;  Edge (int n1, int n2, double w) { node1 = n1; node2 = n2; wt = w; }};enum AtEventType {  STOP_SIMULATION,  START_NODE,  STOP_NODE,  START_AGENT,  STOP_AGENT,  SOURCE_AGENT,  PRINT_SIMULATION_STATUS};struct AtEvent {  double at;  AtEventType t;  int node;  int agent;  SourceDistributionType sdt;  int source_burst;  double source_gap;  /*  AtEvent (double at_time, AtEventType tp) {    at = at_time;    t = tp;    } */};struct Attachment {  int agent;  int node;  int atp;  Attachment (int A, int N, AgentType Atp) { agent = A; node = N; atp = Atp; }};struct ParserReturnInfo {  int num_nodes;  int num_agents;  LinkedList<Edge *,int> *edge_list;  LinkedList<Attachment *, int> *attach_list;  LinkedList<AtEvent *, double> *ev_list;};#endif

⌨️ 快捷键说明

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