#include <mission_adapters/types.h>

namespace mission_adapters
{
    const char* toString(MissionState state)
    {
        switch (state)
        {
            case MissionState::IDLE:            return "IDLE";
            case MissionState::QUEUED:          return "QUEUED";
            case MissionState::RUNNING:         return "RUNNING";
            case MissionState::PAUSED:          return "PAUSED";
            case MissionState::COMPLETED:       return "COMPLETED";
            case MissionState::FAILED:          return "FAILED";
            case MissionState::CANCELLED:       return "CANCELLED";
            case MissionState::EMERGENCY:       return "EMERGENCY";
            case MissionState::CLEAR_EMERGENCY: return "CLEAR_EMERGENCY";
        }

        return "UNKNOWN";
    }

} // namespace mission_adapters
