Quote:
#region DLL Imports
// Clear the DAB programs stored in the module's database
[DllImport(DABFMMonkeydll)]
public static extern bool ClearDatabase();
//Deprecated?
[DllImport(DABFMMonkeydll)]
public static extern Int32 CommVersion();
// Open the COM port of the radio and set mute behavior.
[DllImport(DABFMMonkeydll)]
public static extern bool OpenRadioPort(string com_port, bool usehardmute);
// Hard reset the radio module by pulling the RESET pin LOW
[DllImport(DABFMMonkeydll)]
public static extern bool HardResetRadio();
// Close the COM port of the radio
[DllImport(DABFMMonkeydll)]
public static extern bool CloseRadioPort();
// Play radio stream in FM or DAB
[DllImport(DABFMMonkeydll)]
public static extern bool PlayStream(RADIO_TUNE_BAND mode, Int32 channel);
// Stop currently played FM or DAB stream
[DllImport(DABFMMonkeydll)]
public static extern bool StopStream();
// Set the volume of the radio
[DllImport(DABFMMonkeydll)]
public static extern bool SetVolume(Volume volume);
// Add one volume step to the current volume.
[DllImport(DABFMMonkeydll)]
public static extern sbyte VolumePlus();
// Minus one volume step from the current volume
[DllImport(DABFMMonkeydll)]
public static extern sbyte VolumeMinus();
// Mute the volume
[DllImport(DABFMMonkeydll)]
public static extern void VolumeMute();
// Get the current volume
[DllImport(DABFMMonkeydll)]
public static extern Volume GetVolume();
// Determine if the current mode is DAB or FM
[DllImport(DABFMMonkeydll)]
public static extern RADIO_TUNE_BAND GetPlayMode();
// Forward to the next available stream in the current mode. When radio is in DAB mode, the dabindex will be incremented and then played.
// When the radio is in FM mode, search by increasing the FM frequency until a channel is found
[DllImport(DABFMMonkeydll)]
public static extern bool NextStream();
// Backward to the previous available stream in the current mode. When radio is in DAB mode, the dabindex will be decremented and then played.
// When the radio is in FM mode, search by decresing the FM frequency until a channel is found.
[DllImport(DABFMMonkeydll)]
public static extern bool PrevStream();
// Get the signal strengh of the current playing stream. biterror can't be utilized at this point in time
[DllImport(DABFMMonkeydll)]
public static extern sbyte GetSignalStrength(ref int biterror);
// Get the current playing program type to be used to identify the genre
[DllImport(DABFMMonkeydll)]
public static extern sbyte GetProgramType(RADIO_TUNE_BAND mode, Int32 dabIndex);
// Get the RDS text of the current stream
[DllImport(DABFMMonkeydll, CharSet = CharSet.Unicode)]
public static extern sbyte GetProgramText(string strtextBuffer);
// Get the current DAB data rate
[DllImport(DABFMMonkeydll)]
public static extern Int16 GetDataRate();
// Get the ensemble name of the current program
[DllImport(DABFMMonkeydll, CharSet = CharSet.Unicode)]
public static extern bool GetEnsembleName(Int32 dabIndex, DABNameMode namemode, string programName);
// Get the preset DAB index or preset FM frequency. The module is able to store 10 DAB and 10 FM preset
[DllImport(DABFMMonkeydll, CharSet = CharSet.Unicode)]
public static extern Int32 GetPreset(sbyte mode, sbyte presetindex);
// Store program into preset location.
[DllImport(DABFMMonkeydll, CharSet = CharSet.Unicode)]
public static extern bool SetPreset(sbyte mode, sbyte presetindex, Int32 channel);
// Get the stereo reception status of the current playing stream
[DllImport(DABFMMonkeydll)]
public static extern sbyte GetStereo();
// Get the index of current playing DAB stream or the current playing frequency
[DllImport(DABFMMonkeydll)]
public static extern Int32 GetPlayIndex();
// Get the currenct DAB frequency index in while DAB is auto searching
[DllImport(DABFMMonkeydll)]
public static extern sbyte GetFrequency();
// Determine if the current radio status is playing, searching, tuning, stop sorting or reconfiguring
[DllImport(DABFMMonkeydll)]
public static extern DABStatus GetPlayStatus();
// Set radio to forced mono or auto detect stereo mode.
[DllImport(DABFMMonkeydll)]
public static extern bool SetStereoMode(Mode Mode);
// Get the current stereo mode in the radio configuration
[DllImport(DABFMMonkeydll)]
public static extern Mode GetStereoMode();
// Auto search DAB channels. Current stored DAB channels will be cleared
[DllImport(DABFMMonkeydll, CharSet = CharSet.Unicode)]
public static extern bool DABAutoSearch(byte startindex, byte endindex);
// Get the total number of DAB programs stored in the module
[DllImport(DABFMMonkeydll)]
public static extern Int32 GetTotalProgram();
// Check if the module is ready to receive command.
[DllImport(DABFMMonkeydll)]
public static extern bool IsSysReady();
// Get the name of the current program
[DllImport(DABFMMonkeydll, CharSet = CharSet.Unicode)]
public static extern bool GetProgramName(RADIO_TUNE_BAND mode, Int32 dabIndex, DABNameMode namemode, String programName);
#endregion
#region 2nd Generation (Pro boards) DLL Imports
//Get the type of MOT application of the specified DAB channel.
//Return Values: 0 is MOT SlideShow, 1 is MOT BWS, 2 is TPEG, 3 is DGPS, 4 is TMC, 5 is EPG, 6 is DAB Java, 7 is DMB, 8 is Push Radio.
[DllImport(DABFMMonkeydll)]
public static extern ApplicationType GetApplicationType(Int32 channel);
//Get the filename of the SlideShow image.
[DllImport(DABFMMonkeydll, CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
public static extern bool GetImage(string ImageFileName);
//Query radio module for MOT data
[DllImport(DABFMMonkeydll)]
public static extern bool MotQuery();
//Reset the MOT segment buffer
[DllImport(DABFMMonkeydll)]
public static extern void MotReset(MotMode mode);
//Deprecated function as of December 2012
//Get the signal quality of the current DAB channel.
[DllImport(DABFMMonkeydll)]
public static extern sbyte GetDABSignalQuality();
//Set BBE HD Sound or Preset EQ
[DllImport(DABFMMonkeydll)]
public static extern bool SetBBEEQ(BBEStatus BBEOn, sbyte EQMode, sbyte BBELo, sbyte BBEHi, sbyte BBECFreq, sbyte BBEMachFreq, sbyte BBEMachGain, sbyte BBEMachQ, sbyte BBESurr, sbyte BBEMp, sbyte BBEHpF, sbyte BBEHiMode);
//Get parameters of BBE HD Sound or Mode of EQ.
[DllImport(DABFMMonkeydll)]
public static extern bool GetBBEEQ (ref BBEStatus BBEOn, ref sbyte EQMode, ref sbyte BBELo, ref sbyte BBEHi, ref sbyte BBECFreq, ref sbyte BBEMachFreq, ref sbyte BBEMachGain, ref sbyte BBEMachQ, ref sbyte BBESurr, ref sbyte BBEMp, ref sbyte BBEHpF, ref sbyte BBEHiMode);
//Set audio headroom.
[DllImport(DABFMMonkeydll)]
public static extern bool SetHeadroom (sbyte headroom);
//Get the headroom volume
[DllImport(DABFMMonkeydll)]
public static extern sbyte GetHeadroom();
#endregion