My Project
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
gcp::antenna::control::PmacCommand Class Reference

Classes

struct  EthCmd
 
struct  EthCmdInfo
 

Public Types

enum  RequestType { UPLOAD = 0xC0, DOWNLOAD = 0x40 }
 
enum  Request {
  INVALID = 0x0, CTRL_RESPONSE = 0xC4, FWDOWNLOAD = 0xCB, IPADDRESS = 0xE0,
  PMAC_FLUSH = 0xB3, PMAC_GETBUFFER = 0xC5, PMAC_GETLINE = 0xB1, PMAC_GETMEM = 0xB4,
  PMAC_GETRESPONSE = 0xBF, PMAC_PORT = 0xBE, PMAC_READREADY = 0xC2, PMAC_SENDLINE = 0xB0,
  PMAC_SETMEM = 0xB5, PMAC_SETBIT = 0xBA, PMAC_SETBITS = 0xBB, PMAC_WRITEBUFFER = 0xC6,
  PMAC_WRITEERROR = 0xC7
}
 

Public Member Functions

 PmacCommand ()
 
 ~PmacCommand ()
 
void packCtrlResponseCmd ()
 
void packFwDownLoadCmd ()
 
void packIpAddress ()
 
void packIpAddress (unsigned int address)
 
void packPmacFlushCmd ()
 
void packPmacGetBufferCmd ()
 
void packPmacGetLineCmd ()
 
void packPmacGetMemCmd (unsigned short offset, unsigned short length)
 
void packPmacGetResponseCmd (std::string outString)
 
void packPmacPortCmd (unsigned char port)
 
void packPmacPortCmd ()
 
void packPmacReadReadyCmd ()
 
void packPmacSendCtrlCharCmd (char outch)
 
void packPmacSendLineCmd (std::string line)
 
void packPmacSetBitCmd (unsigned short bitNo, bool on)
 
void packPmacSetBitsCmd (unsigned int mask)
 
void packPmacSetMemCmd (unsigned short offset, unsigned short length, unsigned char *data)
 
void packPmacWriteBufferCmd (unsigned int *data, unsigned int len)
 
void packWriteRegCmd (RegMapBlock *blk, unsigned int first, unsigned int nreg, unsigned int *value)
 
void packReadRegCmd (RegMapBlock *blk, unsigned int first, unsigned int nreg)
 
void * readData ()
 
size_t responseLength ()
 
void readRegResponse (RegMapBlock *blk, unsigned int first, unsigned int nreg, unsigned int *response)
 
unsigned int * readRegResponse (RegMapBlock *blk, unsigned int first, unsigned int nreg)
 

Friends

class PmacComms
 

Member Enumeration Documentation

Enumerate supported commands

Enumerate the request type, as specified by Delta Tau

Constructor & Destructor Documentation

PmacCommand::PmacCommand ( )

Constructor.

....................................................................... Constructor initializes request type to invalid.

PmacCommand::~PmacCommand ( )

Destructor.

....................................................................... Constructor initializes request type to invalid.

Member Function Documentation

void PmacCommand::packCtrlResponseCmd ( )

Obtain the response after sending a control character.

void PmacCommand::packFwDownLoadCmd ( )

Permits writing to the PMAC host port for firmware download.

void PmacCommand::packIpAddress ( )

Query the IP address.

....................................................................... Query the IP address.

void PmacCommand::packIpAddress ( unsigned int  address)

Set the IP address.

....................................................................... Set the IP address.

void PmacCommand::packPmacFlushCmd ( )

Causes a ^X to be sent to the PMAC.

....................................................................... Causes a ^X to be sent to the PMAC.

void PmacCommand::packPmacGetBufferCmd ( )

Cause the PMAC to return any std::string that may reside in the PMAC.

....................................................................... Cause the PMAC to return any string that may reside in the PMAC.

void PmacCommand::packPmacGetLineCmd ( )

Return any std::string that may be residing in the PMAC.

....................................................................... Return any string that may be residing in the PMAC.

void PmacCommand::packPmacGetMemCmd ( unsigned short  offset,
unsigned short  length 
)

Read from DPRAM shared memory.

