User's Manual
UMAC Turbo CPU/Communications Board Hardware Manual
Ethernet Protocol 35
VR_PMAC_GETBUFFER
This packet causes the Ethernet connection to return any available string that may be residing in the
PMAC. All characters up to an <ACK> or <LF> are returned. If a <BEL> or <STX> character is
detected, only the data up to the next <CR> is returned. The maximum amount of data returned is 1400
Bytes. It is the caller’s responsibility to determine if there is more data to follow and to call
VR_PMAC_GETBUFFER again to retrieve all of the data available.
EthCmd.RequestType = VR_UPLOAD;
EthCmd.Request = VR_PMAC_GETBUFFER;
EthCmd.wValue = 0;
EthCmd.wIndex = 0;
EthCmd.wLength = htons( (WORD)strlen(outstr));
EthCmd.bData - Not Used
Example:
int CALLBACK PmacSockGetBuffer(char *instr)
{
EthCmd.RequestType = VR_DOWNLOAD;
EthCmd.Request = VR_PMAC_GETBUFFER
EthCmd.wValue = 0;
EthCmd.wIndex = 0;
EthCmd.wLength = htons( (WORD)strlen(outstr));
send(sock,(char *)&EthCmd,ETHERNETCMDSIZE,0);
recv(sock,(char *)&instr,1400,0);
}
VR_ IPADDRESS
This packet permits either setting or retrieval of the current IP address in the UMAC Turbo
CPU/Communications Board. When setting the IP address to a new value, it is required that the UMAC
Turbo CPU/Communications Board be powered down for the new address to take effect.
EthCmd.RequestType = VR_UPLOAD to retreive the IP address
Or
EthCmd.RequestType = VR_DOWNLOAD to set the IP address
EthCmd.Request = VR_IPADDRESS;
EthCmd.wValue = 0;
EthCmd.wIndex = 0;
EthCmd.wLength = htons(4);
EthCmd.bData = contains 4 bytes of data indicating the IP
address set on the send command.
For the Receive command, four bytes of data are returned indicating the IP address.
VR_PMAC_SENDCTRLCHAR
This packet sends a single character or control character to the UMAC Turbo CPU/Communications
Board. The packet below is sent. The data received is irrelevant; its purpose is to ensure that the sender’s
command has been received.
EthCmd.RequestType = VR_DOWNLOAD;
EthCmd.Request = VR_PMAC_SENDCTRLCHAR;
EthCmd.wValue = htons(outch); // the character to write
EthCmd.wIndex = 0;
EthCmd.bData - Not Used