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

Subversion Repositories nocmodel

[/] [nocmodel/] [trunk/] [doc/] [nocmodel.basicmodels.basic_protocol.html] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 dargor
 
2
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
3
<html><head><title>Python: class basic_protocol</title>
4
</head><body bgcolor="#f0f0f8">
5
<p>
6
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
7
<tr bgcolor="#ffc8d8">
8
<td colspan=3 valign=bottom>&nbsp;<br>
9
<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>
10
 
11
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
12
<td colspan=2><tt>Basic&nbsp;protocol&nbsp;class<br>
13
&nbsp;<br>
14
This&nbsp;class&nbsp;simplify&nbsp;protocol&nbsp;object&nbsp;creation.&nbsp;It&nbsp;defines&nbsp;a&nbsp;simple&nbsp;packet<br>
15
with&nbsp;the&nbsp;following&nbsp;fields:<br>
16
&nbsp;<br>
17
|0&nbsp;&nbsp;&nbsp;7|8&nbsp;&nbsp;15|16&nbsp;&nbsp;31|<br>
18
|&nbsp;src&nbsp;|&nbsp;dst&nbsp;|&nbsp;data&nbsp;|<br>&nbsp;</tt></td></tr>
19
<tr><td>&nbsp;</td>
20
<td width="100%"><dl><dt>Method resolution order:</dt>
21
<dd><a href="nocmodel.basicmodels.basic_protocol.html#basic_protocol">basic_protocol</a></dd>
22
<dd><a href="nocmodel.noc_base.html#protocol">nocmodel.noc_base.protocol</a></dd>
23
<dd><a href="nocmodel.noc_base.html#nocobject">nocmodel.noc_base.nocobject</a></dd>
24
</dl>
25
<hr>
26
Methods defined here:<br>
27
<dl><dt><a name="basic_protocol-__init__"><strong>__init__</strong></a>(self)</dt></dl>
28
 
29
<hr>
30
Methods inherited from <a href="nocmodel.noc_base.html#protocol">nocmodel.noc_base.protocol</a>:<br>
31
<dl><dt><a name="basic_protocol-get_protocol_ref"><strong>get_protocol_ref</strong></a>(self)</dt></dl>
32
 
33
<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>
34
&nbsp;<br>
35
Arguments:<br>
36
*&nbsp;zerodefault:&nbsp;If&nbsp;True,&nbsp;all&nbsp;missing&nbsp;fields&nbsp;will&nbsp;be&nbsp;zeroed&nbsp;by&nbsp;default.<br>
37
&nbsp;&nbsp;If&nbsp;False,&nbsp;a&nbsp;missing&nbsp;value&nbsp;in&nbsp;arguments&nbsp;will&nbsp;throw&nbsp;an&nbsp;exception.<br>
38
*&nbsp;args:&nbsp;Nameless&nbsp;arguments&nbsp;will&nbsp;add&nbsp;field&nbsp;values&nbsp;based&nbsp;on&nbsp;packet&nbsp;field<br>
39
&nbsp;&nbsp;order.<br>
40
*&nbsp;kwargs:&nbsp;Key-based&nbsp;arguments&nbsp;will&nbsp;add&nbsp;specified&nbsp;field&nbsp;values&nbsp;based&nbsp;in&nbsp;<br>
41
&nbsp;&nbsp;its&nbsp;keys<br>
42
&nbsp;&nbsp;&nbsp;&nbsp;<br>
43
Notes:&nbsp;<br>
44
*&nbsp;kwargs&nbsp;takes&nbsp;precedence&nbsp;over&nbsp;args:&nbsp;i.e.&nbsp;named&nbsp;arguments&nbsp;can&nbsp;overwrite<br>
45
&nbsp;&nbsp;nameless&nbsp;arguments.</tt></dd></dl>
46
 
47
<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>
48
&nbsp;<br>
49
Must&nbsp;be&nbsp;a&nbsp;derived&nbsp;class&nbsp;of&nbsp;packet</tt></dd></dl>
50
 
51
<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>
52
&nbsp;<br>
53
Arguments<br>
54
*&nbsp;name<br>
55
*&nbsp;type:&nbsp;string&nbsp;that&nbsp;can&nbsp;be&nbsp;"int",&nbsp;"fixed"&nbsp;or&nbsp;"float"<br>
56
*&nbsp;bitlen:&nbsp;bit&nbsp;length&nbsp;of&nbsp;this&nbsp;field<br>
57
*&nbsp;description:&nbsp;optional&nbsp;description&nbsp;of&nbsp;this&nbsp;field<br>
58
&nbsp;<br>
59
Notes:&nbsp;<br>
60
*&nbsp;Each&nbsp;new&nbsp;field&nbsp;will&nbsp;be&nbsp;added&nbsp;at&nbsp;the&nbsp;end.</tt></dd></dl>
61
 
62
</td></tr></table>
63
</body></html>

powered by: WebSVN 2.1.0

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