....................................................................... Read from DPRAM shared memory.

void PmacCommand::packPmacGetResponseCmd ( std::string  outString)

Send a std::string to the pmac, causing it to return any available striungs that may be residing in the PMAC.

....................................................................... Send a string to the pmac, causing it to return any available striungs that may be residing in the PMAC.

void PmacCommand::packPmacPortCmd ( unsigned char  port)

Send a single character or control character to the pmac

....................................................................... Send a single character or control character to the pmac

void PmacCommand::packPmacPortCmd ( )

Query the port.

....................................................................... Query the port.

void PmacCommand::packPmacReadReadyCmd ( )

Determine if there is data ready to be read.

....................................................................... Determine if there is data ready to be read.

void PmacCommand::packPmacSendCtrlCharCmd ( char  outch)

Send a single character or control character to the pmac

....................................................................... Send a single character or control character to the pmac

void PmacCommand::packPmacSendLineCmd ( std::string  line)

Send a std::string to the PMAC

....................................................................... Send a string to the PMAC

void PmacCommand::packPmacSetBitCmd ( unsigned short  bitNo,
bool  on 
)

Set/clear a bit in a 32-bit word.

....................................................................... Set/clear a bit in a 32-bit word.

void PmacCommand::packPmacSetBitsCmd ( unsigned int  mask)

Set bits in a 32-bit word to a new value.

....................................................................... Set bits in a 32-bit word to a new value.

void PmacCommand::packPmacSetMemCmd ( unsigned short  offset,
unsigned short  length,
unsigned char *  data 
)

Write an array of bytes to DPRAM shared memory.

....................................................................... Write an array of bytes to DPRAM shared memory.

According to the specification, up to 1400 bytes may be written in a single packet. The wValue field contains the byte offset to write the data to, while the wLength parameter indicates how many bytes to write. After sending the command, we must wait to receive 1 byte, whose value is irrelevant, but is just to indicate that the command was received.

void PmacCommand::packPmacWriteBufferCmd ( unsigned int *  data,
unsigned int  len 
)

Write multiple lines to the PMAC with one packet.

....................................................................... Write multiple lines to the PMAC with one packet.

void PmacCommand::packReadRegCmd ( RegMapBlock *  blk,
unsigned int  first,
unsigned int  nreg 
)

Read an array of different size types from DPRAM shared memory.

....................................................................... Write an array of unsigned longs to DPRAM shared memory.

According to the specification, up to 1400 bytes may be written in a single packet. The wValue field contains the byte offset to write the data to, while the wLength parameter indicates how many bytes to write. After sending the command, we must wait to receive 1 byte, whose value is irrelevant, but is just to indicate that the command was received.

void PmacCommand::packWriteRegCmd ( RegMapBlock *  blk,
unsigned int  first,
unsigned int  nreg,
unsigned int *  value 
)

Write an array of different size types to DPRAM shared memory.

....................................................................... Write an array of unsigned longs to DPRAM shared memory.

According to the specification, up to 1400 bytes may be written in a single packet. The wValue field contains the byte offset to write the data to, while the wLength parameter indicates how many bytes to write. After sending the command, we must wait to receive 1 byte, whose value is irrelevant, but is just to indicate that the command was received.

void * PmacCommand::readData ( )

Return a pointer to the internal data buffer. We make this public so that others can access data read from the pmac.

....................................................................... Return a pointer to our read data buffer as a void* suitable for passing to read(2).

void PmacCommand::readRegResponse ( RegMapBlock *  blk,
unsigned int  first,
unsigned int  nreg,
unsigned int *  response 
)

Read register values from the pmac into an externally supplied buffer.

....................................................................... Unpack a response to a readRegister command from the pmac using an externally supplied buffer.

unsigned int * PmacCommand::readRegResponse ( RegMapBlock *  blk,
unsigned int  first,
unsigned int  nreg 
)

Read register values from the pmac return a pointer to an internal buffer.

....................................................................... Unpack a response to a readRegister command from the pmac, with no externally supplied buffer.

size_t PmacCommand::responseLength ( )

Return the number of bytes read.

....................................................................... Return the response length.


The documentation for this class was generated from the following files: