This section demonstrates input validation implementation.
You must provide the validation function for input parameters.
The validation function checks 1 parameter in 1 call and has the following prototype:
2.1 Check for the source array:
if (index == 0)
{
{
}
else
{
"[keypoint_array_sort] Invalid item type for \'src\' array, it should be VX_TYPE_KEYPOINT");
}
}
2.2 Check for the Boolean scalar:
else if (index == 2)
{
{
}
else
{
vxAddLogEntry((
vx_reference)use_strength_scalar, status,
"Invalid type for \'sort_cmp\' in KeypointArraySort Kernel, it should be VX_TYPE_ENUM");
}
}
The Full Code for the Node Input Validation
{
if (index == 0)
{
{
}
else
{
"[keypoint_array_sort] Invalid item type for \'src\' array, it should be VX_TYPE_KEYPOINT");
}
}
else if (index == 2)
{
{
}
else
{
vxAddLogEntry((
vx_reference)use_strength_scalar, status,
"Invalid type for \'sort_cmp\' in KeypointArraySort Kernel, it should be VX_TYPE_ENUM");
}
}
return status;
}