This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS: What does it mean by the return value of VLIB_createConnectedComponentsList?

Tool/software: Code Composer Studio

I call the VLIB_createConnectedComponentsList function in my ccs 5.5 program, and it return 5, but I donot know Whether this call is ok, where can i get the explain of its return vlues?

thanks very much.

  • Hi,

    I've notified the sw team. Please share which version of VLIB are you using? Which RTOS SDK version?

    Best Regards,
    Yordan
  • VLIB API return VLIB_STATUS as the API guide indicates. The VLIB error codes are as indicated below:

    typedef enum
    {
    VLIB_NO_ERROR = 0,
    VLIB_ERR_INPUT_INVALID = 1,
    VLIB_ERR_INPUT_NEGATIVE = 2,
    VLIB_ERR_INPUT_EXCEEDED_RANGE = 3,
    VLIB_ERR_MEMORY_EXCEEDED_BOUNDARY = 4,
    VLIB_ERR_MEMORY_ALLOCATION_FAILURE = 5,
    VLIB_ERR_MEMORY_POINTER_NULL = 6,
    VLIB_ERR_DMA_FAILURE = 7,
    VLIB_ERR_FILE_OPEN_FAILURE = 8,
    VLIB_ERR_FILE_READ_FAILURE = 9,
    VLIB_ERR_FILE_WRITE_FAILURE = 10,
    VLIB_ERR_FILE_CLOSE_FAILURE = 11,
    VLIB_ERR_FILE_FORMAT_FAILURE = 12,
    VLIB_WARNING_LOW_MEMORY = 13
    } VLIB_STATUS;

    The status returned by the API indicates, that you are running into a Memory allocation error.

    Hope this helps.

    Regards,
    Rahul
  • The return type of this function is VLIB_STATUS. This is an enumeration which is defined in the VLIB_types.h header file (src/common/cxx/VLIB_types.h:

    typedef enum {
    VLIB_NO_ERROR = 0,
    VLIB_ERR_INPUT_INVALID = 1,
    VLIB_ERR_INPUT_NEGATIVE = 2,
    VLIB_ERR_INPUT_EXCEEDED_RANGE = 3,
    VLIB_ERR_MEMORY_EXCEEDED_BOUNDARY = 4,
    VLIB_ERR_MEMORY_ALLOCATION_FAILURE = 5,
    VLIB_ERR_MEMORY_POINTER_NULL = 6,
    VLIB_ERR_DMA_FAILURE = 7,
    VLIB_ERR_FILE_OPEN_FAILURE = 8,
    VLIB_ERR_FILE_READ_FAILURE = 9,
    VLIB_ERR_FILE_WRITE_FAILURE = 10,
    VLIB_ERR_FILE_CLOSE_FAILURE = 11,
    VLIB_ERR_FILE_FORMAT_FAILURE = 12,
    VLIB_WARNING_LOW_MEMORY = 13,
    VLIB_ERR_NOT_IMPLEMENTED = 14,
    VLIB_ERROR_MAX = 15
    } VLIB_STATUS;

    So a value of 5 is : VLIB_ERR_MEMORY_ALLOCATION_FAILURE = 5,

    This means that the buffer size you passed to the VLIB_initConnectedComponentsList() function was too small for the size of the image you are passing to the VLIB_createConnectedComponentsList function, or perhaps you didn't call the VLIB_initConnectedComponentsList() function first? You can reference the _d.c file which has an example usage for these functions.

    Jesse
  • thank Jesse Villarreal and Rahul Prabhu. With your help, I have understood what it means, and VLIB_createConnectedComponentsList return 0 (VLIB_NO_ERROR) now!