TInt CActiveCommandStore::AddUnsolicitedAtCommand(CAtCommandBase *aAtCommand)
	{
	LOGTEXT(_L8("[Ltsy] Starting CActiveCommandStore::AddUnsolicitedAtCommand()"));
	if (aAtCommand == NULL)
		{
		return KErrArgument;
		}
	
	TInt nRes(KErrNone);
	nRes = iArray.Append(aAtCommand);
	LOGTEXT2(_L8("[Ltsy] Active Store Count = %d"), iArray.Count());
	return nRes;	
	}
示例#2
0
DgSqrD4Grid2DS::DgSqrD4Grid2DS (DgRFNetwork& networkIn, 
               const DgRF<DgDVec2D, long double>& backFrameIn, int nResIn, 
               unsigned int apertureIn, bool isCongruentIn, bool isAlignedIn,
               const string& nameIn)
        : DgDiscRFS2D (networkIn, backFrameIn, nResIn, apertureIn, 
                       isCongruentIn, isAlignedIn, nameIn) 
{ 
   // determine the radix

   radix_ = static_cast<int>(sqrt(static_cast<float>(aperture())));
   if (static_cast<unsigned int>(radix() * radix()) != aperture())
   {
      report(
      "DgSqrD4Grid2DS::DgSqrD4Grid2DS() aperture must be a perfect square",
       DgBase::Fatal);
   }

   if (isAligned() && radix() != 2 && radix() != 3)
   {
      report("DgSqrD4Grid2DS::DgSqrD4Grid2DS() only aligned apertures 4 and 9 "
             " parent/children operators fully implemented", DgBase::Warning);
   }

   // do the grids
  
   long double fac = 1;

   DgDVec2D trans;
   if (isCongruent())
   {
      trans = DgDVec2D(-0.5, -0.5);
   }
   else if (isAligned())
   {
      trans = DgDVec2D(0.0, 0.0);
   }
   else
   {
      report("DgSqrD4Grid2DS::DgSqrD4Grid2DS() grid system must be either "
             "congruent, aligned, or both", DgBase::Fatal);
   }

   for (int i = 0; i < nRes(); i++)
   {
      string newName = name() + "_" + dgg::util::to_string(i);

      //cout << newName << " " << fac << ' ' << trans << endl;

      DgContCartRF* ccRF = new DgContCartRF(network(), newName + string("bf"));

      new Dg2WayContAffineConverter(backFrame(), *ccRF, (long double) fac, 0.0, 
                                    trans); 

      (*grids_)[i] = new DgSqrD4Grid2D(network(), *ccRF, newName);
      new Dg2WayResAddConverter<DgIVec2D, DgDVec2D, long double>
                                                  (*this, *(grids()[i]), i);

      fac *= radix();
   }

} // DgSqrD4Grid2DS::DgSqrD4Grid2DS