unit StatMain; interface uses SysUtils,MathObj,GLType; //Процедуры инициализации DLL procedure AllInit(var at,adt,atfinal:PRealType;Dirs : PDirRec);export; procedure AllDone;export; procedure GetLibInfo(Action: Integer;var BlockId, ParamId: Integer; Info: pchar);export; implementation procedure AllInit; begin end; procedure AllDone; begin if MBTY_BUF_SIZE > 0 then FreeMem(MBTY_BUF,MBTY_BUF_SIZE); end; procedure GetLibInfo; const aStatNames : array[1..9] of pchar = ('TStatHist','TStatMean','TStatVaranc','TStatSpectr','TStatDblSpctr', 'TStatCorel','TStatCorCoef','TStatSkew','TStatKurt'); aStatHints : array[1..9] of pchar = ( 'Плотность вероятности', 'Среднее значение', 'Среднеквадратическое отклонение', 'Спектральная плотность', 'Взаимная спектральная плотность', 'Функция взаимной корелляции', 'Коэффициент корелляции', 'Коэффициент эксцесса', 'Фактор сплющиваемости'); aStatParams : array[1..4] of pchar = ('Size','CalcMode','Tau','DelTrend'); aStatHistParams : array[1..4] of pchar = ('Min','Max','Col','AutoRange'); aStatSpectrParams : array[1..2] of pchar = ('Window','OutMode'); aStatCaps : array[1..4] of pchar = ( 'Размер серии', 'Расчёт по всей выборке', 'Период квантования', 'Удаление линейного тренда'); aStatHistCaps : array[1..5] of pchar = ( 'Нижняя граница', 'Верхняя граница', 'Число интервалов', 'Автоматически вычислять границы', 'Выводимое значение'); aStatSpectrCaps : array[1..2] of pchar = ( 'Тип окна', 'Вывод'); begin StrCopy(Info,nul); case Action of i_GetPageName : StrCopy(Info,'Статистика'); i_GetBlocksCount: BlockId := 9; i_GetBlockIndex, i_GetHelpIndex : ParamId := BlockId+210; i_GetBlockType : ParamId := t_dis; i_GetBlockName, i_GetRUNName : StrCopy(Info,aStatNames[BlockId]); i_GetRstName : StrCopy(Info,PChar(aStatNames[BlockId]+'Rst')); i_GetBMPName : StrCopy(Info,@aStatNames[BlockId][5]); i_GetBlockHint : StrCopy(Info,aStatHints[BlockId]); i_GetHelpName : StrCopy(Info,'MBTY'); i_GetChild : ParamId := 0; i_GetInputCount : if (BlockId>4)and(BlockId<8) then ParamId := -2 else ParamId := -1; i_GetOutPutCount: case BlockId of 1,4,5,6:ParamId := -2; else ParamId := -1 end; i_GetParamsCount: case BlockId of 1 :ParamId := 9; 4,5:ParamId := 6; 2,7:ParamId := 3; else ParamId := 4 end; i_GetParamName : if ParamId<5 then StrCopy(Info,aStatParams[ParamId]) else if BlockId>1 then StrCopy(Info,aStatSpectrParams[ParamId-4]) else StrCopy(Info,aStatHistParams[ParamId-4]); i_GetParamCaption: if ParamId<5 then StrCopy(Info,aStatCaps[ParamId]) else if BlockId>1 then StrCopy(Info,aStatSpectrCaps[ParamId-4]) else StrCopy(Info,aStatHistCaps[ParamId-4]); i_GetParamValue : case ParamId of 1 : StrCopy(Info,'256'); 2,3,4: StrCopy(Info,'0'); else if BlockId=1 then case ParamId of 5: StrCopy(Info,'-10'); 6: StrCopy(Info,'10'); 7: StrCopy(Info,'21'); 8: StrCopy(Info,'1'); 9: StrCopy(Info,'0'); end else if ParamId=5 then StrCopy(Info,'0') else StrCopy(Info,'1'); end; i_GetParamValues: begin if ParamId=2 then StrCopy(Info,'Да:Нет') else if BlockId=1 then case ParamId of 8: StrCopy(Info,'Нет:Да'); 9: StrCopy(Info,'Относительное число попаданий:Абсолютное число попаданий:Плотность вероятности абсолютная:Плотность вероятности нормированная'); end else case ParamId of 5: StrCopy(Info,'Прямоугольное:Ханна:Вэлча:Парсена'); 6: if BlockId=5 then StrCopy(Info,'Абсолютный спектр:Нормированный спектр:Угол сдвига фаз') else StrCopy(Info,'Абсолютный спектр:Нормированный спектр'); end; if ParamId=4 then StrCopy(Info,'Нет:Да'); end; i_GetParamType : case ParamId of 1 : StrCopy(Info,'0'); 2,4: StrCopy(Info,'40'); 3 : StrCopy(Info,'1'); else if BlockId=1 then case ParamId of 5,6: StrCopy(Info,'1'); 7: StrCopy(Info,'0'); else StrCopy(Info,'40'); end else StrCopy(Info,'40'); end; i_GetParamAct : StrCopy(Info,'0'); end; end; end.