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

<html>

<head>
<title>NaturalAccess GR303 and V5 Libraries Developer's Manual: NMS_V5SetTrace </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:25.442%; }
col.whs9 { width:74.558%; }
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:27.478%; }
col.whs12 { width:72.522%; }
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:12.234%; }
col.whs17 { width:87.766%; }
table.whs18 {   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; }
div.whs19 { width:100%; }
p.whs20 { text-align:center; }
p.whs21 { 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.whs21 {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 V5 function reference\nNMS_V5SetTrace");
addAvenueInfo("Untitled","nmsv5sendsa7bit.html","nmsv5startinterface.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_V5SetTrace</h1>

<p>Controls the V5 library tracing mechanism. </p>

<h4>Prototype</h4>

<p>NMS_V5_RESULT_T <span style="font-weight: bold;"><B>NMS_V5SetTrace</B></span> 
 ( NMS_V5_TRACEMASK_T <span style="font-style: italic; font-weight: bold;"><I><B>trace_mask</B></I></span> 
 NMS_V5_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 that specifies the level of tracing performed by the NMS 
 V5 library. Refer to the Details 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 NMS 
 V5 library uses this callback function each time 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<br>
(*NMS_V5_TRACE_CALLBACK_T)<br>
&nbsp;&nbsp;&nbsp;(char&nbsp;*tracebuffer,<br>
&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 V5 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 <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 the NMS_V5_MIN_TRACE_BUF_SIZE value.</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 a file if the NMS V5 library is logging trace 
 information. This value specifies the size of the trace blocks that the 
 NMS V5 library uses when writing trace information 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="25.442%" class="whs4">
<p class="whs5">Return value</p></td>
<td bgcolor="#CCCCCC" width="74.558%" class="whs4">
<p class="whs5">Description</p></td></tr>

<tr>
<td bgcolor="#FFFFFF" width="25.442%" class="whs6">
<p>NMSV5_SUCCESS</p></td>
<td bgcolor="#FFFFFF" width="74.558%" class="whs6">
<p>&nbsp;</p></td></tr>

<tr>
<td bgcolor="#FFFFFF" width="25.442%" class="whs6">
<p>NMSV5_INTERNAL_FAILURE</p></td>
<td bgcolor="#FFFFFF" width="74.558%" class="whs6">
<p>Failed to set up tracing.</p></td></tr>

<tr>
<td colspan="1" rowspan="1" bgcolor="#FFFFFF" width="25.442%" class="whs6">
<p>NMSV5_INVALID_PARMS</p></td>
<td colspan="1" rowspan="1" bgcolor="#FFFFFF" width="74.558%" class="whs6">
<p>Invalid argument has been passed.</p></td></tr>

<tr>
<td colspan="1" rowspan="1" bgcolor="#FFFFFF" width="25.442%" class="whs6">
<p>NMSV5_INVALID_STATE</p></td>
<td colspan="1" rowspan="1" bgcolor="#FFFFFF" width="74.558%" class="whs6">
<p>Interface has not been started.</p></td></tr>

<tr>
<td colspan="1" rowspan="1" bgcolor="#FFFFFF" width="25.442%" class="whs6">
<p>NMSV5_NOT_INITIALIZED</p></td>
<td colspan="1" rowspan="1" bgcolor="#FFFFFF" width="74.558%" class="whs6">
<p>NMS V5 library was not initialized with <span style="font-weight: bold;"><B><a href="nmsv5initialize.html">NMS_V5Initialize</a></B></span>.</p></td></tr>
</table><br>

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

<p>Applications can use <span style="font-weight: bold;"><B>NMS_V5SetTrace</B></span> 
 to configure tracing so that the NMS V5 library returns trace information 
 through a defined callback function or logs trace information into a specified 
 file. The following table lists the trace masks that applications can 
 specify:</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="27.478%" class="whs14">
<p class="whs5">Trace mask</p></td>
<td width="72.522%" class="whs14">
<p class="whs5">Description</p></td></tr>

<tr valign="top" class="whs15">
<td width="27.478%" 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 >NMSV5_TRACEMASK_NONE</font></span></p></td>
<td width="72.522%" class="whs14">
<p>No tracing.</p></td></tr>

<tr valign="top" class="whs15">
<td width="27.478%" 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 >NMSV5_TRACEMASK_FUNCTIONS</font></span></p></td>
<td width="72.522%" class="whs14">
<p>Trace function calls and returns.</p></td></tr>

<tr valign="top" class="whs15">
<td width="27.478%" 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 >NMSV5_TRACEMASK_ERRORS</font></span></p></td>
<td width="72.522%" class="whs14">
<p>Trace errors.</p></td></tr>

<tr valign="top" class="whs15">
<td width="27.478%" 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 >NMSV5_TRACEMASK_RX_BUF</font></span></p></td>
<td width="72.522%" class="whs14">
<p>Log received HDLC frames.</p></td></tr>

<tr valign="top" class="whs15">
<td width="27.478%" 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 >NMSV5_TRACEMASK_TX_BUF</font></span></p></td>
<td width="72.522%" class="whs14">
<p>Log transmitted HDLC frames.</p></td></tr>

<tr valign="top" class="whs15">
<td width="27.478%" 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 >NMSV5_TRACEMASK_HDLCERR</font></span></p></td>
<td width="72.522%" class="whs14">
<p>Log HDLC transmit/receive errors.</p></td></tr>

<tr valign="top" class="whs15">
<td width="27.478%" 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 >NMSV5_TRACEMASK_E1_STATUS</font></span></p></td>
<td width="72.522%" class="whs14">
<p>Log E1 status reports.</p></td></tr>
</table><br>

<p>When defining a callback, 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="12.234%" class="whs14">
<p class="whs5">Field</p></td>
<td width="87.766%" class="whs14">
<p class="whs5">Description</p></td></tr>

<tr valign="top" class="whs15">
<td width="12.234%" 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="87.766%" 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="12.234%" 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="87.766%" 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 the callback 
 function pointer <span style="font-style: italic; font-weight: bold;"><I><B>user_trace_callback</B></I></span>, 
 allocate a buffer, and pass the buffer address (tracebuffer) and size 
 (<span style="font-style: italic; font-weight: bold;"><I><B>user_trace_buffersize</B></I></span>) 
 of the buffer as arguments for <span style="font-weight: bold;"><B>NMS_V5SetTrace</B></span>.</p>

<p>When the NMS V5 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), it configures the callback tracing 
 mode and ignores the <span style="font-style: italic; font-weight: bold;"><I><B>user_file_name</B></I></span> 
 value. After the <span style="font-weight: bold;"><B>user_trace </B></span>callback 
 function returns, the library assumes that the application is done with 
 the data inside the tracebuffer and it can overwrite its contents. Therefore, 
 the application should release buffers associated with <span style="font-weight: bold;"><B>user_trace 
 </B></span>callback functions as soon as possible.</p>

<p>Applications can log trace information into a file by setting the <span 
 style="font-style: italic; font-weight: bold;"><I><B>user_trace_callback</B></I></span> 
 and <span style="font-style: italic; font-weight: bold;"><I><B>tracebuffer</B></I></span> 
 values to NULL. Applications can also have the V5 library perform internal 
 buffering before logging tracing information into the file, by setting 
 the <span style="font-style: italic; font-weight: bold;"><I><B>user_trace_buffersize</B></I></span> 
 value 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 the application-allocated memory 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_V5_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_V5_MIN_TRACE_BUFFER_SIZE</font></span>, 
 or set to 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 V5 library sends each trace message to the application 
 immediately. However, even when the NMS V5 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_V5_MIN_TRACE_BUFFER_SIZE.</font></span></p>

<p>The NMS V5 library can return the following tracing messages with <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 >NMSV5_INTERNAL_FAILURE</font></span> 
 errors:<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 ></font></span></p>

<table cellpadding="5" x-use-null-cells cellspacing="0" border="1" class="whs18">

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

<tr valign="top" class="whs15">
<td 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 class="whs14">
<p>0x01</p></td>
<td class="whs14">
<p>Board failed to define the HDLC or framer device type.</p></td></tr>

<tr valign="top" class="whs15">
<td 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 class="whs14">
<p>0x02</p></td>
<td class="whs14">
<p>The specified HDLC framer already exists in the NMS V5 library.</p></td></tr>

<tr valign="top" class="whs15">
<td 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 class="whs14">
<p>0x03</p></td>
<td class="whs14">
<p>Invalid HDLC framer handle passed. The board does not have an HDLC device 
 configured with this handle.</p></td></tr>

<tr valign="top" class="whs15">
<td 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_<br>
FAILED</font></span></p></td>
<td class="whs14">
<p>0x04</p></td>
<td class="whs14">
<p>Failed to send a message to the board. Internal communication problem.</p></td></tr>

<tr valign="top" class="whs15">
<td 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_<br>
TIMEOUT</font></span></p></td>
<td class="whs14">
<p>0x05</p></td>
<td 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 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 class="whs14">
<p>0x06</p></td>
<td class="whs14">
<p>Failed to initialize or exit the NMS V5 library.</p></td></tr>

<tr valign="top" class="whs15">
<td 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 class="whs14">
<p>0x07</p></td>
<td class="whs14">
<p>Invalid input parameters.</p></td></tr>

<tr valign="top" class="whs15">
<td 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 class="whs14">
<p>0x08</p></td>
<td class="whs14">
<p>Failed to allocate memory.</p></td></tr>

<tr valign="top" class="whs15">
<td 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 class="whs14">
<p>0x09</p></td>
<td class="whs14">
<p>The NMS V5 library has already been initialized.</p></td></tr>

<tr valign="top" class="whs15">
<td 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 class="whs14">
<p>0x0A</p></td>
<td class="whs14">
<p>No buffer provided for requested data.</p></td></tr>

<tr valign="top" class="whs15">
<td 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 class="whs14">
<p>0x0B</p></td>
<td 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_V5_RESULT_T&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NmsResult;<br>
&nbsp;&nbsp;&nbsp;&nbsp;NMS_V5_TRACEMASK_T&nbsp;&nbsp;&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;FileName[64];<br>
&nbsp;&nbsp;&nbsp;&nbsp;DWORD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TraceBufferSize;<br>
&nbsp;&nbsp;&nbsp;&nbsp;char&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_V5SetTrace:\n&quot;);<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;/*&nbsp;Set&nbsp;to&nbsp;print&nbsp;error&nbsp;mesages&nbsp;*/<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_V5_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(TraceBufferSize,&nbsp;1);<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;/*&nbsp;Log&nbsp;trace&nbsp;information&nbsp;to&nbsp;a&nbsp;file&nbsp;*/<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;strcpy(&nbsp;FileName,&nbsp;&quot;nms_v5.log&quot;&nbsp;);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NmsResult&nbsp;=&nbsp;&nbsp;<span style="font-weight: bold;"><B>NMS_V5SetTrace</B></span>(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;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;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;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;FileName);<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;printf&nbsp;(&quot;NMS_V5SetTrace:&nbsp;Result=%s\n&quot;,PRINT_RESULT(NmsResult));<br>
<br>
}</p>

<div placeholder id="footer" class="whs19">
 <p align="center" class="whs20">&nbsp;</p>
 <p align="center" class="whs20"><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="whs21">&#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>

