NVIDIA DRIVE OS Linux SDK API Reference

5.1.9.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
NvSciBuf Attribute List APIs

Detailed Description

Methods to perform operations on NvSciBuf attribute lists.

Functions

NvSciError NvSciBufAttrListCreate (NvSciBufModule module, NvSciBufAttrList *newAttrList)
 Creates an attribute list holding the attributes of the NvSciBufObj to be allocated. More...
 
void NvSciBufAttrListFree (NvSciBufAttrList attrList)
 Frees the memory of an attribute list. More...
 
NvSciError NvSciBufAttrListSetAttrs (NvSciBufAttrList attrList, NvSciBufAttrKeyValuePair *pairArray, size_t pairCount)
 Sets the attribute values in the attribute list. More...
 
size_t NvSciBufAttrListGetSlotCount (NvSciBufAttrList attrList)
 Returns the slot count per key in an attribute list. More...
 
NvSciError NvSciBufAttrListGetAttrs (NvSciBufAttrList attrList, NvSciBufAttrKeyValuePair *pairArray, size_t pairCount)
 Returns an array of attribute key/value pairs for a given set of keys. More...
 
NvSciError NvSciBufAttrListSlotGetAttrs (NvSciBufAttrList attrList, size_t slotIndex, NvSciBufAttrKeyValuePair *pairArray, size_t pairCount)
 Returns an array of attribute key/value pairs from a multi-slot unreconciled attribute list at the given slot index. More...
 
NvSciError NvSciBufAttrListDebugDump (NvSciBufAttrList attrList, void **buf, size_t *len)
 Allocates a buffer and then dumps the contents of the specified attribute list into the buffer. More...
 
NvSciError NvSciBufAttrListReconcile (NvSciBufAttrList inputArray[], size_t inputCount, NvSciBufAttrList *newReconciledAttrList, NvSciBufAttrList *newConflictList)
 Reconciles the given unreconciled attribute list(s) into a new reconciled attribute list. More...
 
NvSciError NvSciBufAttrListClone (NvSciBufAttrList origAttrList, NvSciBufAttrList *newAttrList)
 Clones an unreconciled/reconciled attribute list. More...
 
NvSciError NvSciBufAttrListAppendUnreconciled (const NvSciBufAttrList inputUnreconciledAttrListArray[], size_t inputUnreconciledAttrListCount, NvSciBufAttrList *newUnreconciledAttrList)
 Append multiple unreconciled attribute lists together, forming a single new unreconciled attribute list with a slot count equal to the sum of all the slot counts in the input list. More...
 
NvSciError NvSciBufAttrListIsReconciled (NvSciBufAttrList attrList, bool *isReconciled)
 Checks if an attribute list is reconciled. More...
 
NvSciError NvSciBufAttrListValidateReconciled (NvSciBufAttrList reconciledAttrList, const NvSciBufAttrList unreconciledAttrListArray[], size_t unreconciledAttrListCount, bool *isReconcileListValid)
 Validates a reconciled attribute list against a set of unreconciled attribute lists. More...
 

Function Documentation

NvSciError NvSciBufAttrListAppendUnreconciled ( const NvSciBufAttrList  inputUnreconciledAttrListArray[],
size_t  inputUnreconciledAttrListCount,
NvSciBufAttrList newUnreconciledAttrList 
)

Append multiple unreconciled attribute lists together, forming a single new unreconciled attribute list with a slot count equal to the sum of all the slot counts in the input list.

Parameters
[in]inputUnreconciledAttrListArray[]Array containing the unreconciled attribute lists to be appended together.
[in]inputUnreconciledAttrListCountNumber of unreconciled attribute lists to append.
[out]newUnreconciledAttrListAppended attribute list created out of the input unreconciled attribute lists.
Returns
NvSciError, the completion code of the operation:
NvSciError NvSciBufAttrListClone ( NvSciBufAttrList  origAttrList,
NvSciBufAttrList newAttrList 
)

Clones an unreconciled/reconciled attribute list.

The resulting attribute list contains all the values of the original attribute list. If the list is an unreconciled attribute list, then modification will be allowed using setAttrList APIs.

Parameters
[in]origAttrListAttribute list to be cloned.
[out]newAttrListA pointer to the newly cloned attribute list.
Returns
NvSciError, the completion code of the operation:
NvSciError NvSciBufAttrListCreate ( NvSciBufModule  module,
NvSciBufAttrList newAttrList 
)

Creates an attribute list holding the attributes of the NvSciBufObj to be allocated.

Parameters
[in]moduleNvSciBufModule to associate with the newly created NvSciBufAttrList.
[out]newAttrListA pointer to the NvSciBufAttrList object that this function creates.
Returns
NvSciError, the completion status of the operation:
NvSciError NvSciBufAttrListDebugDump ( NvSciBufAttrList  attrList,
void **  buf,
size_t *  len 
)

Allocates a buffer and then dumps the contents of the specified attribute list into the buffer.

Parameters
[in]attrListAttribute list to fetch contents from.
[out]bufA pointer to the buffer allocated for the debug dump.
[out]lenThe length of the buffer allocated for the debug dump.
Returns
NvSciError, the completion code of the operation:
void NvSciBufAttrListFree ( NvSciBufAttrList  attrList)

