ch07s06.html 8.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Message Debug Functions</title><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><meta name="keywords" content="Intellon, Atheros, Qualcomm, HomePlug, powerline, communications, INT6000, INT6300, INT6400, AR7400, AR7420"><link rel="home" href="index.html" title="Qualcomm Atheros Open Powerline Toolkit"><link rel="up" href="ch07.html" title="Chapter 7.  Support Function Reference"><link rel="prev" href="ch07s05.html" title="Generic Functions"><link rel="next" href="ch07s07.html" title="Key Generation Functions"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">
  2. Message Debug Functions
  3. </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch07s05.html">Prev</a> </td><th width="60%" align="center">Chapter 7. 
  4. Support Function Reference
  5. </th><td width="20%" align="right"> <a accesskey="n" href="ch07s07.html">Next</a></td></tr></table><hr></div><div class="section" title="Message Debug Functions"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="support-message"></a>
  6. Message Debug Functions
  7. </h2></div></div></div><p>
  8. Message debug functions are not needed for proper toolkit operation but they can be useful during development, debugging and testing phases of product development. They are specific to HomePlug AV messages only.
  9. </p><div class="section" title="MMECode"><div class="titlepage"><div><div><h3 class="title"><a name="support-mmecode"></a>
  10. MMECode
  11. </h3></div></div></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">char const * <b class="fsfunc">MMECode</b>(</code></td><td><var class="pdparam">MMTYPE</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">MSTATUS</var><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>uint16_t <var class="pdparam">MMTYPE</var></code>;<br><code>uint8_t <var class="pdparam">MSTATUS</var></code>;</div><div class="funcprototype-spacer"> </div></div><p>
  12. Return text that explains the status code for a given Atheros vendor-specific management message. Argument <code class="varname">MMTYPE</code> is an unsigned integer in the range <code class="constant">0xA000</code> through <code class="constant">0xAFFF</code> and must exactly match the <code class="varname">MMTYPE</code> of the message returning the status code. For example, the <code class="varname">CNF</code> variant of a message is currently the only variant that has an <code class="varname">MSTATUS</code> field and so other variants return a default string. The function is declared in <a class="ulink" href="mme.h.html" target="_top">mme.h</a> and defined in <a class="ulink" href="MMECode.c.html" target="_top">MMECode.c</a>.
  13. </p><p>
  14. Inclusion of this function can increase application size by 3kb because the text associated with all Atheros vendor-specific management messages and errors are included whether needed or not. Conditional compilation statements are provided internally to suppress the full table with a terse substitute.
  15. </p><p>
  16. Although the <span class="application">Bootloader</span> and firmware share some common Vendor Specific Management Messages, the two programs may return different codes for a given message and error condition. Where there are conflicts, Bootloader codes take precedence over firmware codes because it is unlikely that users will .issue the same messages to a device running firmware.
  17. </p></div><div class="section" title="MMEMode"><div class="titlepage"><div><div><h3 class="title"><a name="support-mmemode"></a>
  18. MMEMode
  19. </h3></div></div></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">char const * <b class="fsfunc">MMEMode</b>(</code></td><td><var class="pdparam">MMTYPE</var><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>uint16_t <var class="pdparam">MMTYPE</var></code>;</div><div class="funcprototype-spacer"> </div></div><p>
  20. Return the mode of a given management message type as a string. The mode is determined by the two least significant bits of argument <code class="varname">MMTYPE</code>. The mode string will be one of <span class="quote">“<span class="quote">REQ</span>”</span>, <span class="quote">“<span class="quote">CNF</span>”</span>, <span class="quote">“<span class="quote">IND</span>”</span> or <span class="quote">“<span class="quote">RSP</span>”</span>. The function is declared in <a class="ulink" href="ihp.h.html" target="_top">ihp.h</a> and defined in <a class="ulink" href="MMEMode.c.html" target="_top">MMEMode.c</a>.
  21. </p><p>
  22. Most management messages have a request and a confirmation variant while a few have an indication and a response variant. Requests originate from the host and are acknolwedged by a confirmation from the device. Indications originate from a device and are acknowledged by a response from the host.
  23. </p></div><div class="section" title="MMEName"><div class="titlepage"><div><div><h3 class="title"><a name="support-mmename"></a>
  24. MMEName
  25. </h3></div></div></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">char const * <b class="fsfunc">MMEName</b>(</code></td><td><var class="pdparam">MMTYPE</var><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>uint16_t <var class="pdparam">MMTYPE</var></code>;</div><div class="funcprototype-spacer"> </div></div><p>
  26. Return the name associated with a given management message type. The name is the mnemonic used to distinguish one message type from another in the <em class="citetitle">HomePlug AV Specification</em> or Atheros <em class="citetitle">Firwmare Technical Reference Manual</em>. Argument <code class="varname">MMTYPE</code> is an unsigned integer in the range <code class="constant">0x0000</code> through <code class="constant">0xAFFF</code>. The request, confirmation, indication and response variants of a management message will all return the same message name. The function is declared in <a class="ulink" href="mme.h.html" target="_top">mme.h</a> and defined in <a class="ulink" href="MMEName.c.html" target="_top">MMEName.c</a>.
  27. </p></div><div class="section" title="MMEPeek"><div class="titlepage"><div><div><h3 class="title"><a name="support-mmepeek"></a>
  28. MMEPeek
  29. </h3></div></div></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">MMEPeek</b>(</code></td><td><var class="pdparam">memory</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">extent</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">fp</var><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>void const * <var class="pdparam">memory</var></code>;<br><code>size_t <var class="pdparam">extent</var></code>;<br><code>FILE *<var class="pdparam">fp</var></code>;</div><div class="funcprototype-spacer"> </div></div><p>
  30. Prints an Atheros vendor-specific management message to stream <code class="constant">fp</code> in human readable format. Argument <code class="varname">buffer</code> is the message address and argument <code class="varname">extent</code> is the message extent in bytes. Output consists of a formatted header showing decoded header. The function is declared in <a class="ulink" href="mme.h.html" target="_top">mme.h</a> and defined in <a class="ulink" href="MMEPeek.c.html" target="_top">MMEPeek.c</a>.
  31. </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch07s05.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch07.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch07s07.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">
  32. Generic Functions
  33.  </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 
  34. Key Generation Functions
  35. </td></tr></table></div></body></html>