Telescope Simulator BackendServer

From setiquest wiki

Jump to: navigation, search

Back to Project Page





This is a living document that we all will help create. It will attempt to document the BackendServer enough so it's behavior can be understood to implement it's functionality in the Telescope Simulator project. The BackendServer is lacking in documentation so this document will help improve the quality of the BackendServer

Commands and their function

The Seeker and BackendServer talk to each other over a TCP/IP socket connection. The seeker initiates the connection as a client, the BackendServer is listening on a port as a server. Once the seeker is connected to the BackendServer ASCII commands are passed back and forth.

TODO: An out of date list of commands is available at [1]. Someone should transpose the commands into this Wiki document.

TODO: You can download the BackendServer source code at [2]. The commands are "defined" in See the list of command definitions starting at line 91. The commands are parsed and executed in the method dispatchedCommand(). Please review the commands actually used in the BackendServer code and from the WiKi remove the commands that are not used anymore, and add the few new ones that were not in the original list at [3].

Class SonATABackendServer Class Structure

The SonATABackendServer Class reads the command from TCP/IP through the following sockets.

Monitor Socket

Function: Generate monitor messages and send them over monitor socket.

Handling Function: monitorLoop

Line No:721

Alarm Socket

Function:Receives commands on alarm socket and calls atasetalarm

Handling Function: alarmLoop

Line No:546

Command Socket

Function:Receives commands on command socket and dispatches them

Handling Function: commandLoop

Line No: 643

The commands read through socket are sent to their corresponding handler major Socket being handled by commandLoop which forwards it to dispatchcommand function.Whose working is mentioned as below.

private String dispatchCommand(String command) throws Exception

The dispatchcommand function works by splitting the Command String by Spaces and reading the first Token and then calling a function to handle the group of command. The following list gives the group of commands along with the Functions handling them.

Command Group Token Function LineNo

CMD_BEAMFORMER BF dispatchBeamformerCmd 917

CMD_STOP STOP handleStopCmd 4085

CMD_STOW STOW handleStowCmd 4102

CMD_TUNE TUNE handleTuneCmd 4679

CMD_ALLOCATE ALLOCATE handleAllocateSubarray 4720

CMD_DEALLOCATE DEALLOCATE handleDeallocateSubarray 4736

CMD_POINT POINT handlePointAntsCmd 3677

CMD_ZFOCUS ZFOCUS handleFocusCmd 3758

CMD_MONITOR MONITOR handleMonitorCmd 4852

CMD_WRAP WRAP handleWrapCmd 3827

CMD_LNAON LNAON handleLnaOnCmd 4219

CMD_PAMSET PAMSET handlePamSetCmd 4240

CMD_ANTGROUP ANTGROUP handleAntGroupCmd 4259

CMD_REGROUP REGROUP handleRegroup 4660

These function in turn read the next token and call the corresponding functions so to build the command list we have to trace the commands from the beginning to each token read and then the corresponding function called and then again the token read. --Akhand 13:40, 26 May 2011 (PDT)

Personal tools