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

Public Member Functions

 RoachBackend (SpecificShare *share, std::string name, bool sim)
 
 RoachBackend ()
 
 ~RoachBackend ()
 
void queryStatus ()
 
void queryStatus (gcp::util::TimeVal &currTime)
 
void fillUtc (gcp::util::TimeVal &currTime)
 
bool connect ()
 
void disconnect ()
 
bool roachIsConnected ()
 
void getData ()
 
void sendCommand (RoachBackendMsg &command)
 
int readResponse (RoachBackendMsg &command)
 
bool isBusy ()
 
int writeString (std::string message)
 
 RoachBackend (bool sim=false, char *controllerName="pumba")
 
 RoachBackend (SpecificShare *share, std::string name, bool sim=false, char *controllerName="pumba", int roachNum=1)
 
void Assign3DRingMemory ()
 
void Assign2DRingMemory ()
 
virtual ~RoachBackend ()
 
bool connect ()
 
void disconnect ()
 
bool roachIsConnected ()
 
int waitForResponse ()
 
void wait (int nsec=100000000)
 
int issueCommand (RoachBackendMsg &command)
 
void sendCommand (RoachBackendMsg &command)
 
int readResponse (RoachBackendMsg &command)
 
int parseBackendDataPacket (RoachBackendMsg &command)
 
int parseBackendResponse (RoachBackendMsg &command)
 
void checkOneOutput (RoachBackendMsg &command)
 
void getData ()
 
void sendMessage (RoachBackendMsg message)
 
void writeData (gcp::util::TimeVal &currTime)
 
void writeData3D (gcp::util::TimeVal &currTime)
 
void printBits (unsigned char feature)
 
int writeString (std::string message)
 
int readTCPPort (RoachBackendMsg &command)
 
- Public Member Functions inherited from gcp::antenna::control::Board
 Board (SpecificShare *share, std::string name)
 
 Board (SpecificShare *share, gcp::util::AntNum ant)
 
 Board (SpecificShare *share)
 
 Board ()
 
virtual ~Board ()
 
RegMapBlock * findReg (char *name)
 
bool isReachable ()
 
virtual void reset ()
 
int getIndex ()
 
virtual void readRegNoLock (RegMapBlock *blk, unsigned int first, unsigned int nreg, unsigned int *value)
 
virtual void readReg (RegMapBlock *blk, unsigned int first, unsigned int nreg, unsigned int *value)
 
virtual void readReg (RegMapBlock *blk, unsigned int first, unsigned int nreg, float *value)
 
virtual void writeRegNoLock (RegMapBlock *blk, unsigned first, unsigned nreg, signed char *value)
 
virtual void writeRegNoLock (RegMapBlock *blk, unsigned first, unsigned nreg, unsigned char *value)
 
virtual void writeRegNoLock (RegMapBlock *blk, unsigned first, unsigned nreg, signed short *value)
 
virtual void writeRegNoLock (RegMapBlock *blk, unsigned first, unsigned nreg, unsigned short *value)
 
virtual void writeRegNoLock (RegMapBlock *blk, unsigned first, unsigned nreg, int *value)
 
virtual void writeRegNoLock (RegMapBlock *blk, unsigned first, unsigned nreg, unsigned int *value)
 
virtual void writeRegNoLock (RegMapBlock *blk, unsigned first, unsigned nreg, float *value)
 
virtual void writeRegNoLock (RegMapBlock *blk, unsigned first, unsigned nreg, double *value)
 
virtual void writeReg (RegMapBlock *blk, unsigned first, unsigned nreg, signed char *value)
 
virtual void writeReg (RegMapBlock *blk, unsigned first, unsigned nreg, unsigned char *value)
 
virtual void writeReg (RegMapBlock *blk, unsigned first, unsigned nreg, signed short *value)
 
virtual void writeReg (RegMapBlock *blk, unsigned first, unsigned nreg, unsigned short *value)
 
virtual void writeReg (RegMapBlock *blk, unsigned first, unsigned nreg, int *value)
 
virtual void writeReg (RegMapBlock *blk, unsigned first, unsigned nreg, unsigned int *value)
 
virtual void writeReg (RegMapBlock *blk, unsigned first, unsigned nreg, float *value)
 
virtual void writeReg (RegMapBlock *blk, unsigned first, unsigned nreg, double *value)
 

Public Attributes

sockaddr_in servaddr_
 
RoachBackendMsg command_
 
bool connected_
 
bool sim_
 
int missedCommCounter_
 
char * controllerName_
 
int roachIndex_
 
std::vector< int > version_
 
std::vector< int > packetSize_
 
std::vector< int > numFrames_
 
std::vector< int > intCount_
 
std::vector< int > bufferBacklog_
 
std::vector< int > tstart_
 
std::vector< int > switchstatus_
 
std::vector< int > tstop_
 
std::vector< int > intLength_
 
std::vector< int > mode_
 
std::vector< int > res2_
 
std::vector< int > seconds_
 
std::vector< int > useconds_
 
std::vector< float > Coeffs_
 
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_
 
int currentIndex_
 
int prevSecStart_
 
int prevSecEnd_
 
int thisSecStart_
 
float prevTime_
 
RegMapBlock * roachUtc_
 
RegMapBlock * roachVersion_
 
RegMapBlock * roachCount_
 
RegMapBlock * roachIntLength_
 
RegMapBlock * roachBufferBacklog_
 
RegMapBlock * roachMode_
 
RegMapBlock * roachSwitchStatus_
 
RegMapBlock * roachLL_
 
RegMapBlock * roachRR_
 
RegMapBlock * roachQ_
 
RegMapBlock * roachU_
 
RegMapBlock * roachTL1_
 
RegMapBlock * roachTL2_
 
RegMapBlock * roachChan_
 
RegMapBlock * roachLLfreq_
 
RegMapBlock * roachRRfreq_
 
RegMapBlock * roachQfreq_
 
RegMapBlock * roachUfreq_
 
RegMapBlock * roachTL1freq_
 
RegMapBlock * roachTL2freq_
 
RegMapBlock * roachLLtime_
 
RegMapBlock * roachRRtime_
 
RegMapBlock * roachQtime_
 
RegMapBlock * roachUtime_
 
RegMapBlock * roachTL1time_
 
RegMapBlock * roachTL2time_
 
RegMapBlock * roachNTPSeconds_
 
RegMapBlock * roachNTPuSeconds_
 
RegMapBlock * roachFPGAClockStamp_
 
RegMapBlock * roachCoffs_
 

Additional Inherited Members

- Protected Attributes inherited from gcp::antenna::control::Board
SpecificShareshare_
 
RegMapBoard * board_
 
bool hasBoard_
 

Constructor & Destructor Documentation

gcp::antenna::control::RoachBackend::RoachBackend ( SpecificShare share,
std::string  name,
bool  sim 
)

Constructor with pointer to shared resources.

gcp::antenna::control::RoachBackend::RoachBackend ( )

Constructor.

RoachBackend::~RoachBackend ( )

Destructor.

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

RoachBackend::RoachBackend ( bool  sim = false,
char *  controllerName = "pumba" 
)

Constructor with pointer to shared resources.

....................................................................... Constructor

RoachBackend::RoachBackend ( SpecificShare share,
std::string  name,
bool  sim = false,
char *  controllerName = "pumba",
int  roachNum = 1 
)

....................................................................... Constructor with share objects

virtual gcp::antenna::control::RoachBackend::~RoachBackend ( )
virtual

Destructor

Member Function Documentation

void RoachBackend::Assign2DRingMemory ( )

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

void RoachBackend::Assign3DRingMemory ( )

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

void RoachBackend::checkOneOutput ( RoachBackendMsg command)

Check value of response

....................................................................... Check if box output is valid, and what its value is.

bool gcp::antenna::control::RoachBackend::connect ( )

function to connect

bool RoachBackend::connect ( )

Connect to the roach

Returns true on success.

....................................................................... Connect to the roach port.

void RoachBackend::disconnect ( )

Disconnect from the roach.

....................................................................... Disconnect from the roach port.

void gcp::antenna::control::RoachBackend::disconnect ( )

disconnect

void gcp::antenna::control::RoachBackend::fillUtc ( gcp::util::TimeVal currTime)

Fill the utc register with the time stamps appropriate for the data just read back from the servo box

void RoachBackend::getData ( )

Request data from the backend

void gcp::antenna::control::RoachBackend::getData ( )

wrapper to get data from the backend

int RoachBackend::issueCommand ( RoachBackendMsg command)

Generalized pack&issue command

int RoachBackend::parseBackendDataPacket ( RoachBackendMsg command)

Parse a full data packet from the backend

int gcp::antenna::control::RoachBackend::parseBackendResponse ( RoachBackendMsg command)

Parse response to specific command of backend

void gcp::antenna::control::RoachBackend::queryStatus ( )

Command set – commands called by higher functions

int RoachBackend::readResponse ( RoachBackendMsg command)

Read a response from the ROACH. Does not check that a response is available, and may block waiting for one, depending on how the socket was configured.

....................................................................... Private version to read a response into our internal message container.

int gcp::antenna::control::RoachBackend::readResponse ( RoachBackendMsg command)

Read a response from the ROACH. Does not check that a response is available, and may block waiting for one, depending on how the socket was configured.

bool RoachBackend::roachIsConnected ( )

Return true if the roach is connected.

....................................................................... Return true if we are connected to the roach.

void RoachBackend::sendCommand ( RoachBackendMsg command)

Send a single command to the ROACH.

....................................................................... Send a command to the roach.

void gcp::antenna::control::RoachBackend::sendCommand ( RoachBackendMsg command)

Send a single command to the ROACH.

void RoachBackend::sendMessage ( RoachBackendMsg  message)

wrapper to issue command to backend

void RoachBackend::wait ( int  nsec = 100000000)

wait a bit

............................................................ Method that waits

int gcp::antenna::control::RoachBackend::waitForResponse ( )

Block, waiting for input from the roach

void RoachBackend::writeData ( gcp::util::TimeVal currTime)

write the data to disk

....................................................................... Write the data to disk

void RoachBackend::writeData3D ( gcp::util::TimeVal currTime)

....................................................................... Write the data to disk

int RoachBackend::writeString ( std::string  message)

write message to serial port

....................................................................... write a message to the port

int gcp::antenna::control::RoachBackend::writeString ( std::string  message)

Private function to read/write to roach

Member Data Documentation

RoachBackendMsg gcp::antenna::control::RoachBackend::command_

all our data for this transfer will be in RoachBackendMsg object

bool gcp::antenna::control::RoachBackend::connected_

A not-so-private message container used for sending and receiving data from the SERVO. need it to be public to check the presence of 1PPS True when we have an ethernet connection to the SERVO.

if we are connected

char* gcp::antenna::control::RoachBackend::controllerName_

Controller name

int gcp::antenna::control::RoachBackend::missedCommCounter_

missed comm counter

int gcp::antenna::control::RoachBackend::roachIndex_

Roach Index (for writing data out to proper location

RegMapBlock* gcp::antenna::control::RoachBackend::roachUtc_

data registers to store

bool gcp::antenna::control::RoachBackend::sim_

Are we simulating the backend?

std::vector<int> gcp::antenna::control::RoachBackend::version_

Ring buffer with all our data which we will fill up and write out


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