|
@@ -147,19 +147,26 @@ namespace GLOBAL
|
|
TCHAR szDist[5][5] = {0};
|
|
TCHAR szDist[5][5] = {0};
|
|
TCHAR szLevel[5][5] = {0};
|
|
TCHAR szLevel[5][5] = {0};
|
|
|
|
|
|
- //TCHAR szData[1024] = {0};
|
|
|
|
- //if (_stscanf_s(strDist.GetString(), _T("%[^=]"), szData, 1024))
|
|
|
|
if (_stscanf_s(strDist.GetString(), _T("%*[^=]=%[^,],%[^,],%[^,],%[^,],%s"), szDist[0], 5, szDist[1], 5, szDist[2], 5, szDist[3], 5, szDist[4], 5) == 5 )
|
|
if (_stscanf_s(strDist.GetString(), _T("%*[^=]=%[^,],%[^,],%[^,],%[^,],%s"), szDist[0], 5, szDist[1], 5, szDist[2], 5, szDist[3], 5, szDist[4], 5) == 5 )
|
|
{
|
|
{
|
|
- if (_stscanf_s(strLevel.GetString(), _T("%*[^=]=%[^,],%[^,],%[^,],%[^,],%s"), szDist[0], 5, szDist[1], 5, szDist[2], 5, szDist[3], 5, szDist[4], 5) == 5 )
|
|
|
|
|
|
+ if (_stscanf_s(strLevel.GetString(), _T("%*[^=]=%[^,],%[^,],%[^,],%[^,],%s"), szLevel[0], 5, szLevel[1], 5, szLevel[2], 5, szLevel[3], 5, szLevel[4], 5) == 5 )
|
|
{
|
|
{
|
|
|
|
+ std::bitset<5> bitDist(0);
|
|
|
|
+ std::bitset<5> bitLevel(0);
|
|
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- //if ( _stscanf_s(buf, "%[^;];%[^;];%[^;];%[^;];%[^;];%[^;];%[^;];%[^;]", name, MAX_PATH, option, MAX_PATH, head, MAX_PATH, code, MAX_PATH, param, MAX_PATH, multicode, MAX_PATH, read_wait_time, MAX_PATH, cmd_wait_time, MAX_PATH) == 8) // µÈ¼ÛÏÂÃæ;
|
|
|
|
- //if (_stscanf_s(strDist.GetString(), "%[^=]=%[^,],%[^,],%[^,],%[^,],%[^,],%s", szDist[0], 5, szDist[1], 5, szDist[2], 5, szDist[3], 5, szDist[4], 5) == 6)
|
|
|
|
- {
|
|
|
|
|
|
+ int nValue = 0;
|
|
|
|
+ for ( int i = 0; i < 5; i++ )
|
|
|
|
+ {
|
|
|
|
+ nValue = _tstoi(szDist[i]);
|
|
|
|
+ bitDist[i] = (nValue > 80 && nValue < 130) ? 1 : 0;
|
|
|
|
|
|
|
|
+ nValue = _tstoi(szLevel[i]);
|
|
|
|
+ bitLevel[i] = (nValue > 25) ? 1 : 0;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ int nDistValue = bitDist.to_ulong();
|
|
|
|
+ int nLevelValue = bitLevel.to_ulong();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
int aa = 0;
|
|
int aa = 0;
|