gogoc-messaging/src/servermsgsender.cc
void ServerMsgSender::Send_StatusInfo( const gogocStatusInfo* aStatusInfo )
{
  Message* pMsg;
  uint8_t pData[MSG_MAX_USERDATA];
  unsigned int nDataLen = 0;


  assert( aStatusInfo != NULL );


  // Write client status to data buffer.
  memcpy( pData, (void*)&(aStatusInfo->eStatus), sizeof(gogocCliStatus) );
  nDataLen += sizeof(gogocCliStatus);

  // Append status code to nStatus.
  memcpy( pData + nDataLen, (void*)&(aStatusInfo->nStatus), sizeof(aStatusInfo->nStatus) );
  nDataLen += sizeof(aStatusInfo->nStatus);


  assert( nDataLen <= MSG_MAX_USERDATA );       // Buffer overflow has occured.


  // Create Message
  pMsg = Message::CreateMessage( MESSAGEID_STATUSINFO, nDataLen, pData );
  assert( pMsg != NULL );


  // Post the message.
  PostMessage( pMsg );
}
// --------------------------------------------------------------------------
// Function : Send_StatusInfo
//
// Description:
//   Will send information on the status of the gogoCLIENT.
//   A message is created with the information and posted to the send queue.
//
// Arguments:
//   aStatusInfo: gogocStatusInfo* [in], The current state of the gogoCLIENT
//                client.
//
// Return values: (none)
//
// --------------------------------------------------------------------------
Function : Send_StatusInfo
Description:
Will send information on the status of the gogoCLIENT.
A message is created with the information and posted to the send queue.

gogocStatusInfo* [in], The current state of the gogoCLIENT
client.

Return values: (none)
Function : Send_StatusInfo Description : Will send information on the status of the gogoCLIENT . A message is created with the information and posted to the send queue . gogocStatusInfo * [ in ] The current state of the gogoCLIENT client . Return values : ( none )
void ServerMsgSender::Send_StatusInfo( const gogocStatusInfo* aStatusInfo )
{
  Message* pMsg;
  uint8_t pData[MSG_MAX_USERDATA];
  unsigned int nDataLen = 0;
  assert( aStatusInfo != NULL );
  memcpy( pData, (void*)&(aStatusInfo->eStatus), sizeof(gogocCliStatus) );
  nDataLen += sizeof(gogocCliStatus);
  memcpy( pData + nDataLen, (void*)&(aStatusInfo->nStatus), sizeof(aStatusInfo->nStatus) );
  nDataLen += sizeof(aStatusInfo->nStatus);
  assert( nDataLen <= MSG_MAX_USERDATA );       
  pMsg = Message::CreateMessage( MESSAGEID_STATUSINFO, nDataLen, pData );
  assert( pMsg != NULL );
  PostMessage( pMsg );
}
void ServerMsgSender :: Send_StatusInfo ( const gogocStatusInfo * aStatusInfo ) { Message * pMsg ; uint8_t pData [ MSG_MAX_USERDATA ] ; unsigned int nDataLen = 0 ; assert ( aStatusInfo != NULL ) ; memcpy ( pData , ( void * ) & ( aStatusInfo -> eStatus ) , sizeof ( gogocCliStatus ) ) ; nDataLen += sizeof ( gogocCliStatus ) ; memcpy ( pData + nDataLen , ( void * ) & ( aStatusInfo -> nStatus ) , sizeof ( aStatusInfo -> nStatus ) ) ; nDataLen += sizeof ( aStatusInfo -> nStatus ) ; assert ( nDataLen <= MSG_MAX_USERDATA ) ; pMsg = Message :: CreateMessage ( MESSAGEID_STATUSINFO , nDataLen , pData ) ; assert ( pMsg != NULL ) ; PostMessage ( pMsg ) ; }
Function : Send_StatusInfo
Description:
Will send information on the status of the gogoCLIENT.
Function : Send_StatusInfo Description : Will send information on the status of the gogoCLIENT .
// Write client status to data buffer. // Append status code to nStatus. // Buffer overflow has occured. // Create Message // Post the message.