GpsAreaLibStruct.cpp
上传用户:yffx2008
上传日期:2014-10-12
资源大小:12414k
文件大小:2k
- // GpsAreaLibStruct.cpp: implementation of the CGpsAreaLibStruct class.
- //
- //////////////////////////////////////////////////////////////////////
- #include "stdafx.h"
- #include "GpsSC.h"
- #include "GpsAreaLibStruct.h"
- #ifdef _DEBUG
- #undef THIS_FILE
- static char THIS_FILE[]=__FILE__;
- #define new DEBUG_NEW
- #endif
- //////////////////////////////////////////////////////////////////////
- // Construction/Destruction
- //////////////////////////////////////////////////////////////////////
- CGpsAreaLibStruct::CGpsAreaLibStruct()
- {
- BYTE i;
- m_byAreaABCD_Bytes = 8;
- m_arrAreaABCD[0] = 'A';
- m_arrAreaABCD[1] = 0 ;
- m_arrAreaABCD[2] = 'B';
- m_arrAreaABCD[3] = 0 ;
- m_arrAreaABCD[4] = 'C';
- m_arrAreaABCD[5] = 0 ;
- m_arrAreaABCD[6] = 'D';
- m_arrAreaABCD[7] = 0 ;
- m_arrAreaABCD[8] = 0 ;
- m_byAreaName_Bytes = 12;
- for(i = 0; i < m_byAreaName_Bytes + 1; i++) {
- m_arrAreaName[i] = 0;
- }
- m_byRelateSignLibName_Bytes = 8;
- for(i = 0; i < m_byRelateSignLibName_Bytes + 1; i++) {
- m_arrRelateSignLibName[i] = 0;
- }
- m_byAreaLevel = 0;
- }
- CGpsAreaLibStruct::~CGpsAreaLibStruct()
- {
- }
- void CGpsAreaLibStruct::GetStringData(CString AreaName,CString SignName)
- {
- BYTE i;
- for(i = 0; i < AreaName.GetLength(); i++) {
- m_arrAreaName[i] = AreaName.GetAt(i);
- }
- for(i = 0; i < SignName.GetLength(); i++) {
- m_arrRelateSignLibName[i] = SignName.GetAt(i);
- }
- }
- void CGpsAreaLibStruct::GetAreaLevelData(char A_Level, char B_Level,
- char C_Level, char D_Level,
- BYTE A_Serial,BYTE B_Serial,
- BYTE C_Serial,BYTE D_Serial)
- {
- m_arrAreaABCD[1] = A_Serial;
- m_arrAreaABCD[3] = B_Serial;
- m_arrAreaABCD[5] = C_Serial;
- m_arrAreaABCD[7] = D_Serial;
- }