pub unsafe extern "C" fn vision_read_by_code(
    port: u8,
    size_id: u32,
    code: vision_color_code_t,
    object_count: u32,
    object_arr: *mut vision_object_s_t
) -> i32
Expand description

Reads up to object_count object descriptors into object_arr.

This function uses the following values of errno when an error state is reached: ENXIO - The given value is not within the range of V5 ports (1-21), or fewer than object_count number of objects were found. ENODEV - The port cannot be configured as a vision sensor

\param port The V5 port number from 1-21 \param object_count The number of objects to read \param size_id The object to read from a list roughly ordered by object size (0 is the largest item, 1 is the second largest, etc.) \param color_code The vision_color_code_t for which objects will be returned \param[out] object_arr A pointer to copy the objects into

\return The number of object signatures copied. This number will be less than object_count if there are fewer objects detected by the vision sensor. Returns PROS_ERR if the port was invalid, an error occurred, or fewer objects than size_id were found. All objects in object_arr that were not found are given VISION_OBJECT_ERR_SIG as their signature.