<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">

<html>

<head>
<title>NaturalAccess GR303 and V5 Libraries Developer's Manual: NMS_GR303SetTrace </title>
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
<meta name=NMSConversion content="4.0.8">
<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">
<link rel="stylesheet" href="dialogic_ns.css"><script type="text/javascript" language="JavaScript" title="WebHelpSplitCss">
<!--
if (navigator.appName !="Netscape")
{   document.write("<link rel='stylesheet' href='dialogic.css'>");}
//-->
</script>
<style type="text/css">
<!--
table.whs1 { width:100%;   x-border-left:1px table-solid; x-border-top:1px table-solid; x-border-right:1px table-solid; x-border-bottom:1px table-solid; border-collapse:separate; border-spacing:0px; }
col.whs2 { width:21.581%; }
col.whs3 { width:78.419%; }
td.whs4 { background-color:#CCCCCC; vertical-align:top;   padding-right:10px; padding-left:10px; }
p.whs5 { font-weight:bold; }
td.whs6 { background-color:#ffffff; vertical-align:top;   padding-right:10px; padding-left:10px; }
p.whs7 { font-style:italic; font-weight:bold; }
col.whs8 { width:27.604%; }
col.whs9 { width:72.396%; }
table.whs10 {   x-border-left:1px table-solid; x-border-top:1px table-solid; x-border-right:1px table-solid; x-border-bottom:1px table-solid; border-collapse:separate; border-spacing:0px; width:100%; }
col.whs11 { width:30.678%; }
col.whs12 { width:69.322%; }
tr.whs13 { background-color:#CCCCCC; x-cell-content-align:top; vertical-align:top; }
td.whs14 { vertical-align:top; padding-left:5px;  padding-right:5px;  }
tr.whs15 { x-cell-content-align:top; vertical-align:top; }
col.whs16 { width:14.868%; }
col.whs17 { width:85.132%; }
col.whs18 { width:33.333%; }
col.whs19 { width:9.996%; }
col.whs20 { width:56.671%; }
div.whs21 { width:100%; }
p.whs22 { text-align:center; }
p.whs23 { text-align:center; font-size:xx-small; }
-->
</style><script type="text/javascript" language="JavaScript">
<!--
if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4))
{
  var strNSS = "<style type='text/css'>";
  strNSS += "p.whs23 {font-size:x-small; }";
  strNSS +="</style>";
  document.write(strNSS);
}
//-->
</script>
<script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">
<!--
function reDo() {
  if (innerWidth != origWidth || innerHeight != origHeight)
     location.reload();
}
if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {
	origWidth = innerWidth;
	origHeight = innerHeight;
	onresize = reDo;
}
onerror = null; 
//-->
</script>
<style type="text/css">
<!--
div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }
-->
</style><script type="text/javascript" language="javascript1.2" src="whmsg.js"></script>
<script type="text/javascript" language="javascript" src="whver.js"></script>
<script type="text/javascript" language="javascript1.2" src="whproxy.js"></script>
<script type="text/javascript" language="javascript1.2" src="whutils.js"></script>
<script type="text/javascript" language="javascript1.2" src="whtopic.js"></script>
</head>
<body><script type="text/javascript" language="javascript1.2">
<!--
if (window.gbWhTopic)
{
	if (window.addTocInfo)
	{
	addTocInfo("NMS GR303 function reference\nNMS_GR303SetTrace");
addAvenueInfo("Untitled","nmsgr303resetds1status.html","nmsgr303startinterface.html");
addButton("show",BTN_TEXT,"Show table of contents for this manual","","","","",0,0,"","","");

	}
	if (window.writeBtnStyle)
		writeBtnStyle();

	if (window.writeIntopicBar)
		writeIntopicBar(1);

	if (window.setRelStartPage)
	{
	setRelStartPage("default.htm");

		autoSync(1);
		sendSyncInfo();
		sendAveInfoOut();
	}
}
else
	if (window.gbIE4)
		document.location.reload();
//-->
</script>
<h1>NMS_GR303SetTrace</h1>

<p>Configures NMS GR303 library tracing.</p>

<h4>Prototype</h4>

