OpenCores
URL https://opencores.org/ocsvn/w11/w11/trunk

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.6/] [tools/] [src/] [librlink/] [RlinkCommandExpect.ipp] - Diff between revs 19 and 24

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 19 Rev 24
// $Id: RlinkCommandExpect.ipp 488 2013-02-16 18:49:47Z mueller $
// $Id: RlinkCommandExpect.ipp 488 2013-02-16 18:49:47Z mueller $
//
//
// Copyright 2011- by Walter F.J. Mueller 
// Copyright 2011- by Walter F.J. Mueller 
//
//
// This program is free software; you may redistribute and/or modify it under
// This program is free software; you may redistribute and/or modify it under
// the terms of the GNU General Public License as published by the Free
// the terms of the GNU General Public License as published by the Free
// Software Foundation, either version 2, or at your option any later version.
// Software Foundation, either version 2, or at your option any later version.
//
//
// This program is distributed in the hope that it will be useful, but
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
// WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
// or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
// or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
// for complete details.
// for complete details.
//
//
// Revision History:
// Revision History:
// Date         Rev Version  Comment
// Date         Rev Version  Comment
// 2011-03-12   368   1.0    Initial version
// 2011-03-12   368   1.0    Initial version
// 2011-01-15   355   0.1    First draft
// 2011-01-15   355   0.1    First draft
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
/*!
/*!
  \file
  \file
  \version $Id: RlinkCommandExpect.ipp 488 2013-02-16 18:49:47Z mueller $
  \version $Id: RlinkCommandExpect.ipp 488 2013-02-16 18:49:47Z mueller $
  \brief   Implemenation (inline) of class RlinkCommandExpect.
  \brief   Implemenation (inline) of class RlinkCommandExpect.
*/
*/
// all method definitions in namespace Retro
// all method definitions in namespace Retro
namespace Retro {
namespace Retro {
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
inline void RlinkCommandExpect::SetStatus(uint8_t stat, uint8_t statmsk)
inline void RlinkCommandExpect::SetStatus(uint8_t stat, uint8_t statmsk)
{
{
  fStatusVal = stat;
  fStatusVal = stat;
  fStatusMsk = statmsk;
  fStatusMsk = statmsk;
  return;
  return;
}
}
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
inline void RlinkCommandExpect::SetData(uint16_t data, uint16_t datamsk)
inline void RlinkCommandExpect::SetData(uint16_t data, uint16_t datamsk)
{
{
  fDataVal = data;
  fDataVal = data;
  fDataMsk = datamsk;
  fDataMsk = datamsk;
  return;
  return;
}
}
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
inline void RlinkCommandExpect::SetBlock(const std::vector& block)
inline void RlinkCommandExpect::SetBlock(const std::vector& block)
{
{
  fBlockVal = block;
  fBlockVal = block;
  return;
  return;
}
}
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
inline void RlinkCommandExpect::SetBlock(
inline void RlinkCommandExpect::SetBlock(
                   const std::vector& block,
                   const std::vector& block,
                   const std::vector& blockmsk)
                   const std::vector& blockmsk)
{
{
  fBlockVal = block;
  fBlockVal = block;
  fBlockMsk = blockmsk;
  fBlockMsk = blockmsk;
  return;
  return;
}
}
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
inline uint8_t RlinkCommandExpect::StatusValue() const
inline uint8_t RlinkCommandExpect::StatusValue() const
{
{
  return fStatusVal;
  return fStatusVal;
}
}
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
inline uint8_t RlinkCommandExpect::StatusMask() const
inline uint8_t RlinkCommandExpect::StatusMask() const
{
{
  return fStatusMsk;
  return fStatusMsk;
}
}
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
inline uint16_t RlinkCommandExpect::DataValue() const
inline uint16_t RlinkCommandExpect::DataValue() const
{
{
  return fDataVal;
  return fDataVal;
}
}
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
inline uint16_t RlinkCommandExpect::DataMask() const
inline uint16_t RlinkCommandExpect::DataMask() const
{
{
  return fDataMsk;
  return fDataMsk;
}
}
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
inline const std::vector& RlinkCommandExpect::BlockValue() const
inline const std::vector& RlinkCommandExpect::BlockValue() const
{
{
  return fBlockVal;
  return fBlockVal;
}
}
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
inline const std::vector& RlinkCommandExpect::BlockMask() const
inline const std::vector& RlinkCommandExpect::BlockMask() const
{
{
  return fBlockMsk;
  return fBlockMsk;
}
}
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
inline bool RlinkCommandExpect::StatusCheck(uint8_t val) const
inline bool RlinkCommandExpect::StatusCheck(uint8_t val) const
{
{
  return (val|fStatusMsk) == (fStatusVal|fStatusMsk);
  return (val|fStatusMsk) == (fStatusVal|fStatusMsk);
}
}
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
inline bool RlinkCommandExpect::DataCheck(uint16_t val) const
inline bool RlinkCommandExpect::DataCheck(uint16_t val) const
{
{
  return (val|fDataMsk) == (fDataVal|fDataMsk);
  return (val|fDataMsk) == (fDataVal|fDataMsk);
}
}
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
inline bool RlinkCommandExpect::StatusIsChecked() const
inline bool RlinkCommandExpect::StatusIsChecked() const
{
{
  return fStatusMsk != 0xff;
  return fStatusMsk != 0xff;
}
}
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
inline bool RlinkCommandExpect::DataIsChecked() const
inline bool RlinkCommandExpect::DataIsChecked() const
{
{
  return fDataMsk != 0xffff;
  return fDataMsk != 0xffff;
}
}
} // end namespace Retro
} // end namespace Retro
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.