OPNET_ethcoax实例从基础开始学习.doc

  1. 1、本文档共10页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
OPNET_ethcoax实例从基础开始学习

ADDRESS: /article/details?id=7959940 OPNET学习笔记之ethcoax_net-----mac 发表于2012/9/11 16:16:22 ?2183人阅读 分类:?OPNET ?开始学习 eth_mac_v2??? 状态机如上图所示: ? ? START出口代码???start状态为什么作用是确保地址正确呢?????? /* Obtain the address assigned to this node as it might??*/ /* have changed during auto-addressing.??????*/ op_ima_obj_attr_get (mac_attr_objid, Address, my_32bit_address); /* Store the address as 64-bit integer, since ARP was??*/ /* enhanced to support 48-bit MAC addresses.????*/ my_address = my_32bit_address; /* Register stations MAC address into model-wide ???*/ /* registery, since the address assignment is final now.?*/ oms_pr_attr_set (own_process_record_handle, ?address,????OMSC_PR_INT64,??my_address, ?protocol,????OMSC_PR_STRING,??mac, ?mac_type,????OMSC_PR_STRING,??eth_coax, ?auto address handle,?OMSC_PR_POINTER,?oms_aa_handle, ?OPC_NIL); /* Set the destination as an invalid destination if the MAC?*/ /* is part of a? bridge/switch.????????*/ if (mac_port_of_a_bridge_switch_node == OPC_TRUE) ?oms_aa_dest_status_set (oms_aa_handle, (int) my_address, OmsC_Aa_Invalid_Destination); TX_WAIT入口代码 /* In this state the MAC layer waits for a new?*/ /* frame to arrive from the higher layer.??*/ /* Physical layer events are not of interest and?*/ /* may be masked until frame processing begins.?*/ eth_mac_phys_layer_ignore ();?????一直等待从高层发来的帧?忽略物理层的中断 ? FB中函数定义 static void eth_mac_phys_layer_ignore ()????????????忽略物理层的中断 ?{ ?/** Disable reception of physical layer events. **/ ?FIN (eth_mac_phys_layer_ignore ()); ?op_intrpt_disable (OPC_INTRPT_STAT, DEFERENCE_INSTAT, OPC_FALSE);???? op_intrpt_disable(type,code,next)??next?是boolean型,OPC_TURE只失能以后来的中断//OPC_FALSE?无限制中断来的时间 ?op_intrpt_disable (OPC_INTRPT_STAT, COLLISION_DETECT_INSTAT, OPC_FALSE); ?op_intrpt_disable (OPC_INTRPT_STAT, TRANSMITTING_INSTAT, OPC_FALSE); ?FOUT; ?} ? ? 当有帧到来时??TX_WAIT出口函数 /* Store interrupt related information into???*/??保存中断相关信息?以便以后调用 /* temporary variables for quick access.???*/ intrpt_type = op_intrpt_type (); if

文档评论(0)

xcs88858 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:8130065136000003

1亿VIP精品文档

相关文档