• 大小: 223KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-17
  • 语言: 其他
  • 标签: OPNET  aloha  s_aloha  

资源简介

利用OPNET软件进行S_ALOHA协议的仿真,对于初学OPNET的同学来讲是个不错的例子

资源截图

代码片段和文件信息

/* Process model C form file: acb_fifo_s_aloha.pr.c */
/* Portions of this file copyright 1986-2008 by OPNET Technologies Inc. */



/* This variable carries the header into the object file */
const char acb_fifo_s_aloha_pr_c [] = “MIL_3_Tfile_Hdr_ 145A 30A op_runsim 7 4EEB4B43 4EEB4B43 1 PC-201110121605 Administrator 0 0 none none 0 0 none 0 0 0 0 0 0 0 0 1bcc 1                                                                                                                                                                                                                                                                                                                                                                                          “;
#include 



/* OPNET system definitions */
#include 



/* Header Block */

#define QUEUE_EMPTY     (op_q_empty ())
#define SVC_COMPLETION  op_intrpt_type () == OPC_INTRPT_SELF
#define ARRIVAL         op_intrpt_type () == OPC_INTRPT_STRM

#define T_OK            t_ok == 1

/* End of Header Block */

#if !defined (VOSD_NO_FIN)
#undef BIN
#undef BOUT
#define BIN FIN_LOCAL_FIELD(_op_last_line_passed) = __LINE__ - _op_block_origin;
#define BOUT BIN
#define BINIT FIN_LOCAL_FIELD(_op_last_line_passed) = 0; _op_block_origin = __LINE__;
#else
#define BINIT
#endif /* #if !defined (VOSD_NO_FIN) */



/* State variable definitions */
typedef struct
{
/* Internal state tracking for FSM */
FSM_SYS_STATE
/* State Variables */
int                      server_busy                                     ;
double                   service_rate                                    ;
Objid                    own_id                                          ;
int                      t_ok                                            ;
} acb_fifo_s_aloha_state;

#define server_busy              op_sv_ptr->server_busy
#define service_rate             op_sv_ptr->service_rate
#define own_id                   op_sv_ptr->own_id
#define t_ok                     op_sv_ptr->t_ok

/* These macro definitions will define a local variable called */
/* “op_sv_ptr“ in each function containing a FIN statement. */
/* This variable points to the state variable data structure */
/* and can be used from a C debugger to display their values. */
#undef FIN_PREAMBLE_DEC
#undef FIN_PREAMBLE_CODE
#define FIN_PREAMBLE_DEC acb_fifo_s_aloha_state *op_sv_ptr;
#define FIN_PREAMBLE_CODE \
op_sv_ptr = ((acb_fifo_s_aloha_state *)(OP_SIM_CONTEXT_PTR->_op_mod_state_ptr));


/* No Function Block */

#if !defined (VOSD_NO_FIN)
enum { _op_block_origin = __LINE__ };
#endif

/* Undefine optional tracing in FIN/FOUT/FRET */
/* The FSM has its own tracing code and the other */
/* functions should not have any tracing.   */
#undef FIN_TRACING
#define FIN_TRACING

#undef FOUTRET_TRACING
#define FOUTRET_TRACING

#if defined (__cplusplus)
extern “C“ {
#endif
void

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      43440  2011-12-16 21:44  s_aloha\acb_fifo_s_aloha.dev32.i0.pr.obj

     文件      13509  2011-12-16 21:44  s_aloha\acb_fifo_s_aloha.pr.c

     文件       7145  2011-11-18 12:41  s_aloha\acb_fifo_s_aloha.pr.m

     文件       1472  2011-11-05 17:50  s_aloha\link_s_aloha.lk.m

     文件      39981  2011-12-16 21:52  s_aloha\network_s_aloha_1.project\network_s_aloha_1-s_aloha-DES-1.desinfo

     文件       1307  2011-12-16 21:44  s_aloha\network_s_aloha_1.project\network_s_aloha_1-s_aloha-DES-1.ef

     文件       3595  2011-12-16 21:52  s_aloha\network_s_aloha_1.project\network_s_aloha_1-s_aloha-DES-1.olf.dir\1956_12-16-2011_13.44.34.ot

     文件        421  2011-12-16 21:52  s_aloha\network_s_aloha_1.project\network_s_aloha_1-s_aloha-DES-1.olf.dir\log_info

     文件       1033  2011-12-16 21:52  s_aloha\network_s_aloha_1.project\network_s_aloha_1-s_aloha-DES-1.ov

     文件      39959  2011-11-18 12:41  s_aloha\network_s_aloha_1.project\network_s_aloha_1-s_aloha-DES-10.desinfo

     文件       1191  2011-11-18 12:41  s_aloha\network_s_aloha_1.project\network_s_aloha_1-s_aloha-DES-10.ef

     文件       2892  2011-11-18 12:41  s_aloha\network_s_aloha_1.project\network_s_aloha_1-s_aloha-DES-10.olf.dir\4888_11-18-2011_04.41.37.ot

     文件        421  2011-11-18 12:41  s_aloha\network_s_aloha_1.project\network_s_aloha_1-s_aloha-DES-10.olf.dir\log_info

     文件       1031  2011-11-18 12:41  s_aloha\network_s_aloha_1.project\network_s_aloha_1-s_aloha-DES-10.ov

     文件      39959  2011-11-18 12:41  s_aloha\network_s_aloha_1.project\network_s_aloha_1-s_aloha-DES-11.desinfo

     文件       1191  2011-11-18 12:41  s_aloha\network_s_aloha_1.project\network_s_aloha_1-s_aloha-DES-11.ef

     文件       2892  2011-11-18 12:41  s_aloha\network_s_aloha_1.project\network_s_aloha_1-s_aloha-DES-11.olf.dir\7116_11-18-2011_04.41.39.ot

     文件        421  2011-11-18 12:41  s_aloha\network_s_aloha_1.project\network_s_aloha_1-s_aloha-DES-11.olf.dir\log_info

     文件       1031  2011-11-18 12:41  s_aloha\network_s_aloha_1.project\network_s_aloha_1-s_aloha-DES-11.ov

     文件      39959  2011-11-18 12:41  s_aloha\network_s_aloha_1.project\network_s_aloha_1-s_aloha-DES-12.desinfo

     文件       1191  2011-11-18 12:41  s_aloha\network_s_aloha_1.project\network_s_aloha_1-s_aloha-DES-12.ef

     文件       2892  2011-11-18 12:41  s_aloha\network_s_aloha_1.project\network_s_aloha_1-s_aloha-DES-12.olf.dir\2204_11-18-2011_04.41.40.ot

     文件        421  2011-11-18 12:41  s_aloha\network_s_aloha_1.project\network_s_aloha_1-s_aloha-DES-12.olf.dir\log_info

     文件       1031  2011-11-18 12:41  s_aloha\network_s_aloha_1.project\network_s_aloha_1-s_aloha-DES-12.ov

     文件      39982  2011-12-16 21:44  s_aloha\network_s_aloha_1.project\network_s_aloha_1-s_aloha-DES-2.desinfo

     文件       1283  2011-12-16 21:44  s_aloha\network_s_aloha_1.project\network_s_aloha_1-s_aloha-DES-2.ef

     文件       3595  2011-12-16 21:44  s_aloha\network_s_aloha_1.project\network_s_aloha_1-s_aloha-DES-2.olf.dir\2424_12-16-2011_13.44.27.ot

     文件        421  2011-12-16 21:44  s_aloha\network_s_aloha_1.project\network_s_aloha_1-s_aloha-DES-2.olf.dir\log_info

     文件       1032  2011-12-16 21:44  s_aloha\network_s_aloha_1.project\network_s_aloha_1-s_aloha-DES-2.ov

     文件      39982  2011-12-16 21:44  s_aloha\network_s_aloha_1.project\network_s_aloha_1-s_aloha-DES-3.desinfo

............此处省略71个文件信息

评论

共有 条评论