GetNitoMetadataFromMemory Function
The GetNitoMetadataFromMemory
function receives information about the NITO
file in nitoMem
and nitoMemLength
, which is a pointer to
a memory buffer loaded with the NITO file contents and an integer indicating the size of
the NITO memory buffer, respectively. Once metadata is retrieved, it copies the data for
each parameter set into metadataArray
, an array of
NvSIPLNitoMetadata
struct (defined in the NvSIPLNitoMetadata and Related Constants section above).
metadataArrayLength
is an integer which represents length of this array
(for example, the maximum number of elements that can be stored), used to guarantee there
is enough storage space for all retrieved metadata tuples (ID, schema hash, data hash). The
function also updates the metadataCount
variable to indicate the number of
metadata tuples retrieved.
Declaration
SIPLStatus GetNitoMetadataFromMemory(
uint8_t const *const nitoMem,
size_t const nitoMemLength,
NvSIPLNitoMetadata *const metadataArray,
size_t const metadataArrayLength,
size_t *const metadataCount)
Parameters |
|
Return Value |
NVSIPL_STATUS_OK – Success NVSIPL_STATUS_BAD_ARGUMENT – Invalid parameters received, or more metadata tuples retrieved than maximum NvSIPLNitoMetadata struct array length indicated by metadataArrayLength. NVSIPL_STATUS_INVALID_STATE – Invalid state occurred NVSIPL_STATUS_OUT_OF_MEMORY – Memory allocation failed NVSIPL_STATUS_ERROR – Error occurred |