70 lines
1.6 KiB
C++
70 lines
1.6 KiB
C++
/****************************************************************************
|
|
GMS Send Thread Class
|
|
-----------------------------------------
|
|
|
|
begin : 2015/07/27
|
|
copyright : (C) 2005 Solbox Inc.
|
|
author : Dev Storage Team
|
|
email : huibong@solbox.com
|
|
version : 3.5
|
|
|
|
CopyRight(C) 2005 Solbox Inc. All Rights reserved.
|
|
Redistribution and use in source and binary forms, with or with out
|
|
modification, are not permitted in outside of Solbox Inc.
|
|
*****************************************************************************/
|
|
|
|
#ifndef __GMS_SEND_THREAD_H__
|
|
#define __GMS_SEND_THREAD_H__
|
|
|
|
|
|
#include <pthread.h>
|
|
#include <unistd.h>
|
|
#include <stdint.h>
|
|
#include <vector>
|
|
|
|
#include "ProtocolGms.h"
|
|
#include "SocketGms.h"
|
|
#include "ShmManager.h"
|
|
|
|
|
|
/// @brief CGmsSendThread
|
|
/// 본 클래스는 Thread 클래스로서...
|
|
/// FHS 등의 상태 정보를 주기적으로 GMS 에 전송 처리한다.
|
|
class CGmsSendThread
|
|
{
|
|
public:
|
|
|
|
// 생성 및 소멸자.
|
|
CGmsSendThread( CShmManager * pShmManager );
|
|
~CGmsSendThread();
|
|
|
|
// GMS 로 전송 작업을 시작
|
|
bool Start( void );
|
|
|
|
private:
|
|
|
|
// Thread function....
|
|
static void * threadFunc( void * arg );
|
|
|
|
// 실제 GMS 로 정보 전송을 담당하는 함수...
|
|
void Execute( void );
|
|
|
|
private:
|
|
|
|
// 쓰레드 핸들
|
|
pthread_t m_threadHandle;
|
|
|
|
// 공유메모리 접근을 위한 inferface 객체 (생성자를 통해 전달받음)
|
|
CShmManager * m_pShmManager;
|
|
|
|
|
|
// FHS 등의 상태 정보를 저장할 Vector 객체
|
|
std::vector<struct PacketDataGms> m_vecSystemInfo;
|
|
|
|
// GMS 로 Data 전송을 담당할 Socket 처리 Class.
|
|
CSocketGms m_socketGms;
|
|
|
|
};
|
|
|
|
#endif /* __GMS_SEND_THREAD_H__ */
|