#ifndef ARM_DEFINE_H
#define ARM_DEFINE_H

#include "arm_action_define.h"

#define MAX_ARM_GOAL_COUNT 16
#define MAX_TRAJECTORY_HISTORY 64
#define ARM_FOLLOWING_PERIOD (5e6) //ns == 5ms
#define ARM_FOLLOWING_CHECKING_STEP (4)
#define ARM_FOLLOWING_CHECKING (ARM_FOLLOWING_PERIOD * ARM_FOLLOWING_CHECKING_STEP) //ns == 20ms
#define GET_FUNC_LINE_STR() \
    (std::string(__func__ ) + ":" + std::to_string(__LINE__))

#define LEFT_ARM_IP_ADDRESS "192.168.2.2"
#define RIGHT_ARM_IP_ADDRESS "192.168.2.18"
#define ARM_IP_PORT (8080)

#define TRAJECTORY_COMPLETE 1
#define TRAJECTORY_ONGOING 0
#define TRAJECTORY_ERROR -1

/*typedef enum {
    ARM_COMMAND_TYPE_ANGLE_STEP_ON = 0,
    ARM_COMMAND_TYPE_POSE_STEP_ON,
    ARM_COMMAND_TYPE_ANGLE_DIRECT_MOVE,
    ARM_COMMAND_TYPE_POSE_DIRECT_MOVE,
    ARM_COMMAND_TYPE_ERR
} ArmCommandTypeE;

typedef enum {
    POSE_POSITION_X = 0,
    POSE_POSITION_Y,
    POSE_POSITION_Z,
    POSE_QUATERNION_X,
    POSE_QUATERNION_Y,
    POSE_QUATERNION_Z,
    POSE_QUATERNION_W,
    POSE_DIMENSION, // should be 7
} PoseDimensionE;

typedef enum {
    LEFT_ARM = 0,
    RIGHT_ARM,
    ARM_ID_ERR
} ArmIdE;
 

typedef enum {
    OK = 0,
    UNKNOWN_ERR = -1,
    ARM_NOW_FORCE_MOVING = -2,
    ARM_COLLISION = -3,
    ARM_AIM_CANNOT_REACH = -4,
    ARM_NOW_NO_GOAL = -5,
    ARM_GOAL_CANCELLED = -6,
} ErrCodeE;*/

typedef enum {
    GOAL_TYPE_MOVING = 0,
    GOAL_TYPE_STEPPING,
    GOAL_TYPE_POSE_STEPPING,
    GOAL_TYPE_ERROR
} GoalTypeE;

#endif // ARM_DEFINE_H