My Project
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
gcp::antenna::control::RoachBackendMsg Class Reference
Inheritance diagram for gcp::antenna::control::RoachBackendMsg:
gcp::util::GenericTaskMsg

Classes

struct  UDPCBASSpkt
 

Public Types

enum  Request {
  INVALID, READ_DATA, WRITE_DATA, CONNECT,
  DISCONNECT, ROACH_COMMAND
}
 
- Public Types inherited from gcp::util::GenericTaskMsg
enum  GenericMsgType {
  HEARTBEAT, STOP, RESTART, TASK_SPECIFIC,
  LAST
}
 

Public Member Functions

 RoachBackendMsg ()
 
void Assign3DVectorMemory ()
 
void Assign2DVectorMemory ()
 
 ~RoachBackendMsg ()
 
size_t responseLength ()
 
void packCommand (Request req)
 
void packCommand (Request req, std::vector< float > &values)
 
void interpretResponse ()
 
bool simpleValidityCheck ()
 
int packetizeNetworkMsg ()
 
void PrintData ()
 
void packReadDataMsg ()
 
void packWriteDataMsg (gcp::util::TimeVal &currTime)
 
void packConnectMsg ()
 
void packDisconnectMsg ()
 
void packRoachCmdMsg (std::string stringCommand)
 

Public Attributes

double currTime_
 
unsigned char request_
 
unsigned short cmdSize_
 
std::string messageToSend_
 
bool expectsResponse_
 
std::string expectedResponse_
 
int numBytesExpected_
 
char responseReceived_ [DEFAULT_NUMBER_BYTES_PER_TRANSFER]
 
int numBytesReceived_
 
unsigned char readData_ [ROACH_DATA_MAX_LEN]
 
int version_
 
int packetSize_
 
int numFrames_
 
int intCount_
 
std::vector< int > bufferBacklog_
 
std::vector< int > tstart_
 
std::vector< int > seconds_
 
std::vector< int > useconds_
 
std::vector< int > switchstatus_
 
std::vector< float > Coeffs_
 
int tstop_
 
int intLength_
 
int mode_
 
int res2_
 
std::vector< std::vector< float > > LL_
 
std::vector< std::vector< float > > RR_
 
std::vector< std::vector< float > > Q_
 
std::vector< std::vector< float > > U_
 
std::vector< std::vector< float > > TL1_
 
std::vector< std::vector< float > > TL2_
 
bool responseValid_
 
bool responseGood_
 
bool responseValueValid_
 
float responseValue_ [MAX_RESPONSE_SAMPLES]
 
UDPCBASSpkt packet_
 
UDPCBASSpktpacketPtr_
 
- Public Attributes inherited from gcp::util::GenericTaskMsg
GenericMsgType genericMsgType_
 

Member Enumeration Documentation

Enumerate supported commands

Constructor & Destructor Documentation

RoachBackendMsg::RoachBackendMsg ( )

Constructor.

....................................................................... Constructor initializes request type to invalid and constructs the command map.

RoachBackendMsg::~RoachBackendMsg ( )

Destructor.

....................................................................... Destructor

Member Function Documentation

void RoachBackendMsg::Assign2DVectorMemory ( )

....................................................................... Assigns our 3D vector memory so we don't have to do in the constructor definition

void RoachBackendMsg::Assign3DVectorMemory ( )

....................................................................... Assigns our 3D vector memory so we don't have to do in the constructor definition

void gcp::antenna::control::RoachBackendMsg::interpretResponse ( )

Interpret what we get back

void gcp::antenna::control::RoachBackendMsg::packCommand ( Request  req)

General Pack Command

int RoachBackendMsg::packetizeNetworkMsg ( )

Function to packetize the message

void RoachBackendMsg::PrintData ( )

....................................................................... Prints out the data in the message

size_t gcp::antenna::control::RoachBackendMsg::responseLength ( )

Return the number of bytes read.

bool gcp::antenna::control::RoachBackendMsg::simpleValidityCheck ( )

Simple check that two strings match.

Member Data Documentation

unsigned short gcp::antenna::control::RoachBackendMsg::cmdSize_

The size of the command to send.

double gcp::antenna::control::RoachBackendMsg::currTime_

Time of request

std::string gcp::antenna::control::RoachBackendMsg::expectedResponse_

Expected Response

bool gcp::antenna::control::RoachBackendMsg::expectsResponse_

True if we are expecting a response to a command

std::string gcp::antenna::control::RoachBackendMsg::messageToSend_

Command to be issued

unsigned char gcp::antenna::control::RoachBackendMsg::readData_[ROACH_DATA_MAX_LEN]

A buffer into which we can read data returned by the roach.

unsigned char gcp::antenna::control::RoachBackendMsg::request_

Index pertaining to all request types.

bool gcp::antenna::control::RoachBackendMsg::responseGood_

Whether the controller said it did it

char gcp::antenna::control::RoachBackendMsg::responseReceived_[DEFAULT_NUMBER_BYTES_PER_TRANSFER]

Response Received

bool gcp::antenna::control::RoachBackendMsg::responseValid_

Whether the response is valid

float gcp::antenna::control::RoachBackendMsg::responseValue_[MAX_RESPONSE_SAMPLES]

Value of the response

bool gcp::antenna::control::RoachBackendMsg::responseValueValid_

Whether the response value is valid

int gcp::antenna::control::RoachBackendMsg::version_

Actual registers for a given packet.


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