User`s manual
Writing Custom Applications
Module.Target(Settings.Target);
Module.Open();
Module.Reset();
UI->Status("Module Device Opened...");
Opened = true;
This code shows how to open the device for streaming. Each baseboard has a unique code given in a PC. For instance, if
there are three boards in a system, they will be targets 0,1 and 2. The order of the targets is determined by the location in the
PCIe bus, so it will remain unchanged from run to run. Moving the board to a different PCIe slot may change the target
identification. The Led() property can be use to associate a target number with a physical board in a configuration.
//
// Connect Stream
Stream.ConnectTo(&Module);
StreamConnected = true;
UI->Status("Stream Connected...");
Once the object is attached to actual physical device, the streaming controller associates with a baseboard by the
ConnectTo() method. Once connected, the object is able to call into the baseboard for board-specific operations during data
streaming. If an objects supports a stream type, this call will be implemented. Unsupported stream types will not compile.
Lastly we capture and display some information to the screen. This includes the logic version, bus informaiton, and the
number of input channels.
FHwPciClk = Module.Debug()->PciClockRate();
FHwBusWidth = Module.Debug()->PciBusWidth();
DisplayLogicVersion();
FChannels = Module.Input().Info().Channels().Channels();
}
Similarly, the Close() method closes the hardware. Inside this method, first we logically detach the streaming subsystem from
its associated baseboard using Disconnect() method. Malibu method Close() is then used to detach the module from the
hardware and release its resources.
//---------------------------------------------------------------------------
// ApplicationIo::Close() -- Close Hardware & set up callbacks
//---------------------------------------------------------------------------
void ApplicationIo::Close()
{
Stream.Disconnect();
StreamConnected = false;
Opened = false;
UI->Status("Stream Disconnected...");
}
Starting Data flow
After downloading interface logic user can setup clocking and triggering options. The stream button then can be used to start
streaming and thus data flow.
//---------------------------------------------------------------------------
// ApplicationIo::StartStreaming() -- Initiate data flow
//---------------------------------------------------------------------------
void ApplicationIo::StartStreaming()
X5-GSPS User's Manual 51