Frees the memory of an attribute list.

Parameters
[in]attrListAttribute list to be freed.
Returns
void
NvSciError NvSciBufAttrListGetAttrs ( NvSciBufAttrList  attrList,
NvSciBufAttrKeyValuePair pairArray,
size_t  pairCount 
)

Returns an array of attribute key/value pairs for a given set of keys.

This function accepts a set of keys passed in the NvSciBufAttrKeyValuePair structure. The return values, stored back into NvSciBufAttrKeyValuePair, consist of const void* pointers to the attribute values from the NvSciBufAttrList. The application must not write to this data.

Parameters
[in]attrListAttribute list to fetch the attribute key/value pairs from.
[in,out]pairArrayArray of key/value pair structures.
[in]pairCountNumber of elements/entries in pairArray.
Returns
NvSciError, the completion code of the operation:
size_t NvSciBufAttrListGetSlotCount ( NvSciBufAttrList  attrList)

Returns the slot count per key in an attribute list.

Parameters
[in]attrListAttribute list to retrieve the slot count from.
Returns
size_t
  • Number of slots in the attribute list
  • 0 if attrList is invalid
NvSciError NvSciBufAttrListIsReconciled ( NvSciBufAttrList  attrList,
bool *  isReconciled 
)

Checks if an attribute list is reconciled.

Parameters
[in]attrListAttribute list to check.
[out]isReconciledA pointer to a boolean to store whether the attrlist is reconciled or not.
Returns
NvSciError, the completion code of the operation:
NvSciError NvSciBufAttrListReconcile ( NvSciBufAttrList  inputArray[],
size_t  inputCount,
NvSciBufAttrList newReconciledAttrList,
NvSciBufAttrList newConflictList 
)

Reconciles the given unreconciled attribute list(s) into a new reconciled attribute list.

On success, this API call allocates memory for the reconciled attribute list which has to be freed by the caller using NvSciBufAttrListFree(). On reconciliation failure, this API call allocates memory for the conflicting attribute list which has to be freed by the caller using NvSciBufAttrListFree().

Parameters
[in]inputArrayArray containing unreconciled attribute list(s) to be reconciled.
[in]inputCountThe number of unreconciled attributes lists in inputArray.
[out]newReconciledAttrListReconciled attribute list. This field is populated only if the reconciliation succeeded.
[out]newConflictListUnreconciled attribute list consisting of the key/value pairs which caused the reconciliation failure. This field is populated only if the reconciliation failed.
Returns
NvSciError, the completion code of the operation:
NvSciError NvSciBufAttrListSetAttrs ( NvSciBufAttrList  attrList,
NvSciBufAttrKeyValuePair pairArray,
size_t  pairCount 
)

Sets the attribute values in the attribute list.

Reads values only during the call, saving copies.

Parameters
[in]attrListUnreconciled attribute list where the function will set the attribute key and value.
[in]pairArrayArray of attribute key/value pair structures.
[in]pairCountNumber of elements/entries in pairArray.
Returns
NvSciError, the completion status of the operation:
NvSciError NvSciBufAttrListSlotGetAttrs ( NvSciBufAttrList  attrList,
size_t  slotIndex,
NvSciBufAttrKeyValuePair pairArray,
size_t  pairCount 
)

Returns an array of attribute key/value pairs from a multi-slot unreconciled attribute list at the given slot index.

Note
When exporting an array containing multiple unreconciled attribute lists, the importing endpoint still imports just one unreconciled attribute list. This unreconciled attribute list is referred to as a multi-slot attribute list. It logically represents an array of attribute lists, where each key has an array of values, one per slot.

The return values, stored in NvSciBufAttrKeyValuePair, consist of const void* pointers to the attribute values from the NvSciBufAttrList. The application must not write to this data.

Parameters
[in]attrListAttribute list to fetch the attribute key/value pairs from.
[in]slotIndexIndex in the attribute list.
[in,out]pairArrayArray of key/value pair structures. Holds the keys passed into the function and returns an array of NvSciBufAttrKeyValuePair structures.
[in]pairCountNumber of elements/entries in pairArray.
Returns
NvSciError, the completion code of the operation:
NvSciError NvSciBufAttrListValidateReconciled ( NvSciBufAttrList  reconciledAttrList,
const NvSciBufAttrList  unreconciledAttrListArray[],
size_t  unreconciledAttrListCount,
bool *  isReconcileListValid 
)

Validates a reconciled attribute list against a set of unreconciled attribute lists.

Parameters
[in]reconciledAttrListReconciled attribute list to be validated.
[in]unreconciledAttrListArraySet of unreconciled lists that need to be used for validation.
[in]unreconciledAttrListCountNumber of unreconciled attribute lists.
[out]isReconcileListValidFlag indicating if the reconciled list satisfies the parameters of set of unreconciled lists.
Returns
NvSciError, the completion code of the operation:
  • NvSciError_Success if successful.
  • NvSciError_BadParameter if any of the following occurs:
    • reconciledAttrList is NULL or
    • unreconciledAttrListArray[ ] is NULL or
    • unreconciledAttrListCount is zero or
    • isReconcileListValid is NULL