OpenCores
URL https://opencores.org/ocsvn/nocmodel/nocmodel/trunk

Subversion Repositories nocmodel

[/] [nocmodel/] [trunk/] [doc/] [nocmodel.basicmodels.basic_protocol.html] - Rev 2

Compare with Previous | Blame | View Log

 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: class basic_protocol</title>
</head><body bgcolor="#f0f0f8">
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><strong>nocmodel.basicmodels.basic_protocol</strong> = <a name="nocmodel.basicmodels.basic_protocol">class basic_protocol</a>(<a href="nocmodel.noc_base.html#protocol">nocmodel.noc_base.protocol</a>)</font></td></tr>
 
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Basic&nbsp;protocol&nbsp;class<br>
&nbsp;<br>
This&nbsp;class&nbsp;simplify&nbsp;protocol&nbsp;object&nbsp;creation.&nbsp;It&nbsp;defines&nbsp;a&nbsp;simple&nbsp;packet<br>
with&nbsp;the&nbsp;following&nbsp;fields:<br>
&nbsp;<br>
|0&nbsp;&nbsp;&nbsp;7|8&nbsp;&nbsp;15|16&nbsp;&nbsp;31|<br>
|&nbsp;src&nbsp;|&nbsp;dst&nbsp;|&nbsp;data&nbsp;|<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="nocmodel.basicmodels.basic_protocol.html#basic_protocol">basic_protocol</a></dd>
<dd><a href="nocmodel.noc_base.html#protocol">nocmodel.noc_base.protocol</a></dd>
<dd><a href="nocmodel.noc_base.html#nocobject">nocmodel.noc_base.nocobject</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="basic_protocol-__init__"><strong>__init__</strong></a>(self)</dt></dl>
 
<hr>
Methods inherited from <a href="nocmodel.noc_base.html#protocol">nocmodel.noc_base.protocol</a>:<br>
<dl><dt><a name="basic_protocol-get_protocol_ref"><strong>get_protocol_ref</strong></a>(self)</dt></dl>
 
<dl><dt><a name="basic_protocol-newpacket"><strong>newpacket</strong></a>(self, zerodefault<font color="#909090">=True</font>, *args, **kwargs)</dt><dd><tt>Return&nbsp;a&nbsp;new&nbsp;packet&nbsp;with&nbsp;all&nbsp;required&nbsp;fields.<br>
&nbsp;<br>
Arguments:<br>
*&nbsp;zerodefault:&nbsp;If&nbsp;True,&nbsp;all&nbsp;missing&nbsp;fields&nbsp;will&nbsp;be&nbsp;zeroed&nbsp;by&nbsp;default.<br>
&nbsp;&nbsp;If&nbsp;False,&nbsp;a&nbsp;missing&nbsp;value&nbsp;in&nbsp;arguments&nbsp;will&nbsp;throw&nbsp;an&nbsp;exception.<br>
*&nbsp;args:&nbsp;Nameless&nbsp;arguments&nbsp;will&nbsp;add&nbsp;field&nbsp;values&nbsp;based&nbsp;on&nbsp;packet&nbsp;field<br>
&nbsp;&nbsp;order.<br>
*&nbsp;kwargs:&nbsp;Key-based&nbsp;arguments&nbsp;will&nbsp;add&nbsp;specified&nbsp;field&nbsp;values&nbsp;based&nbsp;in&nbsp;<br>
&nbsp;&nbsp;its&nbsp;keys<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
Notes:&nbsp;<br>
*&nbsp;kwargs&nbsp;takes&nbsp;precedence&nbsp;over&nbsp;args:&nbsp;i.e.&nbsp;named&nbsp;arguments&nbsp;can&nbsp;overwrite<br>
&nbsp;&nbsp;nameless&nbsp;arguments.</tt></dd></dl>
 
<dl><dt><a name="basic_protocol-register_packet_generator"><strong>register_packet_generator</strong></a>(self, packet_class)</dt><dd><tt>Register&nbsp;a&nbsp;special&nbsp;packet&nbsp;generator&nbsp;class.<br>
&nbsp;<br>
Must&nbsp;be&nbsp;a&nbsp;derived&nbsp;class&nbsp;of&nbsp;packet</tt></dd></dl>
 
<dl><dt><a name="basic_protocol-update_packet_field"><strong>update_packet_field</strong></a>(self, name, type, bitlen, description<font color="#909090">=''</font>)</dt><dd><tt>Add&nbsp;or&nbsp;update&nbsp;a&nbsp;packet&nbsp;field.<br>
&nbsp;<br>
Arguments<br>
*&nbsp;name<br>
*&nbsp;type:&nbsp;string&nbsp;that&nbsp;can&nbsp;be&nbsp;"int",&nbsp;"fixed"&nbsp;or&nbsp;"float"<br>
*&nbsp;bitlen:&nbsp;bit&nbsp;length&nbsp;of&nbsp;this&nbsp;field<br>
*&nbsp;description:&nbsp;optional&nbsp;description&nbsp;of&nbsp;this&nbsp;field<br>
&nbsp;<br>
Notes:&nbsp;<br>
*&nbsp;Each&nbsp;new&nbsp;field&nbsp;will&nbsp;be&nbsp;added&nbsp;at&nbsp;the&nbsp;end.</tt></dd></dl>
 
</td></tr></table>
</body></html>

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.