📄 goep__apphdrs_8h.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>BlueLab: goep_apphdrs.h File Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.3.8 --><div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a></div><h1>goep_apphdrs.h File Reference</h1>Helper library for GOEP Library clients to assist in adding and retrieving application specific parameters. <a href="#_details">More...</a><p><h2>Parameter Extraction Macros</h2>Macros to extact unsigned integer parameters from the GOEP Header.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign=top><em>result</em> </td><td>Result of the extraction. </td></tr> <tr><td></td><td valign=top><em>param</em> </td><td>Uint8 pointer to the parameter to extract. </td></tr> </table></dl><ul><li>#define <a class="el" href="goep__apphdrs_8h.html#a0">Goep_apphdr_GetUint8</a>(result, param) {result = param[0];}<dl class="el"><dd class="mdescRight">Extract a Uint8 value. <a href="#a0"></a><br></dl><li>#define <a class="el" href="goep__apphdrs_8h.html#a1">Goep_apphdr_GetUint16</a>(result, param) {result = param[0]<<8 | param[1];}<dl class="el"><dd class="mdescRight">Extract a Uint16 value. <a href="#a1"></a><br></dl><li>#define <a class="el" href="goep__apphdrs_8h.html#a2">Goep_apphdr_GetUint32</a>(result, param) {result = (<a class="el" href="csrtypes_8h.html#a3">uint32</a>)(param[0])<<24 | (<a class="el" href="csrtypes_8h.html#a3">uint32</a>)(param[1])<<16 | (<a class="el" href="csrtypes_8h.html#a3">uint32</a>)(param[2])<<8 | (<a class="el" href="csrtypes_8h.html#a3">uint32</a>)(param[3]);}<dl class="el"><dd class="mdescRight">Extract a Uint32 value. <a href="#a2"></a><br></dl><li>#define <a class="el" href="goep__apphdrs_8h.html#a3">Goep_apphdr_GetUint64</a>(res_lo, res_hi, param)<dl class="el"><dd class="mdescRight">Extract a Uint64 value. <a href="#a3"></a><br></dl></ul><h2>Parameter Addition Functions</h2><ul><li><a class="el" href="csrtypes_8h.html#a4">uint16</a> <a class="el" href="goep__apphdrs_8h.html#a4">Goep_apphdr_AddUint8</a> (<a class="el" href="sink___8h.html#a0">Sink</a> snk, <a class="el" href="csrtypes_8h.html#a8">uint8</a> paramID, <a class="el" href="csrtypes_8h.html#a8">uint8</a> param)<dl class="el"><dd class="mdescRight">Add a uint8 parameter to the GOEP Packet. <a href="#a4"></a><br></dl><li><a class="el" href="csrtypes_8h.html#a4">uint16</a> <a class="el" href="goep__apphdrs_8h.html#a5">Goep_apphdr_AddUint16</a> (<a class="el" href="sink___8h.html#a0">Sink</a> snk, <a class="el" href="csrtypes_8h.html#a8">uint8</a> paramID, <a class="el" href="csrtypes_8h.html#a4">uint16</a> param)<dl class="el"><dd class="mdescRight">Add a uint16 parameter to the GOEP Packet. <a href="#a5"></a><br></dl><li><a class="el" href="csrtypes_8h.html#a4">uint16</a> <a class="el" href="goep__apphdrs_8h.html#a6">Goep_apphdr_AddUint32</a> (<a class="el" href="sink___8h.html#a0">Sink</a> snk, <a class="el" href="csrtypes_8h.html#a8">uint8</a> paramID, <a class="el" href="csrtypes_8h.html#a3">uint32</a> param)<dl class="el"><dd class="mdescRight">Add a uint32 parameter to the GOEP Packet. <a href="#a6"></a><br></dl><li><a class="el" href="csrtypes_8h.html#a4">uint16</a> <a class="el" href="goep__apphdrs_8h.html#a7">Goep_apphdr_AddUint64</a> (<a class="el" href="sink___8h.html#a0">Sink</a> snk, <a class="el" href="csrtypes_8h.html#a8">uint8</a> paramID, <a class="el" href="csrtypes_8h.html#a3">uint32</a> param_lo, <a class="el" href="csrtypes_8h.html#a3">uint32</a> param_hi)<dl class="el"><dd class="mdescRight">Add a uint64 parameter to the GOEP Packet. <a href="#a7"></a><br></dl><li><a class="el" href="csrtypes_8h.html#a4">uint16</a> <a class="el" href="goep__apphdrs_8h.html#a8">Goep_apphdr_AddBuffer</a> (<a class="el" href="sink___8h.html#a0">Sink</a> snk, <a class="el" href="csrtypes_8h.html#a8">uint8</a> paramID, const <a class="el" href="csrtypes_8h.html#a8">uint8</a> *param, <a class="el" href="csrtypes_8h.html#a8">uint8</a> size_param)<dl class="el"><dd class="mdescRight">Add a buffer parameter to the GOEP Packet. <a href="#a8"></a><br></dl></ul><h2>Parameter Extraction Functions</h2>Functions to Retrieve Application Specific Parameters.<p>To retrieve the application specific parameters from the GOEP header, first call Goep_apphdr_GetCreateWS to create a workspace to track the extraction process. Then iteratively call Goep_apphdr_GetParameter to find the next parameter in the header. The macros Goep_apphdr_GetUintXX can be used to extract unsigned integer values. When all the parameters have been extracted, call Goep_apphdr_GetDestroyWS to clean up the resources being used.<p>Algorithm :- <pre> ws = Goep_apphdr_GetCreateWS(src, offset, length); if (!ws) { -- Perform error handling -- } else { bool fin; do { fin = Goep_apphdr_GetParameter(ws, &paramID, &param, &size_param); -- Process parameter as required -- } while (!fin) Goep_apphdr_GetDestroyWS(ws); }</pre> <ul><li>void * <a class="el" href="goep__apphdrs_8h.html#a9">Goep_apphdr_GetCreateWS</a> (<a class="el" href="source___8h.html#a0">Source</a> src, <a class="el" href="csrtypes_8h.html#a4">uint16</a> offset, <a class="el" href="csrtypes_8h.html#a4">uint16</a> length)<dl class="el"><dd class="mdescRight">Create a workspace to get Application Specific Parameters. <a href="#a9"></a><br></dl><li><a class="el" href="csrtypes_8h.html#a9">bool</a> <a class="el" href="goep__apphdrs_8h.html#a10">Goep_apphdr_GetParameter</a> (void *workspace, <a class="el" href="csrtypes_8h.html#a8">uint8</a> *paramID, <a class="el" href="csrtypes_8h.html#a4">uint16</a> *param, <a class="el" href="csrtypes_8h.html#a8">uint8</a> *size_param)<dl class="el"><dd class="mdescRight">Get the next paramter from the GOEP header. <a href="#a10"></a><br></dl><li>void <a class="el" href="goep__apphdrs_8h.html#a11">Goep_apphdr_GetDestroyWS</a> (void *workspace)<dl class="el"><dd class="mdescRight">Destroy the workspace for Application Specific Parameter retrieval. <a href="#a11"></a><br></dl></ul><hr><a name="_details"></a><h2>Detailed Description</h2>Helper library for GOEP Library clients to assist in adding and retrieving application specific parameters. <p>Library Dependecies : None<hr><h2>Define Documentation</h2><a class="anchor" name="a0" doxytag="goep_apphdrs.h::Goep_apphdr_GetUint8" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> #define Goep_apphdr_GetUint8 </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">result, <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap>param </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> {result = param[0];}</td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Extract a Uint8 value. <p> </td> </tr></table><a class="anchor" name="a1" doxytag="goep_apphdrs.h::Goep_apphdr_GetUint16" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> #define Goep_apphdr_GetUint16 </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">result, <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap>param </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> {result = param[0]<<8 | param[1];}</td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Extract a Uint16 value. <p> </td> </tr></table><a class="anchor" name="a2" doxytag="goep_apphdrs.h::Goep_apphdr_GetUint32" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> #define Goep_apphdr_GetUint32 </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">result, <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap>param </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> {result = (<a class="el" href="csrtypes_8h.html#a3">uint32</a>)(param[0])<<24 | (<a class="el" href="csrtypes_8h.html#a3">uint32</a>)(param[1])<<16 | (<a class="el" href="csrtypes_8h.html#a3">uint32</a>)(param[2])<<8 | (<a class="el" href="csrtypes_8h.html#a3">uint32</a>)(param[3]);}</td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Extract a Uint32 value. <p> </td> </tr></table><a class="anchor" name="a3" doxytag="goep_apphdrs.h::Goep_apphdr_GetUint64" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> #define Goep_apphdr_GetUint64 </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">res_lo, <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap>res_hi, <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap>param </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p><b>Value:</b><pre class="fragment"><div>{res_hi = (<a class="code" href="csrtypes_8h.html#a3">uint32</a>)(param[0])<<24 | (<a class="code" href="csrtypes_8h.html#a3">uint32</a>)(param[1])<<16 | (<a class="code" href="csrtypes_8h.html#a3">uint32</a>)(param[2])<<8 | (<a class="code" href="csrtypes_8h.html#a3">uint32</a>)(param[3]); \ res_lo = (<a class="code" href="csrtypes_8h.html#a3">uint32</a>)(param[4])<<24 | (<a class="code" href="csrtypes_8h.html#a3">uint32</a>)(param[5])<<16 | (<a class="code" href="csrtypes_8h.html#a3">uint32</a>)(param[6])<<8 | (<a class="code" href="csrtypes_8h.html#a3">uint32</a>)(param[7]);}</div></pre>Extract a Uint64 value. <p> </td> </tr></table><hr><h2>Function Documentation</h2><a class="anchor" name="a4" doxytag="goep_apphdrs.h::Goep_apphdr_AddUint8" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> <a class="el" href="csrtypes_8h.html#a4">uint16</a> Goep_apphdr_AddUint8 </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="sink___8h.html#a0">Sink</a> </td> <td class="mdname" nowrap> <em>snk</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap><a class="el" href="csrtypes_8h.html#a8">uint8</a> </td> <td class="mdname" nowrap> <em>paramID</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap><a class="el" href="csrtypes_8h.html#a8">uint8</a> </td> <td class="mdname" nowrap> <em>param</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Add a uint8 parameter to the GOEP Packet. <p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign=top><em>snk</em> </td><td>Sink to add the parameter to </td></tr> <tr><td></td><td valign=top><em>paramID</em> </td><td>Identifier of the parameter </td></tr> <tr><td></td><td valign=top><em>param</em> </td><td>Actual parameter to add</td></tr> </table></dl>Returns length used to add the paramter. Zero (0) is returned on error. </td> </tr></table><a class="anchor" name="a5" doxytag="goep_apphdrs.h::Goep_apphdr_AddUint16" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> <a class="el" href="csrtypes_8h.html#a4">uint16</a> Goep_apphdr_AddUint16 </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="sink___8h.html#a0">Sink</a> </td> <td class="mdname" nowrap> <em>snk</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap><a class="el" href="csrtypes_8h.html#a8">uint8</a> </td> <td class="mdname" nowrap> <em>paramID</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap><a class="el" href="csrtypes_8h.html#a4">uint16</a> </td> <td class="mdname" nowrap> <em>param</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Add a uint16 parameter to the GOEP Packet. <p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign=top><em>snk</em> </td><td>Sink to add the parameter to </td></tr> <tr><td></td><td valign=top><em>paramID</em> </td><td>Identifier of the parameter </td></tr> <tr><td></td><td valign=top><em>param</em> </td><td>Actual parameter to add</td></tr> </table></dl>Returns length used to add the paramter. Zero (0) is returned on error. </td> </tr></table><a class="anchor" name="a6" doxytag="goep_apphdrs.h::Goep_apphdr_AddUint32" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> <a class="el" href="csrtypes_8h.html#a4">uint16</a> Goep_apphdr_AddUint32 </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="sink___8h.html#a0">Sink</a> </td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -