fdhwlib
2.0.25
|
#include <pbuscontrol.h>
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:
Definition at line 37 of file pbuscontrol.h.
PbusControl::PbusControl | ( | ) |
PbusControl::~PbusControl | ( | ) |
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.
tel | Id of the telescope. |
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.
host | IP address of the recorder process waiting for the background data records. Normally this process would be located at the eye pc. |
telId | Id 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.
eyeId | Id of the eyestation (1..4) |
host | Hostname of the recorder process |
telId | Eye number of the building where the telescope belongs to |