示例#1
0
const CPVRChannel *CPVRChannelGroup::GetByChannelUp(const CPVRChannel &channel) const
{
  CSingleLock lock(m_critSection);
  unsigned int iChannelNumber = GetChannelNumber(channel) + 1;
  if (iChannelNumber > size())
    iChannelNumber = 1;

  return GetByChannelNumber(iChannelNumber);
}
示例#2
0
const CPVRChannel *CPVRChannelGroup::GetByChannelDown(const CPVRChannel &channel) const
{
  CSingleLock lock(m_critSection);

  int iChannelNumber = GetChannelNumber(channel) - 1;
  if (iChannelNumber <= 0)
    iChannelNumber = size();

  return GetByChannelNumber(iChannelNumber);
}
bool CPVRChannelNumberInputHandler::CheckInputAndExecuteAction()
{
  const CPVRChannelNumber channelNumber = GetChannelNumber();
  if (channelNumber.IsValid())
  {
    // we have a valid channel number; execute the associated action now.
    ExecuteAction();
    return true;
  }
  return false;
}
示例#4
0
 ///Equality operator, we only check to see if the module number, channel number, and times are equal.
 ///@param [in] rhs : the configuration to compare to
 ///@return true if the module number, channel number, and time are identical
 bool operator==(const ChanEvent &rhs) const {
     return GetModuleNumber() == rhs.GetModuleNumber() && GetChannelNumber() == rhs.GetChannelNumber() &&
             GetTime() == rhs.GetTime();
 }
示例#5
0
 /** \return the channel id defined as pixie module # * 16 + channel number */
 unsigned int GetID() const { return DetectorLibrary::get()->GetIndex(GetModuleNumber(), GetChannelNumber()); }
示例#6
0
 //! \return The channelConfiguration in the map for the channel event
 const ChannelConfiguration &GetChanID() const {
     return DetectorLibrary::get()->at(GetModuleNumber(), GetChannelNumber());
 }