void AnimationFrameSubsetWidget::setFrames(AnimationController* pController)
{
    mType = FrameType();

    if (pController == NULL)
    {
        return;
    }

    const std::vector<Animation*>& anim = pController->getAnimations();
    if (anim.empty())
    {
        return;
    }

    setFrameType(pController->getFrameType());

    mpStartSpin->setFrames(pController);
    mpStartSpin->setEnabled(true);
    mpStopSpin->setFrames(pController);
    mpStopSpin->setEnabled(true);

    const std::vector<AnimationFrame>& frames = mpStartSpin->getFrames();

    mpStartSlider->setRange(0, frames.size()-1);
    mpStartSlider->setEnabled(true);
    mpStopSlider->setRange(0, frames.size()-1);
    mpStopSlider->setEnabled(true);
}
FloatFrame::FloatFrame(int size) {
  data=new float[size];
  len=0;
  this->size=size;
  this->sampleSize=sizeof(float)*8;
  this->lSigned=true;
  this->lBigEndian=AUDIOFRAME_BIGENDIAN;
  setFrameType(_FRAME_AUDIO_FLOAT);
}
void AnimationFrameSubsetWidget::setFrames(const std::vector<AnimationFrame>& frames, FrameType type)
{
    setFrameType(type);

    mpStartSpin->setFrames(frames, type);
    mpStartSpin->setEnabled(true);
    mpStopSpin->setFrames(frames, type);
    mpStopSpin->setEnabled(true);

    mpStartSlider->setRange(0, frames.size()-1);
    mpStartSlider->setEnabled(true);
    mpStopSlider->setRange(0, frames.size()-1);
    mpStopSlider->setEnabled(true);
}
Beispiel #4
0
void ChunkRequest::setDefaults( ATP_ChunkRequest_t * header, int id){	

	setFrameID( header, "ATP" );
	setFrameType( header, ATP_CHUNK_REQUEST );
	setMeshAddress( header, 0 );			// Pan address for XBee radios
	setDatetime( header, millis() );	//todo: Replace this with the Time library or when you get a Real Time Clock
	setAtpID( header, id );
	setVersion( header, 1 );
	setStatus( header, ATP_UNSENT );
	
	setStart( header, 0);
	setLength( header, 0);
	setTransferTypes( header, 0);
}
AvatarWidget::AvatarWidget(QWidget *parent) : QLabel(parent), ui(new Ui::AvatarWidget)
{
	ui->setupUi(this);

	mFlag.isOwnId = false;
	defaultAvatar = ":/images/no_avatar_background.png";
	mPeerState = RS_STATUS_OFFLINE ;

	setFrameType(NO_FRAME);

	/* connect signals */
	connect(NotifyQt::getInstance(), SIGNAL(peerHasNewAvatar(const QString&)), this, SLOT(updateAvatar(const QString&)));
	connect(NotifyQt::getInstance(), SIGNAL(ownAvatarChanged()), this, SLOT(updateOwnAvatar()));
}
Beispiel #6
0
void TransferRequest::setDefaults( ATP_TransferRequest_t * header, int id ){
	
	setFrameID( header, "ATP" );
	setFrameType( header, ATP_TRANSFER_REQUEST );
	setMeshAddress( header, 0 );			// Pan address for XBee radios
	setDatetime( header, (unsigned long) millis() );
	setAtpID( header, id );
	setVersion( header, 1 );
	setStatus( header, ATP_UNSENT );
	// Do not change the above members of the struct. The app.cpp dispatcher requires these.
	
	setTopChunk( header, 0 );
	setChunkCount( header, 0 );
	setSize( header, 0 );
	setExpires( header, 0 );
	setDescriptor( header, "CC");	
	setSource( header, 0 );		//todo Implement for Pinoccio Scouts, right now we're using XBee radios in direct connect mode
	setDestination( header, 0 );
	setFileName( header, "" );
	setBuffer( header, 0 );
}
Beispiel #7
0
TXRequest::TXRequest(QObject *parent) :
    DigiMeshPacket(parent)
{
    unsigned zero = 0x00;
    unsigned oxff = 0xFF;
    unsigned oxfe = 0xFE;
    destAddr16.append(oxff);
    destAddr16.append(oxfe);
    destAddr64.append(zero);
    destAddr64.append(zero);
    destAddr64.append(zero);
    destAddr64.append(zero);
    destAddr64.append(zero);
    destAddr64.append(zero);
    destAddr64.append(oxff);
    destAddr64.append(oxff);

    broadcastRadius = 1;
    transmitOptions = 0x00;
    setFrameType(0x10);
    setFrameId(0x01);
}
ResourceRequest::ResourceRequest(CrossThreadResourceRequestData* data)
    : ResourceRequest()
{
    setURL(data->m_url);
    setCachePolicy(data->m_cachePolicy);
    setTimeoutInterval(data->m_timeoutInterval);
    setFirstPartyForCookies(data->m_firstPartyForCookies);
    setRequestorOrigin(data->m_requestorOrigin);
    setHTTPMethod(AtomicString(data->m_httpMethod));
    setPriority(data->m_priority, data->m_intraPriorityValue);

    m_httpHeaderFields.adopt(data->m_httpHeaders.release());

    setHTTPBody(data->m_httpBody);
    setAllowStoredCredentials(data->m_allowStoredCredentials);
    setReportUploadProgress(data->m_reportUploadProgress);
    setHasUserGesture(data->m_hasUserGesture);
    setDownloadToFile(data->m_downloadToFile);
    setUseStreamOnResponse(data->m_useStreamOnResponse);
    setSkipServiceWorker(data->m_skipServiceWorker);
    setShouldResetAppCache(data->m_shouldResetAppCache);
    setRequestorID(data->m_requestorID);
    setRequestorProcessID(data->m_requestorProcessID);
    setAppCacheHostID(data->m_appCacheHostID);
    setRequestContext(data->m_requestContext);
    setFrameType(data->m_frameType);
    setFetchRequestMode(data->m_fetchRequestMode);
    setFetchCredentialsMode(data->m_fetchCredentialsMode);
    setFetchRedirectMode(data->m_fetchRedirectMode);
    setLoFiState(data->m_loFiState);
    m_referrerPolicy = data->m_referrerPolicy;
    m_didSetHTTPReferrer = data->m_didSetHTTPReferrer;
    m_checkForBrowserSideNavigation = data->m_checkForBrowserSideNavigation;
    m_uiStartTime = data->m_uiStartTime;
    m_isExternalRequest = data->m_isExternalRequest;
    m_inputPerfMetricReportPolicy = data->m_inputPerfMetricReportPolicy;
    m_followedRedirect = data->m_followedRedirect;
}
void AnimationFrameSubsetWidget::setFrames(Animation* pAnimation)
{
    mType = FrameType();

    if (pAnimation == NULL)
    {
        return;
    }

    setFrameType(pAnimation->getFrameType());

    mpStartSpin->setFrames(pAnimation);
    mpStartSpin->setEnabled(true);
    mpStopSpin->setFrames(pAnimation);
    mpStopSpin->setEnabled(true);

    const std::vector<AnimationFrame>& frames = pAnimation->getFrames();

    mpStartSlider->setRange(0, frames.size()-1);
    mpStartSlider->setEnabled(true);
    mpStopSlider->setRange(0, frames.size()-1);
    mpStopSlider->setEnabled(true);
}
Beispiel #10
0
//ivan
//int send_assoc_req(unsigned char *bssid,unsigned short cap,unsigned short BcnInterval,unsigned char *essid)
int send_assoc_req(unsigned char *pkt,unsigned int bodylen)
{
    Signal_t *signal;
	FrmDesc_t *pfrmDesc;
//	Frame_t *frame;	
//	U8 *body;

	signal = allocSignal();
	if (!signal)
	{
    	FPRINT("zd_SendPkt out of signal");
		return FALSE;
	}		
	pfrmDesc = allocFdesc();
	if (!pfrmDesc)
	{
		freeSignal(signal);
    	FPRINT("zd_SendPkt out of description");
		return FALSE;
	}
#if 0
    frame = pfrmDesc->mpdu;    
    setFrameType(frame, ST_ASOC_REQ);    
    
	body = frame->body;	
	//make header
	setAddr1(frame , bssid);
	setAddr2(frame , &dot11MacAddress);
	setAddr3(frame , bssid);	
	frame->HdrLen = MAC_HDR_LNG;
	
	//make frame body
	{
	    unsigned char len,len2;
	    unsigned char *rate=&mBrates;
	    
    	body[0] = cap & 0xff;			//Cap
    	body[1] = (cap & 0xff00) >> 8;	
    	body[2] = BcnInterval & 0xff;	//BcnPeriod
    	body[3] = (BcnInterval & 0xff00) >> 8;
    	
    	body[4] = 0;    //element id=ssid
    	body[5] = len= (unsigned char)strlen(essid);
    	memcpy(&body[6],essid,len);    	
    	len2=rate[1];    	
    	memcpy(&body[6+len],rate,len2+2);
    	frame->bodyLen=6+len+len2+2;

//ivan dump
    	zd1205_dump_data("===>", body, frame->bodyLen);
    }
#endif
    pfrmDesc->mpdu->body=pfrmDesc->buffer;
    memcpy(pfrmDesc->mpdu->header,pkt,MAC_HDR_LNG); //copy header
    pfrmDesc->mpdu->HdrLen = MAC_HDR_LNG;
    memcpy(pfrmDesc->buffer,pkt+MAC_HDR_LNG,bodylen);
    pfrmDesc->mpdu->bodyLen = bodylen;
   
    sendMgtFrame(signal, pfrmDesc);    
    return 1;
}