void MailSyncSourceConfig::assign(const MailSyncSourceConfig& sc) {
    setName     (sc.getName     ());
    setURI      (sc.getURI      ());
    setSyncModes(sc.getSyncModes());
    setType     (sc.getType     ());
    setSync     (sc.getSync     ());
    setLast     (sc.getLast     ());

    setEncoding      (sc.getEncoding      ());
    setVersion       (sc.getVersion       ());
    setSupportedTypes(sc.getSupportedTypes());
    //setCtCap         (sc.getCtCap         ());
    setEncryption    (sc.getEncryption    ());

    setDownloadAge(sc.getDownloadAge());
    setBodySize(sc.getBodySize());
    setAttachSize(sc.getAttachSize());

    setInbox(sc.getInbox());
    setOutbox(sc.getOutbox());
    setSent(sc.getSent());
    setTrash(sc.getTrash());
    setDraft(sc.getDraft());
    setSchedule(sc.getSchedule());
    mailAccounts = sc.getMailAccounts();
}
void CCovarianceFunctionCacheOld::validateCache()
{
	if (!isInSync())
	{
		KCacheNull = true;
		SVDCacheNull = true;
		cholKCacheNull = true;
		//set sync
	}
	setSync();
}
/*CCovarainceFunctionCache*/
void CCovarianceFunctionCacheOld::setCovar(PCovarianceFunction covar)
	{
		//delete sync child of old covar
		if(this->covar)
			this->covar->delSyncChild(sync);
		//set new covar
		this->covar = covar;
		//register sync handler
		this->covar->addSyncChild(sync);
		//clear cache:
		setSync(false);
	}
Example #4
0
/**
  * @brief This function is called when an UDP datagrm has been received on the port UDP_PORT.
  * @param arg user supplied argument (udp_pcb.recv_arg)
  * @param pcb the udp_pcb which received data
  * @param p the packet buffer that was received
  * @param addr the remote IP address from which the packet was received
  * @param port the remote port from which the packet was received
  * @retval None
  */
