![]() |
![]() |
The dsmGetObj function call obtains the requested object data from the TSM data stream and places it in the caller's buffer. The dsmGetObj call uses the object ID to obtain the next object or partial object from the data stream.
The data for the indicated object is placed in the buffer to which DataBlk points. If more data is available, you must make one or more calls to dsmGetData to receive the remaining object data until a return code of DSM_RC_FINISHED is returned. Check the numBytes field in DataBlk to see whether any data remains in the buffer.
Objects should be asked for in the order that they were listed on the dsmBeginGetData call in the dsmGetList parameter. The exception is when the application client needs to pass over an object in the data stream to get to an object later in the list. If the object that is indicated by the object ID is not the next object in the stream, the data stream is processed until the object is located, or the stream is completed. Use this feature with care, because it might be necessary to process and discard large amounts of data to locate the requested object.
dsInt16_t dsmGetObj (dsUint32_t dsmHandle, ObjID *objIdP, DataBlk *dataBlkPtr);
Parameters
The return code numbers are provided in parentheses ( ).
Table 31. Return Codes for dsmGetObj
Return Code | Explanation |
---|---|
DSM_RC_ABORT_INVALID_OFFSET (33) | The offset that is specified during a partial object retrieve is greater than the length of the object. |
DSM_RC_ABORT_INVALID_LENGTH (34) | The length that is specified during a partial object retrieve is greater than the length of the object, or the offset in addition to the length extends past the end of the object. |
DSM_RC_FINISHED (121) | Finished processing (start dsmEndGetObj). |
DSM_RC_WRONG_VERSION_PARM (2065) | Application client's API version is different from the TSM library version. |
DSM_RC_MORE_DATA (2200) | There is more data to get. |