src/experiments/rescuer/DGSCommon/SerialFeedbackData.cpp
int SerialFeedbackData::checkSerialResponseEnd(char * serial_response, int
    number_of_readed_bytes)
{
    if ( _use_string_delimiter || number_of_readed_bytes == 0 )
    {
        char * result = ACE_OS::strstr( serial_response, _delimiter_string->c_str());
        if (result) return 1;
        else return 0;
    }
    else if ( _use_bytesnumber_delimiter )
    {
        _counted_bytes += number_of_readed_bytes;
        if (_counted_bytes >= _bytes_to_read)
            return 1;
        else return 0;
    }

    return 2; //No termination condition has been activated
}
/** 
 * SerialFeedbackData::checkSerialResponseTermination
 * 
 * @param serial_reponse A pointer to the readed data.
 * @param number_of_readed_bytes The number of bytes readed.
 * @return 1 if a end condition has been detected.
 * @return 2 if no end condition has been activated.
 * @return 0 if the end condition has not been meet.
 */


@param serial_reponse A pointer to the readed data.
@param number_of_readed_bytes The number of bytes readed.
@return 1 if a end condition has been detected.
@return 2 if no end condition has been activated.
@return 0 if the end condition has not been meet.
@param serial_reponse A pointer to the readed data . @param number_of_readed_bytes The number of bytes readed . @return 1 if a end condition has been detected . @return 2 if no end condition has been activated . @return 0 if the end condition has not been meet .
int SerialFeedbackData::checkSerialResponseEnd(char * serial_response, int
    number_of_readed_bytes)
{
    if ( _use_string_delimiter || number_of_readed_bytes == 0 )
    {
        char * result = ACE_OS::strstr( serial_response, _delimiter_string->c_str());
        if (result) return 1;
        else return 0;
    }
    else if ( _use_bytesnumber_delimiter )
    {
        _counted_bytes += number_of_readed_bytes;
        if (_counted_bytes >= _bytes_to_read)
            return 1;
        else return 0;
    }
    return 2; 
}
int SerialFeedbackData :: checkSerialResponseEnd ( char * serial_response , int number_of_readed_bytes ) { if ( _use_string_delimiter || number_of_readed_bytes == 0 ) { char * result = ACE_OS :: strstr ( serial_response , _delimiter_string -> c_str ( ) ) ; if ( result ) return 1 ; else return 0 ; } else if ( _use_bytesnumber_delimiter ) { _counted_bytes += number_of_readed_bytes ; if ( _counted_bytes >= _bytes_to_read ) return 1 ; else return 0 ; } return 2 ; }
SerialFeedbackData::checkSerialResponseTermination
SerialFeedbackData :: checkSerialResponseTermination
//No termination condition has been activated