Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Korean
  4. QSocketNotifier 데이터 처리 지연
Forum Updated to NodeBB v4.3 + New Features

QSocketNotifier 데이터 처리 지연

Scheduled Pinned Locked Moved Unsolved Korean
1 Posts 1 Posters 519 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Comaru
    wrote on last edited by
    #1

    UDP 소켓 통신을 통해 데이터를 전송 받고 이를 처리 하는 프로그램을 작성 중입니다.

    m_pSocketNotifier  = new QSocketNotifier( m_nSock, QSocketNotifier::Read, parent);
    connect( m_pSocketNotifier, SIGNAL( activated( int)), this, SLOT( onReceiveFormUdp()));
    
    // data 수신 시그널과 data 처리 슬롯 연결
    connect( this, SIGNAL( received(char*, int) ), parent, SLOT( onPacketProc(char*, int) ));
    

    위와 같이 UDP 시그럴 activated 시 OnReceiveFormUdp() 함수에 연결 하고.
    해당 함수에서 데이터 처리후 received 함수를 호출 하여 연결된 OnPacketProc() 에서 처리 하도록 하였습니다.

    질문사항은 100Hz 로 UDP 신호를 받는다고 했을때
    OnPacketProc 에서의 처리속도는 200Hz 라고 가정 할경우

    데이터를 받는 속도가 처리 속도보다 빠르기 때문에 처리중일 경우 메시지를 버리는 작업이 필요 할것 같습니다.
    QSocket의 connect를 사용해보진 않았지만 event와 비슷한 개념인것 같은데.

    connect 인자를 활용하여 처리하려는 SLOT가 이미 실행 중이라면 Signal을 버리거나 할수 있나요?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved