EasyManua.ls Logo

Anritsu Site Master S331D - Page 117

Anritsu Site Master S331D
132 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
/*********************************************************************/
/* unsigned char ExitRemote(BYTE *ResponseBytes) */
/* Description: This function implements control byte #255, Exit */
/* Remote Mode. If successful, the unit will leave */
/* remote mode and resume sweeping. */
/* Inputs : ResponseBytes = pointer to an array of bytes at */
/* least 1 element long (1 byte is expected in */
/* response to the Exit Remote command). */
/* Returns: SUCCESS if the unit exits remote mode */
/* FAILURE if the command fails */
/* Response bytes are returned in the variable */
/* ResponseBytes. */
/*********************************************************************/
unsigned char ExitRemote(BYTE *ResponseBytes)
{
BYTE *SendExitRemoteCharPointer; // Data to send
BYTE SerialCommand;
SendExitRemoteCharPointer = &SerialCommand;
SerialCommand = 255; // 255 is the Exit Remote Serial Command
// Write 1 byte of data from SendExitRemoteCharPointer to the // COM Port
WriteToPort (SendExitRemoteCharPointer, 1);
// Expecting 1 byte back (give the unit 5 seconds to respond):
// 0xFF = success
if(!ReadFromPort(1, ResponseBytes, 1))
{
return FAILURE;
}
else
{
if ( *ResponseBytes != 0xFF )
{
return FAILURE;
}
else
{
return SUCCESS;
}
}
} /* ExitRemote */
Site Master PM 111

Table of Contents

Related product manuals