fdhwlib  2.0.25
PbusControl Class Reference

#include <pbuscontrol.h>

Inheritance diagram for PbusControl:
Pbus

List of all members.

Public Member Functions


Detailed Description

Interface to maintain the Pbus layer.

The commands implemented in this class gives more control over the Pbus interface but do not extend the Pbus interface. Tnis will decrease the size of the pbus library, because the implementation of these functions is not dublicated in all Pbus classes.

Changes:

  • Added a function that starts a background loop.
Todo:
May be it's good idea to move also the commands stop and continue to this class It is not one of the basic functions to modify the semaphores!

Definition at line 37 of file pbuscontrol.h.


Constructor & Destructor Documentation

PbusControl::PbusControl ( )
PbusControl::~PbusControl ( )

Member Function Documentation

char* PbusControl::getHostName ( int  tel)

Get the ip address of the socket.

The command is only useful for the pbus access ip-layer. The command will return the ip address of the network interface that is connected to a certain telescope.

Note: The eye pc has a least two network interfaces. In the normal configuration all connected telescopes shoud use the same interface of the local eye net.

Parameters:
telId of the telescope.
Returns:
String with the Ip address of the local eye network interface.
unsigned long PbusControl::getPCTime ( )

Get the time of the PC connected to the Electronics.

The time of this PC is important, because the PC clock is loaded to the electronics second counter

void PbusControl::shutdown ( )

Shutdown the pbusdaemon at the selected telescope system.

void PbusControl::startBackgroundLoop ( char *  host = 0,
int  telId = 1 
)

Start background data readout loop.

Depending on the Pbus-Access layer a new process for the readout is started or the request is transfered to all the pbusdaemon of all connected telescopes. The host address of the machine where recorder waits for the background data and the id of telescope reading the the background records can be determined automatically, if command is executed on the pbud ip-layer.

Note: The background loop will require the recorder process started and waiting for data.

Parameters:
hostIP address of the recorder process waiting for the background data records. Normally this process would be located at the eye pc.
telIdId of the telescope where the readout loop is runing. The Id is an unique number and detemines the postion of the telescope. The numbering scheme starts with the telescopes eye station 1 in Los Leones: 1, 2, ..., 6. The first telescope in eye station 2 will continue with number 7, ....
int PbusControl::startBackgroundLoop ( int  eyeId,
char *  host = 0,
int  telId = 1 
)

Start background loop with the eyeid number in order give the connected telescopes their unique number.

Parameters:
eyeIdId of the eyestation (1..4)
hostHostname of the recorder process
telIdEye number of the building where the telescope belongs to

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