SM API
Functions
sm_api_vrt.h File Reference

VITA 49 interface. More...

Go to the source code of this file.

Functions

SM_API SmStatus smSetVrtStreamID (int device, uint32_t sid)
 
SM_API SmStatus smGetVrtContextPktSize (int device, uint32_t *wordCount)
 
SM_API SmStatus smGetVrtContextPkt (int device, uint32_t *words, uint32_t *wordCount)
 
SM_API SmStatus smSetVrtPacketSize (int device, uint16_t samplesPerPkt)
 
SM_API SmStatus smGetVrtPacketSize (int device, uint16_t *samplesPerPkt, uint32_t *wordCount)
 
SM_API SmStatus smGetVrtPackets (int device, uint32_t *words, uint32_t *wordCount, uint32_t packetCount, SmBool purgeBeforeAcquire)
 

Detailed Description

VITA 49 interface.

These functions are used to stream I/Q data in the VRT data format.

Function Documentation

◆ smSetVrtStreamID()

SM_API SmStatus smSetVrtStreamID ( int  device,
uint32_t  sid 
)

Set the stream identifier, which is used to identify each VRT packet with the device.

Parameters
[in]deviceDevice handle.
[in]sidNew stream ID.
Returns

◆ smGetVrtContextPktSize()

SM_API SmStatus smGetVrtContextPktSize ( int  device,
uint32_t *  wordCount 
)

Retrieve the number of words in a VRT context packet. Use this to allocate an appropriately sized buffer for smGetVrtContextPkt.

Parameters
[in]deviceDevice handle.
[out]wordCountReturns the number of words in a VRT context packet.
Returns

◆ smGetVrtContextPkt()

SM_API SmStatus smGetVrtContextPkt ( int  device,
uint32_t *  words,
uint32_t *  wordCount 
)

Retrieve one VRT context packet.

Parameters
[in]deviceDevice handle.
[out]wordsUser allocated buffer. Should be length wordCount number of words long, where wordCount was returned from smGetVrtContextPktSize.
[out]wordCountNumber of words written to the words buffer.
Returns

◆ smSetVrtPacketSize()

SM_API SmStatus smSetVrtPacketSize ( int  device,
uint16_t  samplesPerPkt 
)

This function specifies the number of I/Q samples in each VRT data packet.

Parameters
[in]deviceDevice handle.
[in]samplesPerPktThe number of I/Q samples.
Returns

◆ smGetVrtPacketSize()

SM_API SmStatus smGetVrtPacketSize ( int  device,
uint16_t *  samplesPerPkt,
uint32_t *  wordCount 
)

Retrieve the number of words in a VRT data packet. Use this and a user-specified packet count to allocate an appropriately sized buffer for smGetVrtPackets.

Parameters
[in]deviceDevice handle.
[out]samplesPerPktReturns the number of I/Q samples in a VRT data packet.
[out]wordCountReturns the number of words in a VRT data packet.
Returns

◆ smGetVrtPackets()

SM_API SmStatus smGetVrtPackets ( int  device,
uint32_t *  words,
uint32_t *  wordCount,
uint32_t  packetCount,
SmBool  purgeBeforeAcquire 
)

Retrieve one block of one or more VRT data packets. This function blocks until the data requested is available.

Parameters
[in]deviceDevice handle.
[out]wordsPointer to user allocated buffer. Returns the VRT packets. Must be as large as packetCount * packetSize words.
[out]wordCountThe number of words written to the words buffer.
[in]packetCountThe number of VRT data packets to retrive.
[in]purgeBeforeAcquireWhen set to smTrue, any buffered I/Q data in the API is purged before beginning the I/Q block acquisition. See the section on Streaming I/Q Data for more detailed information.
Returns