library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

use work.math_pkg.all;
use work.rtps_package.all;
use work.ros_package.all;
use work.GoalInfo_package;

package GoalStatus_package is
    
    constant STATUS_UNKNOWN     : std_logic_vector(CDR_INT8_WIDTH-1 downto 0) := std_logic_vector(to_unsigned(0, CDR_INT8_WIDTH));
    constant STATUS_ACCEPTED    : std_logic_vector(CDR_INT8_WIDTH-1 downto 0) := std_logic_vector(to_unsigned(1, CDR_INT8_WIDTH));
    constant STATUS_EXECUTING   : std_logic_vector(CDR_INT8_WIDTH-1 downto 0) := std_logic_vector(to_unsigned(2, CDR_INT8_WIDTH));
    constant STATUS_CANCELING   : std_logic_vector(CDR_INT8_WIDTH-1 downto 0) := std_logic_vector(to_unsigned(3, CDR_INT8_WIDTH));
    constant STATUS_SUCCEEDED   : std_logic_vector(CDR_INT8_WIDTH-1 downto 0) := std_logic_vector(to_unsigned(4, CDR_INT8_WIDTH));
    constant STATUS_CANCELED    : std_logic_vector(CDR_INT8_WIDTH-1 downto 0) := std_logic_vector(to_unsigned(5, CDR_INT8_WIDTH));
    constant STATUS_ABORTED     : std_logic_vector(CDR_INT8_WIDTH-1 downto 0) := std_logic_vector(to_unsigned(6, CDR_INT8_WIDTH));
    
    type GOALSTATUS_TYPE is record 
        goal_info   : Goalinfo_package.GOALINFO_TYPE;
        status      : std_logic_vector(CDR_INT8_WIDTH-1 downto 0);
    end record;
    
    constant MAX_GOAL_INFO_SIZE : natural := Goalinfo_package.MAX_GOALINFO_SIZE;
    constant MAX_STATUS_SIZE    : natural := 1;
    
    constant MAX_GOALSTATUS_SIZE    : natural := MAX_GOAL_INFO_SIZE + MAX_STATUS_SIZE;
    
end package;