<p>NMS_GR303_RESULT_T <span style="font-weight: bold;"><B>NMS_GR303SetTrace</B></span> 
 ( NMS_GR303_TRACEMASK_T <span style="font-style: italic; font-weight: bold;"><I><B>trace_mask</B></I></span>, 
 NMS_GR303_TRACE_CALLBACK_T <span style="font-style: italic; font-weight: bold;"><I><B>user_trace_callback</B></I></span>, 
 void <span style="font-style: italic; font-weight: bold;"><I><B>*user_trace_buffer</B></I></span>, 
 DWORD <span style="font-style: italic; font-weight: bold;"><I><B>user_trace_buffersize</B></I></span>, 
 char <span style="font-style: italic; font-weight: bold;"><I><B>*user_file_name</B></I></span>)</p>

<table cellpadding="5" x-use-null-cells cellspacing="0" width="100%" border="1" class="whs1">
<col class="whs2">
<col class="whs3">

<tr>
<td bgcolor="#CCCCCC" width="21.581%" class="whs4">
<p class="whs5">Argument</p></td>
<td bgcolor="#CCCCCC" width="78.419%" class="whs4">
<p class="whs5">Description</p></td></tr>

<tr>
<td bgcolor="#FFFFFF" width="21.581%" class="whs6">
<p class="whs7">trace_mask</p></td>
<td bgcolor="#FFFFFF" width="78.419%" class="whs6">
<p>Trace mask controlling the information level reported to the application. 
 Refer to the <a href="#Details">Details</a> section for a list of trace 
 masks that applications can specify.</p></td></tr>

<tr>
<td bgcolor="#FFFFFF" width="21.581%" class="whs6">
<p class="whs7">user_trace_callback</p></td>
<td bgcolor="#FFFFFF" width="78.419%" class="whs6">
<p>Pointer to an application-defined callback function. Set this value 
 to NULL if the library is saving tracing information to a file. The library 
 uses this callback function when it has a trace buffer to pass to the 
 application. The callback function is defined in the following way:</p>
<p class=Example>typedef&nbsp;void&nbsp;(*NMS_GR303_TRACE_CALLBACK_T)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(char&nbsp;*tracebuffer,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DWORD&nbsp;datasize);</p>
<p>See the <a href="#Details">Details</a> section for field descriptions.</p></td></tr>

<tr>
<td colspan="1" rowspan="1" bgcolor="#FFFFFF" width="21.581%" class="whs6">
<p class="whs7">user_trace_buffer</p></td>
<td colspan="1" rowspan="1" bgcolor="#FFFFFF" width="78.419%" class="whs6">
<p>Pointer to the application-allocated memory that the NMS GR303 library 
 uses to pass trace data to the application.</p></td></tr>

<tr>
<td colspan="1" rowspan="1" bgcolor="#FFFFFF" width="21.581%" class="whs6">
<p class="whs7">user_trace_buffersize</p></td>
<td colspan="1" rowspan="1" bgcolor="#FFFFFF" width="78.419%" class="whs6">
<p>Size of the application-allocated buffer specified by <span style="font-style: italic; font-weight: bold;"><I><B>user_trace_buffer</B></I></span>. 
 The minimum requirement for the <span style="font-style: italic; font-weight: bold;"><I><B>user_trace_buffersize</B></I></span> 
 is set by NMS_GR303_MIN_TRACE_BUF_SIZE.</p></td></tr>

<tr>
<td colspan="1" rowspan="1" bgcolor="#FFFFFF" width="21.581%" class="whs6">
<p class="whs7">user_file_name</p></td>
<td colspan="1" rowspan="1" bgcolor="#FFFFFF" width="78.419%" class="whs6">
<p>Pointer to the name of the log file if the NMS GR3030 library is logging 
 trace information in a file. This value specifies the size of the trace 
 blocks that the library uses to write to the file.</p></td></tr>
</table><br>

<h4>Return values</h4>

<table cellpadding="5" x-use-null-cells cellspacing="0" width="100%" border="1" class="whs1">
<col class="whs8">
<col class="whs9">

