syntax = "proto2";

option optimize_for = SPEED;

import "osi_occupant.proto";
import "osi_detectedobject.proto";

package osi3;

//
// \brief A vehicle occupant as detected and perceived by an interior sensor.
//
message DetectedOccupant
{
    // Common information of one detected item.
    //
    optional DetectedItemHeader header = 1;

    // A list of candidates for this occupant as estimated by the
    // sensor.
    //
    repeated CandidateOccupant candidate = 2;

    //
    // \brief A candidate for a detected occupant as estimated by
    // the sensor.
    //
    message CandidateOccupant
    {
        // The estimated probability that this candidate is the true value.
        //
        // \note The sum of all \c #probability must be one. This probability is
        // given under the condition of
        // \c DetectedItemHeader::existence_probability.
        //
        // \rules
        // is_greater_than_or_equal_to: 0
        // is_less_than_or_equal_to: 1
        // \endrules
        //
        optional double probability = 1;

        // The detected vehicle occupant classification.
        //
        // \note IDs, which are referenced in this message, usually
        // reference to \c DetectedXXX::tracking_id IDs.
        //
        optional Occupant.Classification classification = 2;
    }
}
