Пример #1
0
void SamsungAC2::getTemperaturePairs(
  PIRStatePairs &temperaturePairs) const
{
  resetPairs(temperaturePairs);

  PIRStatePair *eighteenPair = new PIRStatePair(
    "18 C", 0x23);
  temperaturePairs.push_back(eighteenPair);

  PIRStatePair *nineteenPair = new PIRStatePair(
    "19 C", 0x33);
  temperaturePairs.push_back(nineteenPair);

  PIRStatePair *twentyPair = new PIRStatePair(
    "20 C", 0x43);
  temperaturePairs.push_back(twentyPair);

  PIRStatePair *twentyonePair = new PIRStatePair(
    "21 C", 0x53);
  temperaturePairs.push_back(twentyonePair);

  PIRStatePair *twentytwoPair = new PIRStatePair(
    "22 C", 0x63);
  temperaturePairs.push_back(twentytwoPair);

  PIRStatePair *twentythreePair = new PIRStatePair(
    "23 C", 0x73);
  temperaturePairs.push_back(twentythreePair);

  PIRStatePair *twentyfourPair = new PIRStatePair(
    "24 C", 0x83);
  temperaturePairs.push_back(twentyfourPair);

  PIRStatePair *twentyfivePair = new PIRStatePair(
    "25 C", 0x93);
  temperaturePairs.push_back(twentyfivePair);

  PIRStatePair *twentysixPair = new PIRStatePair(
    "26 C", 0xA3);
  temperaturePairs.push_back(twentysixPair);

  PIRStatePair *twentysevenPair = new PIRStatePair(
    "27 C", 0xB3);
  temperaturePairs.push_back(twentysevenPair);

  PIRStatePair *twentyeightPair = new PIRStatePair(
    "28 C", 0xC3);
  temperaturePairs.push_back(twentyeightPair);

  PIRStatePair *twentyninePair = new PIRStatePair(
    "29 C", 0xD3);
  temperaturePairs.push_back(twentyninePair);

  PIRStatePair *thirtyPair = new PIRStatePair(
    "30 C", 0xE3);
  temperaturePairs.push_back(thirtyPair);
}
Пример #2
0
int resultSetFindProperPairs(ResultPairs *pairp, int dist_lo, int dist_hi,
			     int maxnum,
			     int swscor_min,
			     RSLTPAIRLIB_t pairlibcode,
			     const ResultSet *rsltAp, const ResultSet *rsltBp)
{ 
  int errcode;
  short nresA, nresB;
  /* A: first mate, B: second mate of a pair */
  resultSetGetNumberOfSegments(&nresA, NULL, rsltAp);
  resultSetGetNumberOfSegments(&nresB, NULL, rsltBp);
  if (nresA < 1 || nresB < 1) {
    resetPairs(pairp);
    return ERRCODE_SUCCESS;
  }
  
  if (!(errcode = generateOFFSIVAL(&pairp->ivr, dist_lo, dist_hi,
				   rsltAp))) {
#ifdef results_debug
    fprintOFFSIVAL(stdout, pairp->ivr);
#endif
    pairp->status |= RSLTPAIRSFLG_INTVAL;

    if (swscor_min < 1) {
      int sw2ndmax = 0;
      int swmax = resultSetGetMaxSwat(rsltBp, &sw2ndmax);
      swscor_min = (sw2ndmax > 0)? sw2ndmax: swmax;
    }
    if (dist_lo > dist_hi) {
      pairp->dmin = dist_hi;
      pairp->dmax = dist_lo;
    } else {
      pairp->dmin = dist_lo;
      pairp->dmax = dist_hi;
    }

    errcode = findProperMATEPAIR(pairp, rsltBp,
				 swscor_min, pairp->ivr, pairlibcode,
				 maxnum);

    pairp->n_proper = (int) ARRLEN(pairp->mpr);

    if (errcode == ERRCODE_PAIRNUM) {
      pairp->status |= RSLTPAIRSFLG_CEILING;
      errcode = ERRCODE_SUCCESS;
    }
    
    pairp->status |= (RSLTPAIRSFLG_MATES | RSLTPAIRSFLG_MAPFLG | RSLTPAIRSFLG_INSLIM);
    pairp->status &= ~(RSLTPAIRSFLG_SORTED | RSLTPAIRSFLG_NPROPER);
  }

  return errcode;
}
Пример #3
0
void SamsungAC2::getAirCleanPairs(
  PIRStatePairs &aircleanPairs) const
{
  resetPairs(aircleanPairs);

  PIRStatePair *offPair = new PIRStatePair(
    "Off", 0x0);
  aircleanPairs.push_back(offPair);

  PIRStatePair *onPair = new PIRStatePair(
    "On", 0x4);
  aircleanPairs.push_back(onPair);
}
Пример #4
0
void SamsungAC2::getTimerOptionPairs(
  PIRStatePairs &timerOptionPairs) const
{
  resetPairs(timerOptionPairs);

  PIRStatePair *cancelPair = new PIRStatePair(
    "Cancel Timers", 0x0);
  timerOptionPairs.push_back(cancelPair);

  PIRStatePair *onPair = new PIRStatePair(
    "Set On-Timer", 0x2);
  timerOptionPairs.push_back(onPair);

  PIRStatePair *offPair = new PIRStatePair(
    "Set Off-Timer", 0x4);
  timerOptionPairs.push_back(offPair);
}
Пример #5
0
void SamsungAC2::getTurboModePairs(
  PIRStatePairs &turboModePairs) const
{
  resetPairs(turboModePairs);

  PIRStatePair *normalPair = new PIRStatePair(
    "Normal", 0x21);
  turboModePairs.push_back(normalPair);

  PIRStatePair *turboPair = new PIRStatePair(
    "Turbo", 0x27);
  turboModePairs.push_back(turboPair);

  PIRStatePair *farPair = new PIRStatePair(
    "Far", 0x2D);
  turboModePairs.push_back(farPair);
}
Пример #6
0
int resultSetFindPairs(ResultPairs *pairp,
		       RSLTPAIRFLG_t pairflg,
		       RSLTPAIRLIB_t pairlibcode,
		       int dmin, int dmax,
		       const ResultSet *rsltAp, const ResultSet *rsltBp)
{
  int errcode;
  BOOL_t isSingleA, isSingleB;
  struct GETMATEPAIRARG_ arg;
  /* 'A': first read, 'B': 2nd read */
  resetPairs(pairp);
  ARRLEN(pairp->mpr) = 0;
  pairp->n_proper = 0;
  pairp->n_within = 0;
  pairp->status = 0;
  if (dmin > dmax) {
    pairp->dmin = dmax;
    pairp->dmax = dmin;
  } else {
    pairp->dmin = dmin;
    pairp->dmax = dmax;
  }

  isSingleA = resultSetGetRankDepth(rsltAp, NULL, &arg.max_rankA);
  isSingleB = resultSetGetRankDepth(rsltBp, NULL, &arg.max_rankB);
  if ((pairflg & RSLTPAIRFLG_RESTRICT_2nd) && (isSingleA))
    arg.max_rankA = 0;
  else if ((pairflg & RSLTPAIRFLG_RESTRICT_1st) && (isSingleB))
    arg.max_rankB = 0;
   
  arg.pairflg = pairflg;
  arg.pairlibcode = pairlibcode;
  arg.ap = NULL;
  arg.rsltAp = rsltAp;
  arg.rsltBp = rsltBp;
  arg.pairp = pairp;

  errcode = resultSetDo(&arg, getMATEPAIRcbf_OuterLoop, rsltAp);
  if (!(errcode)) {
    pairp->status |= RSLTPAIRSFLG_MATES | RSLTPAIRSFLG_NPROPER | RSLTPAIRSFLG_INSLIM;
    pairp->status &= ~RSLTPAIRSFLG_SORTED;
  }

  return errcode;
}
Пример #7
0
void SamsungAC2::getOperatingModePairs(
  PIRStatePairs &modePairs) const
{
  resetPairs(modePairs);

  PIRStatePair *autoPair = new PIRStatePair(
    "Auto", 0x0);
  modePairs.push_back(autoPair);

  PIRStatePair *coolPair = new PIRStatePair(
    "Cool", 0x1);
  modePairs.push_back(coolPair);

  PIRStatePair *dehumidifyPair = new PIRStatePair(
    "Dehumidify", 0x2);
  modePairs.push_back(dehumidifyPair);

  PIRStatePair *fanPair = new PIRStatePair(
    "Fan", 0x3);
  modePairs.push_back(fanPair);
}
Пример #8
0
// Only 4 bits for the following!
void SamsungAC2::getFanPairs(
  PIRStatePairs &fanPairs) const
{
  resetPairs(fanPairs);

  PIRStatePair *autoPair = new PIRStatePair(
    "Auto", 0x1);
  fanPairs.push_back(autoPair);

  PIRStatePair *lowPair = new PIRStatePair(
    "Low", 0x5);
  fanPairs.push_back(lowPair);

  PIRStatePair *mediumPair = new PIRStatePair(
    "Medium", 0x9);
  fanPairs.push_back(mediumPair);

  PIRStatePair *highPair = new PIRStatePair(
    "High", 0xB);
  fanPairs.push_back(highPair);
}
Пример #9
0
void SamsungAC2::getSwingPairs(
  PIRStatePairs &swingPairs) const
{
  resetPairs(swingPairs);

  PIRStatePair *swingOffPair = new PIRStatePair(
    "Off", 0xFE);
  swingPairs.push_back(swingOffPair);

  PIRStatePair *swingUDPair = new PIRStatePair(
    "Up/Down", 0xAE);
  swingPairs.push_back(swingUDPair);

  PIRStatePair *swingLRPair = new PIRStatePair(
    "Left/Right", 0xBE);
  swingPairs.push_back(swingLRPair);

  PIRStatePair *swingUDLRPair = new PIRStatePair(
    "U/D/L/R", 0xCE);
  swingPairs.push_back(swingUDLRPair);
}
Пример #10
0
void PIRACKeyset::getTimerOptionPairs(
  PIRStatePairs &timerOptionPairs) const
{
  resetPairs(timerOptionPairs);
}
Пример #11
0
void PIRACKeyset::getAirCleanPairs(
  PIRStatePairs &aircleanPairs) const
{
  resetPairs(aircleanPairs);
}
Пример #12
0
void PIRACKeyset::getOperatingModePairs(
  PIRStatePairs &modePairs) const
{
  resetPairs(modePairs);
}
Пример #13
0
void PIRACKeyset::getFanPairs(
  PIRStatePairs &fanPairs) const
{
  resetPairs(fanPairs);
}
Пример #14
0
void PIRACKeyset::getTemperaturePairs(
  PIRStatePairs &temperaturePairs) const
{
  resetPairs(temperaturePairs);
}
Пример #15
0
void PIRACKeyset::getSwingPairs(
  PIRStatePairs &swingPairs) const
{
  resetPairs(swingPairs);
}
Пример #16
0
void PIRACKeyset::getTurboModePairs(
  PIRStatePairs &turboModePairs) const
{
  resetPairs(turboModePairs);
}