<tr>
<td bgcolor="#CCCCCC" width="27.604%" class="whs4">
<p class="whs5">Return value</p></td>
<td bgcolor="#CCCCCC" width="72.396%" class="whs4">
<p class="whs5">Description</p></td></tr>

<tr>
<td bgcolor="#FFFFFF" width="27.604%" class="whs6">
<p>NMSGR303_SUCCESS</p></td>
<td bgcolor="#FFFFFF" width="72.396%" class="whs6">
<p>&nbsp;</p></td></tr>

<tr>
<td bgcolor="#FFFFFF" width="27.604%" class="whs6">
<p>NMSGR303_INTERNAL_FAILURE</p></td>
<td bgcolor="#FFFFFF" width="72.396%" class="whs6">
<p>Failed to set up tracing.</p></td></tr>

<tr>
<td colspan="1" rowspan="1" bgcolor="#FFFFFF" width="27.604%" class="whs6">
<p>NMSGR303_INVALID_PARMS</p></td>
<td colspan="1" rowspan="1" bgcolor="#FFFFFF" width="72.396%" class="whs6">
<p>Invalid function arguments.</p></td></tr>

<tr>
<td colspan="1" rowspan="1" bgcolor="#FFFFFF" width="27.604%" class="whs6">
<p>NMSGR303_NOT_INITIALIZED</p></td>
<td colspan="1" rowspan="1" bgcolor="#FFFFFF" width="72.396%" class="whs6">
<p>NMS GR303 library was not initialized with <a href="nmsgr303initialize.html"><span 
 style="color: #0000ff;
		font-weight: bold;
		x-text-underline: off;
		/*begin!kadov{{*/ text-decoration: none; /*}}end!kadov*/ "><font color=blue ><B>NMS_GR303Initialize</B></font></span></a>.</p></td></tr>
</table><br>

<h4><a name=Details></a>Details</h4>

<p>Applications can use <span style="font-weight: bold;"><B>NMS_GR303SetTrace</B></span> 
 to configure the NMS GR303 library to return trace information through 
 a defined callback function, or to log trace information into a specified 
 file.</p>

<p>Applications can specify the following trace masks:</p>

<table cellpadding="5" x-use-null-cells width="100%" cellspacing="0" border="1" class="whs10">
<col class="whs11">
<col class="whs12">

<tr bgcolor="#CCCCCC" valign="top" class="whs13">
<td width="30.678%" class="whs14">
<p class="whs5">Trace mask</p></td>
<td width="69.322%" class="whs14">
<p class="whs5">Description</p></td></tr>

<tr valign="top" class="whs15">
<td width="30.678%" class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >NMSGR303_TRACEMASK_NONE</font></span></p></td>
<td width="69.322%" class="whs14">
<p>No tracing.</p></td></tr>

<tr valign="top" class="whs15">
<td width="30.678%" class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >NMSGR303_TRACEMASK_FUNCTIONS</font></span></p></td>
<td width="69.322%" class="whs14">
<p>Log function calls and returns.</p></td></tr>

<tr valign="top" class="whs15">
<td width="30.678%" class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >NMSGR303_TRACEMASK_ERRORS</font></span></p></td>
<td width="69.322%" class="whs14">
<p>Log HDLC transmit/receive errors.</p></td></tr>

<tr valign="top" class="whs15">
<td width="30.678%" class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >NMSGR303_TRACEMASK_RX_BUF</font></span></p></td>
<td width="69.322%" class="whs14">
<p>Log received HDLC frames.</p></td></tr>

<tr valign="top" class="whs15">
<td width="30.678%" class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >NMSGR303_TRACEMASK_TX_BUF</font></span></p></td>
<td width="69.322%" class="whs14">
<p>Log transmitted HDLC frames.</p></td></tr>

<tr valign="top" class="whs15">
<td width="30.678%" class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >NMSGR303_TRACEMASK_HDLCERR</font></span></p></td>
<td width="69.322%" class="whs14">
<p>Log HDLC transmit/receive errors.</p></td></tr>
</table><br>

<p>When defining a callback function, the application specifies the following 
 information:</p>

