# Copyright (c) 2016-2017 Anki, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License in the file LICENSE.txt or at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""
Autogenerated python message buffer code.
Source: clad/types/actionResults.clad
Full command line: ../tools/message-buffers/emitters/Python_emitter.py -C ./src/ -I ../robot/clad/src/ ../coretech/vision/clad/src/ ../coretech/common/clad/src/ ../lib/util/source/anki/clad -o ../generated/cladPython// clad/types/actionResults.clad
"""

from __future__ import absolute_import
from __future__ import print_function

def _modify_path():
  import inspect, os, sys
  search_paths = [
    '../..',
    '../../../../tools/message-buffers/support/python',
  ]
  currentpath = os.path.abspath(os.path.dirname(inspect.getfile(inspect.currentframe())))
  for search_path in search_paths:
    search_path = os.path.normpath(os.path.abspath(os.path.realpath(os.path.join(currentpath, search_path))))
    if search_path not in sys.path:
      sys.path.insert(0, search_path)
_modify_path()

import msgbuffers

Anki = msgbuffers.Namespace()
Anki.Cozmo = msgbuffers.Namespace()

class ActionResultCategory(object):
  "Automatically-generated uint_8 enumeration."
  SUCCESS   = 0
  RUNNING   = 1
  CANCELLED = 2
  ABORT     = 3
  RETRY     = 4

Anki.Cozmo.ActionResultCategory = ActionResultCategory

class ARCBitShift(object):
  "Automatically-generated uint_32 enumeration."
  NUM_BITS = 24
  SHIFT    = 16777216

Anki.Cozmo.ARCBitShift = ARCBitShift

class ActionResult(object):
  "Automatically-generated uint_32 enumeration."
  SUCCESS                               = ActionResultCategory.SUCCESS * ARCBitShift.SHIFT
  RUNNING                               = ActionResultCategory.RUNNING * ARCBitShift.SHIFT
  CANCELLED_WHILE_RUNNING               = ActionResultCategory.CANCELLED * ARCBitShift.SHIFT
  NOT_STARTED                           = ActionResultCategory.CANCELLED * ARCBitShift.SHIFT + 1
  ABORT                                 = ActionResultCategory.ABORT * ARCBitShift.SHIFT
  ANIM_ABORTED                          = ActionResultCategory.ABORT * ARCBitShift.SHIFT + 1
  BAD_MARKER                            = ActionResultCategory.ABORT * ARCBitShift.SHIFT + 2
  BAD_MESSAGE_TAG                       = ActionResultCategory.ABORT * ARCBitShift.SHIFT + 3
  BAD_OBJECT                            = ActionResultCategory.ABORT * ARCBitShift.SHIFT + 4
  BAD_POSE                              = ActionResultCategory.ABORT * ARCBitShift.SHIFT + 5
  BAD_TAG                               = ActionResultCategory.ABORT * ARCBitShift.SHIFT + 6
  FAILED_SETTING_CALIBRATION            = ActionResultCategory.ABORT * ARCBitShift.SHIFT + 7
  FOLLOWING_PATH_BUT_NOT_TRAVERSING     = ActionResultCategory.ABORT * ARCBitShift.SHIFT + 8
  INTERRUPTED                           = ActionResultCategory.ABORT * ARCBitShift.SHIFT + 9
  INVALID_OFF_TREADS_STATE              = ActionResultCategory.ABORT * ARCBitShift.SHIFT + 10
  MISMATCHED_UP_AXIS                    = ActionResultCategory.ABORT * ARCBitShift.SHIFT + 11
  NO_ANIM_NAME                          = ActionResultCategory.ABORT * ARCBitShift.SHIFT + 12
  NO_DISTANCE_SET                       = ActionResultCategory.ABORT * ARCBitShift.SHIFT + 13
  NO_FACE                               = ActionResultCategory.ABORT * ARCBitShift.SHIFT + 14
  NO_GOAL_SET                           = ActionResultCategory.ABORT * ARCBitShift.SHIFT + 15
  NO_PREACTION_POSES                    = ActionResultCategory.ABORT * ARCBitShift.SHIFT + 16
  NOT_CARRYING_OBJECT_ABORT             = ActionResultCategory.ABORT * ARCBitShift.SHIFT + 17
  NULL_SUBACTION                        = ActionResultCategory.ABORT * ARCBitShift.SHIFT + 18
  PATH_PLANNING_FAILED_ABORT            = ActionResultCategory.ABORT * ARCBitShift.SHIFT + 19
  PICKUP_OBJECT_UNEXPECTEDLY_MOVING     = ActionResultCategory.ABORT * ARCBitShift.SHIFT + 20
  PICKUP_OBJECT_UNEXPECTEDLY_NOT_MOVING = ActionResultCategory.ABORT * ARCBitShift.SHIFT + 21
  SEND_MESSAGE_TO_ROBOT_FAILED          = ActionResultCategory.ABORT * ARCBitShift.SHIFT + 22
  STILL_CARRYING_OBJECT                 = ActionResultCategory.ABORT * ARCBitShift.SHIFT + 23
  TIMEOUT                               = ActionResultCategory.ABORT * ARCBitShift.SHIFT + 24
  TRACKS_LOCKED                         = ActionResultCategory.ABORT * ARCBitShift.SHIFT + 25
  UNEXPECTED_DOCK_ACTION                = ActionResultCategory.ABORT * ARCBitShift.SHIFT + 26
  UNKNOWN_TOOL_CODE                     = ActionResultCategory.ABORT * ARCBitShift.SHIFT + 27
  UPDATE_DERIVED_FAILED                 = ActionResultCategory.ABORT * ARCBitShift.SHIFT + 28
  VISUAL_OBSERVATION_FAILED             = ActionResultCategory.ABORT * ARCBitShift.SHIFT + 29
  RETRY                                 = ActionResultCategory.RETRY * ARCBitShift.SHIFT
  DID_NOT_REACH_PREACTION_POSE          = ActionResultCategory.RETRY * ARCBitShift.SHIFT + 1
  FAILED_TRAVERSING_PATH                = ActionResultCategory.RETRY * ARCBitShift.SHIFT + 2
  LAST_PICK_AND_PLACE_FAILED            = ActionResultCategory.RETRY * ARCBitShift.SHIFT + 3
  MOTOR_STOPPED_MAKING_PROGRESS         = ActionResultCategory.RETRY * ARCBitShift.SHIFT + 4
  NOT_CARRYING_OBJECT_RETRY             = ActionResultCategory.RETRY * ARCBitShift.SHIFT + 5
  NOT_ON_CHARGER                        = ActionResultCategory.RETRY * ARCBitShift.SHIFT + 6
  PATH_PLANNING_FAILED_RETRY            = ActionResultCategory.RETRY * ARCBitShift.SHIFT + 7
  PLACEMENT_GOAL_NOT_FREE               = ActionResultCategory.RETRY * ARCBitShift.SHIFT + 8
  STILL_ON_CHARGER                      = ActionResultCategory.RETRY * ARCBitShift.SHIFT + 9
  UNEXPECTED_PITCH_ANGLE                = ActionResultCategory.RETRY * ARCBitShift.SHIFT + 10

Anki.Cozmo.ActionResult = ActionResult
del ActionResult