void udp_echoserver_receive_callback(void *arg, struct udp_pcb *upcb, struct pbuf *p, struct ip_addr *addr, u16_t port)
{
	int answer[2] = {0, 0};
	if(sizeof(buf_com) < p->tot_len || port!= BagAddr.port_c)
		return;
	pbuf_copy_partial(p, buf_com, p->tot_len, 0);
	switch(buf_com[0]) {
		case COM_SYNC:
			if(p->tot_len == sizeof(int32_t)) {
				setSync();
				answer[0] = buf_com[0];
				answer[1] = OK;
				trans_Control(answer, sizeof(answer));
			}
		}
	pbuf_free(p);
	return;
}
Example #5
0
void encTmrISR(void)
{
 encTmrClrIF();	 		/* clear interrupt */
 if (encRun)
 {
  if (encRunCount != 0)		/* if encoder counting */
  {
   if (--encRunCount == 0)	/* if count is now zero */
   {
    encStop();			/* stop encoder */
   }
  }

  encCounter += 1;		/* update counter */
  if (encCounter >= encMax)	/* if at maximum */
  {
   encCounter = 0;		/* reset */
   encRevCounter += 1;		/* count a revolution */
   setSync();			/* set the sync bit */
  }
  else				/* if not at maximum */
  {
   clrSync();			/* clear sync bit */
  }

  switch (encState)		/* select on state */
  {
  case 0:
   setABit();
   break;
  case 1:
   setBBit();
   break;
  case 2:
   clrABit();
   break;
  case 3:
   clrBBit();
   break;
  }
  encState += 1;		/* update state */
  encState &= 0x3;		/* mas in range */
 }
}
Example #6
0
void Entity::reSync(const M_EntitySync& m)
{
	setSync(m);

	body->SetActive(isActive);
	body->SetAngularDamping(angularDamping);
	body->SetAngularVelocity(angularVelocity);
	body->SetAwake(isAwake);
	body->SetBullet(isBullet);
	body->SetFixedRotation(isFixedRotation);
	body->SetGravityScale(gravityScale);
	body->SetLinearDamping(linearDamping);
	body->SetLinearVelocity(b2Vec2(linearVelocityX, linearVelocityY));
	//body->SetMassData
	body->SetSleepingAllowed(isSleepingAllowed);
	body->SetTransform( b2Vec2(positionX, positionY), angle);
	//body->SetType
	//body->SetUserData
}
Example #7
0
void SyncSourceConfig::assign(const SyncSourceConfig& sc) {
    if (&sc == this) {
        return;
    }

    setName          (sc.getName          ());
    setURI           (sc.getURI           ());
    setSyncModes     (sc.getSyncModes     ());
    setType          (sc.getType          ());
    setSync          (sc.getSync          ());
    setLast          (sc.getLast          ());
    setEncoding      (sc.getEncoding      ());
    setVersion       (sc.getVersion       ());
    setSupportedTypes(sc.getSupportedTypes());
    setSyncMode      (sc.getSyncMode      ());
	setIsAllowed     (sc.isAllowed        ());
//    setCtCap         (sc.getCtCap         ());
    setEncryption    (sc.getEncryption    ());
    setLastSourceError(sc.getLastSourceError());
    setLastSyncServerTime(sc.AbstractSyncSourceConfig::getLastSyncServerTime());
    
    extraProps = sc.getExtraProps();
}
Example #8
0
void lclcmd(int ch)
{
 if (ch == 'd')			/* dump memory */
 {
  putx(' ');
  if (gethex())
  {
   unsigned char *p;

   p = (unsigned char *) (int) val;
   if (gethex())
   {
    newline();
    prtbuf(p,val);
   }
  }
 }
#if DBGMSG
 else if (ch == 'D')		/* dump dbg buffer */
 {
  newline();
  int empty = dbgemp;
  for (int i = 0; i < dbgcnt; i++)
  {
   P_DBGMSG p = &dbgdata[empty];
   float t = (float) p->time / 1000;
   printf("%8.3f %8s %8x %12d\n", t, p->str,
	  (unsigned int) p->val, (int) p->val);
   empty++;
   if (empty >= MAXDBGMSG)
    empty = 0;
   while (1)
   {
    if (pollBufChar() == 0)
     break;
   }
  }
  printf("z %d x %d\n", zLoc, xLoc);
 }
 else if (ch == 'E')		/* clear debug buffer */
 {
  clrDbgBuf();
 }
#endif
#if ENCTEST
 else if (ch == 'e')
 {
  printf(" counts ");
  fflush(stdout);
  if (getnum())
  {
   encInit();
   encRunCount = val;
   encStart(true);
  }
  else
  {
   printf(" stop[y] ");
   fflush(stdout);
   ch = getx();
   if (ch == 'y')
   {
    encStop();
   }
  }
 }
#endif
 else if (ch == 't')
 {
  putx(' ');
  if (getnum())
  {
   newline();
   int i;
   int j = 0;
   for (i = 0; i < val; i++)
   {
    LOAD(XLDZCTL, j);
    read1(XRDZCTL);
    int testVal = j & ((1 << (zCtl_size)) - 1);
    if (readval.i != testVal)
    {
     setSync();
     printf("%4d z testVal %8x readVal %8x\n",
	    i, (unsigned int) testVal, (unsigned int) readval.i);
     clrSync();
    }

    LOAD(XLDXCTL, j);
    read1(XRDXCTL);
    testVal = j & ((1 << (xCtl_size)) - 1);
    if (readval.i != testVal)
    {
     setSync();
     printf("%4d x testVal %8x readVal %8x\n",
	    i, (unsigned int) testVal, (unsigned int) readval.i);
     clrSync();
    }
    j += 1;
    while (pollBufChar() != 0)
     ;
   }
  }
 }
 else if (ch == 'q')
 {
  gpioInfo(GPIOA);
  usartInfo(USART1);
  usartInfo(USART2);
  usartInfo(USART6);
  putstr1("start remcmd\n");
 }
 else if (ch == 'r')		/* read memory */
 {
  putx(' ');
  if (gethex())
  {
   printf("%x",*(int16_t *) (int) val);
  }
 }
 else if (ch == 'w')		/* write memory */
 {
  putx(' ');
  if (gethex())
  {
   int16_t *p;
   p = (int16_t *) (int) val;
   printf(" %x ",*p);
   if (gethex())
   {
    *p = val;
   }
  }
 }
 else if (ch == 'a')		/* set command address */
 {
  putx(' ');
  if (getnum())
   addr = val;
 }
 else if (ch == 'g')		/* read spi data */
 {
  putx(' ');
  if (getnum())
  {
   addr = val;			/* save address */
   read1(addr);			/* read from device */
   printf("\nread addr %x val %8lx %10ld",addr,readval.i,readval.i);
  }
 }
 else if (ch == 'G')		/* read spi repeatedly */
 {
  putx(' ');
  if (getnum())			/* enter address */
  {
   addr = val;			/* save address */
   putx(' ');
   if (getnum())		/* enter number of tries */
   {
    newline();
    int16_t i = (int16_t) val;
    while (1)
    {
     read1(addr);		/* read from device */
     if (chRdy())		/* if character available */
     {
      ch = chRead();
      break;
     }
     if ((i != 0)
     &&  (--i <= 0))
      break;
    }
    printf("spiw0 %d spiw1 %d",spiw0,spiw1);
   }
  }
 }
 else if (ch == 's')		/* send val to address a */
 {
  printf(" addr ");
  fflush(stdout);
  if (getnum())			/* read address */
  {
   addr = val;
   printf(" data ");
   fflush(stdout);
   if (getnum())		/* read data */
   {
    printf("\nsending addr %x %10ld val %8lx",addr,val,val);
    LOAD(addr,val);
   }
  }
 }
 else if (ch == 'p')		/* set print flag */
 {
  putx(' ');
  if (getnum())
  {
   print = val;
  }
 }
 else if (ch == 'r')		/* reset */
 {
  LOAD(XLDZCTL,0);
  LOAD(XLDXCTL,0);
  LOAD(XLDTCTL,0);
  LOAD(XLDDCTL,0);
 }
 else if (ch == 'x')		/* move x rel */
 {
  putx(' ');
  if (getnum())
  {
   xMoveRel(val, XMOV);
  }
 }
 else if (ch == 'z')		/* move z rel */
 {
  putx(' ');
  if (getnum())
  {
   zMoveRel(val, XMOV);
  }
 }
 else if (ch == 'u')		/* send debug message */
 {
  putx(' ');
  if (getnum())
  {
   dbgmsg("test",val);
  }
 }
}
 void setIsRmw() {
   theOperation = Rmw;
   setSync();
 }