<table cellpadding="5" x-use-null-cells width="100%" cellspacing="0" border="1" class="whs10">
<col class="whs16">
<col class="whs17">

<tr bgcolor="#CCCCCC" valign="top" class="whs13">
<td width="14.868%" class="whs14">
<p class="whs5">Field</p></td>
<td width="85.132%" class="whs14">
<p class="whs5">Description</p></td></tr>

<tr valign="top" class="whs15">
<td width="14.868%" class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >tracebuffer</font></span></p></td>
<td width="85.132%" class="whs14">
<p>A pointer to the beginning of the trace information inside the application-allocated 
 memory.</p></td></tr>

<tr valign="top" class="whs15">
<td width="14.868%" class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >datasize</font></span></p></td>
<td width="85.132%" class="whs14">
<p>The size of the data returned in the <span style="color: #000000;
														font-style: normal;
														font-weight: normal;
														x-text-underline: off;
														x-text-overline: off;
														x-text-line-through: off;
														text-transform: none;
														vertical-align: baseline;
														/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >tracebuffer</font></span>.</p></td></tr>
</table><br>

<p>To initiate the callback mode, the application must pass a callback 
 function pointer <span style="font-style: italic; font-weight: bold;"><I><B>user_trace_callback</B></I></span>, 
 allocate a buffer, and specify the buffer address (tracebuffer) and size 
 (<span style="font-style: italic; font-weight: bold;"><I><B>user_trace_buffersize</B></I></span>) 
 as <span style="font-weight: bold;"><B>NMS_GR303SetTrace</B></span> arguments.</p>

<p>If the GR303 library receives a <span style="font-style: italic; font-weight: bold;"><I><B>user_trace_callback</B></I></span> 
 value (and this value is not NULL), the library sets up the callback tracing 
 mode and ignores the <span style="font-style: italic; font-weight: bold;"><I><B>user_file_name</B></I></span> 
 value.</p>

<p class=Note><span style="font-weight: bold;"><B>Note: </B></span>After the <span 
 style="font-weight: bold;"><B>user_trace_callback</B></span> function returns, 
 the library assumes that the application is finished using the data inside 
 the tracebuffer, and that the library can reuse the memory. For this reason, 
 applications must release <span style="font-weight: bold;"><B>user_trace_callback</B></span> 
 buffers as quickly as possible.</p>

<p>If the application decides to log trace information into a file, the 
 application must set <span style="font-style: italic; font-weight: bold;"><I><B>user_trace_callback</B></I></span> 
 and tracebuffer to NULL. If the application wants the library to perform 
 internal buffering before logging tracing information in the file, the 
 application must set the <span style="font-style: italic; font-weight: bold;"><I><B>user_trace_buffersize</B></I></span> 
 to the trace block size. <span style="font-style: italic; font-weight: bold;"><I><B>user_trace_buffersize</B></I></span> 
 specifies the<span style="font-style: italic; font-weight: bold;"> <I><B></B></I></span>size 
 of an application-allocated buffer reserved for trace messages returned 
 to the application. The size of <span style="font-style: italic; font-weight: bold;"><I><B>user_trace_buffersize</B></I></span> 
 must either be greater than the value specified by the <span style="color: #000000;
	font-style: normal;
	font-weight: normal;
	x-text-underline: off;
	x-text-overline: off;
	x-text-line-through: off;
	text-transform: none;
	vertical-align: baseline;
	/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >NMS_GR303_MIN_TRACE_BUFFER_SIZE</font></span> 
 parameter, equal to <span style="color: #000000;
									font-style: normal;
									font-weight: normal;
									x-text-underline: off;
									x-text-overline: off;
									x-text-line-through: off;
									text-transform: none;
									vertical-align: baseline;
									/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >NMS_GR303_MIN_TRACE_BUFFER_SIZE, 
 </font></span>or zero. </p>

<p>If the application sets <span style="font-style: italic; font-weight: bold;"><I><B>user_trace_buffersize</B></I></span> 
 to zero, the NMS GR303 library sends each trace message to the application 
 immediately. However, even when the NMS GR303 library sends individual 
 trace messages, the application must still reserve an amount of memory 
 greater than or equal to the size of <span style="color: #000000;
													font-style: normal;
													font-weight: normal;
													x-text-underline: off;
													x-text-overline: off;
													x-text-line-through: off;
													text-transform: none;
													vertical-align: baseline;
													/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >NMS_GR303_MIN_TRACE_BUFFER_SIZE.</font></span></p>

