User`s manual
Writing Custom Applications
Module.Input().Calibrated(Settings.Calibrated);
Module.IdRom().StoreToRom();
}
The application code should test for NAN and in general for the validity of the received data. Please see Form1.h for
MSVC .NET 2005 projects or Main.cpp for Borland 10 projects.
//---------------------------------------------------------------
// System::Void LoadFromRomButton_Click()
//---------------------------------------------------------------
private: System::Void LoadFromRomButton_Click(System::Object^ sender, System::EventArgs^ e)
{
Io->ReadRom();
for (int i = 0; i < Io->Channels(); ++i)
{
if (!_isnan(Io->Settings.AdcGain[i]) && _finite(Io->Settings.AdcGain[i]))
{
AdcCoefGrid[0, i]->Value = gcnew String(
Innovative::FloatToString(Io->Settings.AdcGain[i], 4).c_str());
}
else
{
AdcCoefGrid[0, i]->Value = gcnew String("NAN");
}
if (!_isnan(Io->Settings.AdcOffset[i]) && _finite(Io->Settings.AdcOffset[i]))
{
AdcCoefGrid[1, i]->Value = gcnew String(
Innovative::FloatToString(Io->Settings.AdcOffset[i], 4).c_str());
}
else
{
AdcCoefGrid[1, i]->Value = gcnew String("NAN");
}
}
PllCorrectionEdit->Text = gcnew String(
Innovative::FloatToString(Io->Settings.PllCorrection, 4).c_str());
CalibratedCheckBox->Checked = Io->Settings.Calibrated;
ModuleNameEdit->Text = gcnew String(Io->Settings.ModuleName.c_str());
ModuleRevisionEdit->Text = gcnew String(Io->Settings.ModuleRevision.c_str());
}
The Linux Snap Example
With the release of Linux support for Malibu and for Innovative products, there are versions of the example programs for
this platform. This section discusses the Linux Snap example.
The ApplicationIo Class
Because we designed the original examples to separate Malibu and Baseboard functionality into a portable class, this code
can move to the Linux example unchanged. So the above discussion of the features of the ApplicationIo class is directly
applicable to the Linux example. In fact, the code itself is shared between the platforms.
X5-GSPS User's Manual 58