Anritsu S331D Network Router User Manual


 
/*********************************************************************/
/* void Get8Bytes(unsigned long parm1, unsigned long parm2, */
/* BYTE* ByteData ) */
/* Description: This function converts the 2 four byte values to */
/* 8 bytes for transmission to the SiteMaster. parm1 occupies */
/* the first four bytes, parm2 occupies the second 4 bytes.
/* Inputs: parm1 - 4 byte unsigned long integer */
/* parm2 - 4 byte unsigned long integer */
/* Returns: SUCCESS if the unit is in remote mode */
/* FAILURE if the command fails */
/* The resulting bytes are returned in the */
/* memory location pointed to by ByteData. This */
/* location must have at least 8 empty bytes. */
/*********************************************************************/
void Get8Bytes(unsigned long parm1, unsigned long parm2,
BYTE* ByteData)
{
// MSB of 1st parameter
*ByteData = (BYTE)((parm1 & 0xFF000000)>24);
*(ByteData+1) = (BYTE)((parm1 & 0x00FF0000)>16);
*(ByteData+2) = (BYTE)((parm1 & 0x0000FF00)>8);
// LSB of 1st parameter
*(ByteData+3) = (BYTE)(parm1 & 0x000000FF);
// MSB of 2nd parameter
*(ByteData+4)= (BYTE)((parm2 & 0xFF000000)>24);
*(ByteData+5)= (BYTE)((parm2 & 0x00FF0000)>16);
*(ByteData+6)= (BYTE)((parm2 & 0x0000FF00)>8);
// LSB of 2nd parameter
*(ByteData+7) = (BYTE)(parm2 & 0x000000FF);
} /* Get8Bytes */
112 Site Master PM