<p>The NMS GR303 library can return the following tracing messages with 
 the <span style="color: #000000;
					font-style: normal;
					font-weight: normal;
					x-text-underline: off;
					x-text-overline: off;
					x-text-line-through: off;
					text-transform: none;
					vertical-align: baseline;
					/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >NMSGR303_INTERNAL_FAILURE</font></span> 
 error:</p>

<table cellpadding="5" x-use-null-cells width="100%" cellspacing="0" border="1" class="whs10">
<col class="whs18">
<col class="whs19">
<col class="whs20">

<tr bgcolor="#CCCCCC" valign="top" class="whs13">
<td width="33.333%" class="whs14">
<p class="whs5">Message</p></td>
<td width="9.996%" class="whs14">
<p class="whs5">Hex</p></td>
<td width="56.671%" class="whs14">
<p class="whs5">Description</p></td></tr>

<tr valign="top" class="whs15">
<td width="33.333%" class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >PHYERR_INVALID_DEVICE</font></span></p></td>
<td width="9.996%" class="whs14">
<p>0x01</p></td>
<td width="56.671%" class="whs14">
<p>Board failed to define the HDLC or framer device type.</p></td></tr>

<tr valign="top" class="whs15">
<td width="33.333%" class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >PHYERR_DEVICE_USED</font></span></p></td>
<td width="9.996%" class="whs14">
<p>0x02</p></td>
<td width="56.671%" class="whs14">
<p>Specified HDLC channel already exists in the NMS GR303 library.</p></td></tr>

<tr valign="top" class="whs15">
<td width="33.333%" class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >PHYERR_INVALID_HANDLE</font></span></p></td>
<td width="9.996%" class="whs14">
<p>0x03</p></td>
<td width="56.671%" class="whs14">
<p>Invalid HDLC or framer handle passed. The board does not have an HDLC 
 device configured with this handle.</p></td></tr>

<tr valign="top" class="whs15">
<td width="33.333%" class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >PHYERR_BOARD_MESSAGE_FAILED</font></span></p></td>
<td width="9.996%" class="whs14">
<p>0x04</p></td>
<td width="56.671%" class="whs14">
<p>Failed to send a message to the board. Internal communication problem.</p></td></tr>

<tr valign="top" class="whs15">
<td width="33.333%" class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >PHYERR_BOARD_RESPONSE_TIMEOUT</font></span></p></td>
<td width="9.996%" class="whs14">
<p>0x05</p></td>
<td width="56.671%" class="whs14">
<p>The board failed to respond to a message within a specified time interval.</p></td></tr>

<tr valign="top" class="whs15">
<td width="33.333%" class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >PHYERR_INTERNAL_FAILURE</font></span></p></td>
<td width="9.996%" class="whs14">
<p>0x06</p></td>
<td width="56.671%" class="whs14">
<p>Failed to initialize or exit the NMS GR303 library.</p></td></tr>

<tr valign="top" class="whs15">
<td width="33.333%" class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >PHYERR_INVALID_PARMS</font></span></p></td>
<td width="9.996%" class="whs14">
<p>0x07</p></td>
<td width="56.671%" class="whs14">
<p>Invalid input parameters.</p></td></tr>

<tr valign="top" class="whs15">
<td width="33.333%" class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >PHYERR_NO_MEMORY</font></span></p></td>
<td width="9.996%" class="whs14">
<p>0x08</p></td>
<td width="56.671%" class="whs14">
<p>Failed to allocate memory.</p></td></tr>

<tr valign="top" class="whs15">
<td width="33.333%" class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >PHYERR_ALREADY_INITIALIZED</font></span></p></td>
<td width="9.996%" class="whs14">
<p>0x09</p></td>
<td width="56.671%" class="whs14">
<p>NMS GR303 library has already been initialized.</p></td></tr>

