code style
This commit is contained in:
parent
7b633f88a1
commit
0adead367d
1 changed files with 16 additions and 15 deletions
|
@ -193,8 +193,8 @@ void CProtocol::Reset()
|
||||||
}
|
}
|
||||||
|
|
||||||
void CProtocol::EnqueueMessage ( CVector<uint8_t>& vecMessage,
|
void CProtocol::EnqueueMessage ( CVector<uint8_t>& vecMessage,
|
||||||
const int iCnt,
|
const int iCnt,
|
||||||
const int iID )
|
const int iID )
|
||||||
{
|
{
|
||||||
bool bListWasEmpty;
|
bool bListWasEmpty;
|
||||||
|
|
||||||
|
@ -255,7 +255,7 @@ void CProtocol::SendMessage()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CProtocol::CreateAndSendMessage ( const int iID,
|
void CProtocol::CreateAndSendMessage ( const int iID,
|
||||||
const CVector<uint8_t>& vecData )
|
const CVector<uint8_t>& vecData )
|
||||||
{
|
{
|
||||||
CVector<uint8_t> vecNewMessage;
|
CVector<uint8_t> vecNewMessage;
|
||||||
|
@ -278,7 +278,8 @@ void CProtocol::CreateAndSendMessage ( const int iID,
|
||||||
EnqueueMessage ( vecNewMessage, iCurCounter, iID );
|
EnqueueMessage ( vecNewMessage, iCurCounter, iID );
|
||||||
}
|
}
|
||||||
|
|
||||||
void CProtocol::CreateAndImmSendAcknMess ( const int& iID, const int& iCnt )
|
void CProtocol::CreateAndImmSendAcknMess ( const int& iID,
|
||||||
|
const int& iCnt )
|
||||||
{
|
{
|
||||||
CVector<uint8_t> vecAcknMessage;
|
CVector<uint8_t> vecAcknMessage;
|
||||||
CVector<uint8_t> vecData ( 2 ); // 2 bytes of data
|
CVector<uint8_t> vecData ( 2 ); // 2 bytes of data
|
||||||
|
@ -295,7 +296,7 @@ void CProtocol::CreateAndImmSendAcknMess ( const int& iID, const int& iCnt )
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CProtocol::ParseMessage ( const CVector<uint8_t>& vecbyData,
|
bool CProtocol::ParseMessage ( const CVector<uint8_t>& vecbyData,
|
||||||
const int iNumBytes )
|
const int iNumBytes )
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
return code: false -> ok; true -> error
|
return code: false -> ok; true -> error
|
||||||
|
@ -976,10 +977,10 @@ bool CProtocol::EvaluateDisconnectionMes ( const CVector<uint8_t>& vecData )
|
||||||
* Message generation (parsing) *
|
* Message generation (parsing) *
|
||||||
\******************************************************************************/
|
\******************************************************************************/
|
||||||
bool CProtocol::ParseMessageFrame ( const CVector<uint8_t>& vecIn,
|
bool CProtocol::ParseMessageFrame ( const CVector<uint8_t>& vecIn,
|
||||||
const int iNumBytesIn,
|
const int iNumBytesIn,
|
||||||
int& iCnt,
|
int& iCnt,
|
||||||
int& iID,
|
int& iID,
|
||||||
CVector<uint8_t>& vecData )
|
CVector<uint8_t>& vecData )
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
return code: true -> ok; false -> error
|
return code: true -> ok; false -> error
|
||||||
|
@ -1072,9 +1073,9 @@ uint32_t CProtocol::GetValFromStream ( const CVector<uint8_t>& vecIn,
|
||||||
return iRet;
|
return iRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CProtocol::GenMessageFrame ( CVector<uint8_t>& vecOut,
|
void CProtocol::GenMessageFrame ( CVector<uint8_t>& vecOut,
|
||||||
const int iCnt,
|
const int iCnt,
|
||||||
const int iID,
|
const int iID,
|
||||||
const CVector<uint8_t>& vecData )
|
const CVector<uint8_t>& vecData )
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -1129,9 +1130,9 @@ void CProtocol::GenMessageFrame ( CVector<uint8_t>& vecOut,
|
||||||
static_cast<uint32_t> ( CRCObj.GetCRC() ), 2 );
|
static_cast<uint32_t> ( CRCObj.GetCRC() ), 2 );
|
||||||
}
|
}
|
||||||
|
|
||||||
void CProtocol::PutValOnStream ( CVector<uint8_t>& vecIn,
|
void CProtocol::PutValOnStream ( CVector<uint8_t>& vecIn,
|
||||||
unsigned int& iPos,
|
unsigned int& iPos,
|
||||||
const uint32_t iVal,
|
const uint32_t iVal,
|
||||||
const unsigned int iNumOfBytes )
|
const unsigned int iNumOfBytes )
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue