#include <pit_driver_foChannel.h>
Public Member Functions | |
pit_driver_foChannel (unsigned int foChannelNumber, pit_comm *commFEE, pit_driver_opticalLink *parentOpticalLink) | |
Default constructor. | |
~pit_driver_foChannel (void) | |
Destructor. | |
void | refresh (bool makeParentRead=true) |
Function to query the configurator and driver to refresh values of the previous data members. | |
unsigned int | getFoChannelNumber () const |
getter of the Fast OR channel number (chip) | |
unsigned int | getLinkNumber () const |
getter of the LinkNumber of this object (retrieved from parent) | |
unsigned int | getBoardNumber () const |
getter of the OPTIN board number of this object (retrieved from parent of parent) | |
t_sideCoord | getSide () const |
Getter of the SPD side coordinate of this object, queries the parent. | |
unsigned int | getSector () const |
Getter of the SPD sector coordinate of this object, queries the parent. | |
unsigned int | getHalfStave () const |
Getter of the SPD half_stave coordinate of this object, queries the parent. | |
bool | isRequired (void) const |
Getter of the channelRequired data member. | |
bool | isMasked () const |
Getter of the masked data member. | |
void | setMask (bool masked) |
Method to access the hardware, set the mask bit for this channel (calls parent methods) and refresh member masked. | |
bool | isForced (void) const |
Getter of the forced data member. | |
void | forceHigh (bool yesNo) |
Method to access the hardware, set the force bit for this channel (calls parent methods) and refresh member forced. | |
bool | isRateValid (void) const |
Method to access the hardware, read the rate valid bit of this channel (calls parent methods) and refresh validRate member. | |
UInt32 | readCounter (void) const |
Method to access the hardware, read the FO counter of this channel (calls parent methods). | |
Private Attributes | |
unsigned int | foChannelNumber |
Number of the FO channel (chip number) in the link. | |
pit_driver_opticalLink * | parent_opticalLink |
Parent optical link (Half stave). | |
pit_comm * | commFEE |
Pointer to the hardware communication object. | |
log4cpp::Category * | logDriverFoChannel |
Logger object. | |
bool | channelRequired |
Data member to store if this FO channel is required in the present configuration. Value retrieved by querying the configurator class. | |
bool | masked |
Data member to store if this FO channel is masked in the pit hardware. | |
bool | forced |
Data member to store if this FO channel is pre set by the user. | |
bool | validRate |
Data member to store if the FO rate of this channel is between the lower and upper limits (read from link status). |
Definition at line 26 of file pit_driver_foChannel.h.
pit_driver_foChannel::pit_driver_foChannel | ( | unsigned int | foChannelNumber, | |
pit_comm * | commFEE, | |||
pit_driver_opticalLink * | parentOpticalLink | |||
) |
Default constructor.
foChannelNumber | Number of the FO channel represented by this object, setting foChannelNumber | |
commFEE | Pointer to the hardware communication object | |
parentOpticalLink | Pointer to the parent pit_driver_opticalLink object, use to access its methods |
Definition at line 9 of file pit_driver_foChannel.cpp.
References commFEE, foChannelNumber, logDriverFoChannel, and parent_opticalLink.
pit_driver_foChannel::~pit_driver_foChannel | ( | void | ) |
void pit_driver_foChannel::refresh | ( | bool | makeParentRead = true |
) |
Function to query the configurator and driver to refresh values of the previous data members.
Definition at line 30 of file pit_driver_foChannel.cpp.
References extractFromUInt32(), foChannelNumber, pit_driver_opticalLink::getFoMask(), pit_driver_opticalLink::getUdfFoPattern(), masked, parent_opticalLink, and pit_driver_opticalLink::readLinkSetting().
unsigned int pit_driver_foChannel::getFoChannelNumber | ( | ) | const [inline] |
getter of the Fast OR channel number (chip)
Definition at line 81 of file pit_driver_foChannel.h.
References foChannelNumber.
unsigned int pit_driver_foChannel::getLinkNumber | ( | ) | const [inline] |
getter of the LinkNumber of this object (retrieved from parent)
Definition at line 42 of file pit_driver_foChannel.cpp.
References pit_driver_opticalLink::getLinkNumber(), and parent_opticalLink.
unsigned int pit_driver_foChannel::getBoardNumber | ( | ) | const [inline] |
getter of the OPTIN board number of this object (retrieved from parent of parent)
Definition at line 44 of file pit_driver_foChannel.cpp.
References pit_driver_opticalLink::getBoardNumber(), and parent_opticalLink.
t_sideCoord pit_driver_foChannel::getSide | ( | ) | const [inline] |
Getter of the SPD side coordinate of this object, queries the parent.
Definition at line 46 of file pit_driver_foChannel.cpp.
References pit_driver_opticalLink::getSide(), and parent_opticalLink.
unsigned int pit_driver_foChannel::getSector | ( | ) | const [inline] |
Getter of the SPD sector coordinate of this object, queries the parent.
Definition at line 48 of file pit_driver_foChannel.cpp.
References pit_driver_opticalLink::getSector(), and parent_opticalLink.
unsigned int pit_driver_foChannel::getHalfStave | ( | ) | const [inline] |
Getter of the SPD half_stave coordinate of this object, queries the parent.
Definition at line 50 of file pit_driver_foChannel.cpp.
References pit_driver_opticalLink::getHalfStave(), and parent_opticalLink.
bool pit_driver_foChannel::isRequired | ( | void | ) | const [inline] |
Getter of the channelRequired data member.
Definition at line 98 of file pit_driver_foChannel.h.
References channelRequired.
bool pit_driver_foChannel::isMasked | ( | ) | const [inline] |
Getter of the masked data member.
Definition at line 102 of file pit_driver_foChannel.h.
References masked.
void pit_driver_foChannel::setMask | ( | bool | masked | ) |
Method to access the hardware, set the mask bit for this channel (calls parent methods) and refresh member masked.
Definition at line 52 of file pit_driver_foChannel.cpp.
References FO_MASK_OFFSET, foChannelNumber, insertIntoUInt32(), masked, parent_opticalLink, pit_driver_opticalLink::readLinkSetting(), and pit_driver_opticalLink::writeLinkSetting().
Referenced by pit_driver::executeCommand().
bool pit_driver_foChannel::isForced | ( | void | ) | const [inline] |
Getter of the forced data member.
Definition at line 110 of file pit_driver_foChannel.h.
References forced.
void pit_driver_foChannel::forceHigh | ( | bool | yesNo | ) |
Method to access the hardware, set the force bit for this channel (calls parent methods) and refresh member forced.
Definition at line 66 of file pit_driver_foChannel.cpp.
References foChannelNumber, forced, insertIntoUInt32(), parent_opticalLink, pit_driver_opticalLink::readLinkSetting(), UDF_FO_OFFSET, and pit_driver_opticalLink::writeLinkSetting().
Referenced by pit_driver::executeCommand().
bool pit_driver_foChannel::isRateValid | ( | void | ) | const [inline] |
Method to access the hardware, read the rate valid bit of this channel (calls parent methods) and refresh validRate member.
Definition at line 80 of file pit_driver_foChannel.cpp.
References commFEE, foChannelNumber, pit_driver_opticalLink::isInnerLayer(), MAX_FASTOR_INNER_OFFSET, MAX_FASTOR_OUTER_OFFSET, MIN_FASTOR_INNER_OFFSET, MIN_FASTOR_OUTER_OFFSET, parent_opticalLink, pit_comm::PITReadWord(), and readCounter().
UInt32 pit_driver_foChannel::readCounter | ( | void | ) | const |
Method to access the hardware, read the FO counter of this channel (calls parent methods).
Definition at line 105 of file pit_driver_foChannel.cpp.
References commFEE, FASTOR_COUNTER_OFFSET, foChannelNumber, pit_driver_opticalLink::getBoardBaseAdress(), pit_driver_opticalLink::getLinkNumber(), NUMBER_FO_CHANNELS, parent_opticalLink, and pit_comm::PITReadWord().
Referenced by pit_driver::executeCommand(), and isRateValid().
unsigned int pit_driver_foChannel::foChannelNumber [private] |
Number of the FO channel (chip number) in the link.
Each chip (FO channel) is numberd from 0 to 9 on a half stave. This data member is the number to identify the FO channel represented by this object in the parent link.
Definition at line 33 of file pit_driver_foChannel.h.
Referenced by forceHigh(), getFoChannelNumber(), isRateValid(), pit_driver_foChannel(), readCounter(), refresh(), and setMask().
Parent optical link (Half stave).
Each chip (FO channel) belongs to a half stave. This data member is the pointer to the parent object representing the link (i.e. half stave) that this FO channel belongs to.
Definition at line 39 of file pit_driver_foChannel.h.
Referenced by forceHigh(), getBoardNumber(), getHalfStave(), getLinkNumber(), getSector(), getSide(), isRateValid(), pit_driver_foChannel(), readCounter(), refresh(), and setMask().
pit_comm* pit_driver_foChannel::commFEE [private] |
Pointer to the hardware communication object.
This is a pointer to the instance of pit_comm that is implementing the communication via DDL. This must be initialized (in the constructor) and is then used by this class methods to access hardware.
Definition at line 46 of file pit_driver_foChannel.h.
Referenced by isRateValid(), pit_driver_foChannel(), and readCounter().
log4cpp::Category* pit_driver_foChannel::logDriverFoChannel [private] |
Logger object.
Definition at line 49 of file pit_driver_foChannel.h.
Referenced by pit_driver_foChannel().
bool pit_driver_foChannel::channelRequired [private] |
Data member to store if this FO channel is required in the present configuration. Value retrieved by querying the configurator class.
Definition at line 54 of file pit_driver_foChannel.h.
Referenced by isRequired().
bool pit_driver_foChannel::masked [private] |
Data member to store if this FO channel is masked in the pit hardware.
Definition at line 57 of file pit_driver_foChannel.h.
Referenced by isMasked(), refresh(), and setMask().
bool pit_driver_foChannel::forced [private] |
Data member to store if this FO channel is pre set by the user.
Definition at line 60 of file pit_driver_foChannel.h.
Referenced by forceHigh(), and isForced().
bool pit_driver_foChannel::validRate [private] |
Data member to store if the FO rate of this channel is between the lower and upper limits (read from link status).
Definition at line 63 of file pit_driver_foChannel.h.