Forums › SM Series Discussions › sm_api c++ iq processing
- This topic has 1 reply, 2 voices, and was last updated 3 days, 4 hours ago by
Andrew.
- AuthorPosts
washtonParticipantI am looking to utilize two separate c++ scripts to collect and save iq streaming data from an SM200C. The first script sets up the SM200C by opening the networked device and setting the iq stream parameters (data type, center frequency, ref level, etc), returning the handle to the opened device and leaving it idle. The second script uses the handle to initiate the capture for a specified length of time and save the data. The goal is to allow a user to begin a capture as soon as the second script is called so time isn’t wasted on setup, avoiding data loss. My initial tests indicate that the device doesn’t save the parameters from the first script; I’m forced to open the device again and send the same iq setup commands before a successful data capture can occur, causing significant delay and data loss in the process. Is a two-script setup possible? Or do I have to include setup and capture in the same script?
AndrewModeratorThe problem with the 2 script approach is that all the resources associated with the handle and device are in the working memory of the first script. The second script can’t access those.
A couple alternative solutions,
– Go to a 1 script approach where after the initialization occurs, the script goes into a waiting for user input loop, and responds to the requests for data, all within one script. This is the easiest solution.
– Change the first script to act more like a service, which stays open and communicates with other scripts/programs that request data. The first script is the only script that interfaces the device, and relays all data to the other script. This seems like a more complex approach unless you plan on being able to have several programs requesting data simultaneously.
- AuthorPosts
You must be logged in to reply to this topic.