<tr valign="top" class="whs15">
<td width="33.333%" class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >PHYERR_NO_BUFFER_DEFINED</font></span></p></td>
<td width="9.996%" class="whs14">
<p>0x0A</p></td>
<td width="56.671%" class="whs14">
<p>No buffer provided for requested data.</p></td></tr>

<tr valign="top" class="whs15">
<td width="33.333%" class="whs14">
<p><span style="color: #000000;
				font-style: normal;
				font-weight: normal;
				x-text-underline: off;
				x-text-overline: off;
				x-text-line-through: off;
				text-transform: none;
				vertical-align: baseline;
				/*begin!kadov{{*/ text-decoration: none none none; /*}}end!kadov*/ "><font color=black >PHYERR_OUTOFRESOURCE</font></span></p></td>
<td width="9.996%" class="whs14">
<p>0x0B</p></td>
<td width="56.671%" class="whs14">
<p>Cannot create more HDLC instances on the board.</p></td></tr>
</table><br>

<h4>Example</h4>

<p class=Example>void&nbsp;&nbsp;SetTrace(&nbsp;void&nbsp;)<br>
{<br>
&nbsp;&nbsp;&nbsp;&nbsp;NMS_GR303_RESULT_T&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NmsResult;<br>
&nbsp;&nbsp;&nbsp;&nbsp;NMS_GR303_TRACEMASK_T&nbsp; TraceMask;<br>
&nbsp;&nbsp;&nbsp;&nbsp;BYTE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FileName[64];<br>
&nbsp;&nbsp;&nbsp;&nbsp;char&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Selection;<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;printf(&quot;NMS_GR303SetTrace:\n&quot;);<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;prompthex(&quot;Enter&nbsp;TraceMask&quot;,&nbsp;&amp;TraceMask);<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;TraceBufferSize&nbsp;=&nbsp;NMS_GR303_MIN_TRACE_BUF_SIZE;<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;/*&nbsp;Allocate&nbsp;buffer&nbsp;size&nbsp;not&nbsp;less&nbsp;than&nbsp;required&nbsp;minimum&nbsp;*/<br>
&nbsp;&nbsp;&nbsp;&nbsp;g_pTraceBuffer&nbsp;=&nbsp;calloc(<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;TraceBufferSize,&nbsp;1);<br>
&nbsp;&nbsp;&nbsp;&nbsp;/*&nbsp;Set&nbsp;trace&nbsp;to&nbsp;a&nbsp;file&nbsp;*/<br>
&nbsp;&nbsp;&nbsp;&nbsp;strcpy(&nbsp;FileName,&nbsp;&quot;nms_gr303.log&quot;&nbsp;);<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;NmsResult&nbsp;=&nbsp;&nbsp;<span style="font-weight: bold;"><B>NMS_GR303SetTrace</B></span>(&nbsp;&nbsp;TraceMask,&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NULL,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NULL,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TraceBufferSize,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FileName);<br>
&nbsp;&nbsp;&nbsp;&nbsp;printf&nbsp;(&quot;NMS_GR303SetTrace:&nbsp;Result=%s\n&quot;,PRINT_RESULT(NmsResult));<br>
}</p>

<div placeholder id="footer" class="whs21">
 <p align="center" class="whs22">&nbsp;</p>
 <p align="center" class="whs22"><script type="text/javascript" language="JavaScript1.2">var mailSubject = 'Documentation link: ' + document.title;
var mailBody = 'Link to reference this topic:%0A %0A' + location.href;
var mailDisplay = '<img src="send_link.gif" border="0" alt="Send link to this topic">'; 
document.write( 
'<a href="mailto:Enter recipient email address' 
+ '?subject=' + escape(mailSubject) 
+ '&body=' + (mailBody) 
+ '">' + mailDisplay + '</a>' 
);</script></p>
 <p align="center" class="whs23">&#169; 
 Copyright 2009 Dialogic Corporation. All rights reserved.</p>
</div>
<script type="text/javascript" language="javascript1.2">
<!--
if (window.writeIntopicBar)
	writeIntopicBar(0);
//-->
</script>
</body>
</html>

