|
SIMULINK_ADC
1.0
Приём данных от АЦП
|
#include "adc_ctrl.h"#include "mu_ctrl.h"#include <math.h>#include <conio.h>#include <process.h>Go to the source code of this file.
Classes | |
| struct | _THREAD_PARAM |
Typedefs | |
| typedef struct _THREAD_PARAM | THREAD_PARAM |
| typedef struct _THREAD_PARAM * | PTHREAD_PARAM |
Functions | |
| void | MappingIsviParams (BRD_Handle hADC, unsigned long long nNumberOfBytes) |
| void | DisplayError (S32 status, const char *func_name, const BRDCHAR *cmd_str) |
| int | CheckClock (BRD_Handle hADC, BRDCHAR *AdcSrvName) |
| S32 | AdcSettings (BRD_Handle hADC, int idx, BRDCHAR *srvName, BRDCHAR *iniFileName) |
| S32 | DaqIntoFifo (BRD_Handle hADC, PVOID pSig, ULONG bBufSize, int DspMode) |
| S32 | DaqIntoFifoDMA (BRD_Handle hADC) |
| S32 | AllocDaqBuf (BRD_Handle hADC, PVOID *&pSig, unsigned long long *pbytesBufSize, ULONG bufType, ULONG *pBlkNum) |
| S32 | FreeDaqBuf (BRD_Handle hADC, ULONG blkNum) |
| void | MapWrFlagSinc (int flg, int isNewParam) |
| int | MapRdFlagSinc () |
| unsigned __stdcall | DirWriteIntoFile (void *pParams) |
| int | SimpleProcWrDir (BRD_Handle hSrv, HANDLE hfile, int idx, BRDctrl_StreamCBufAlloc *buf_dscr) |
| int | MultiBlkProcWrDir (BRD_Handle hSrv, HANDLE hfile, int idx, BRDctrl_StreamCBufAlloc *buf_dscr) |
| void | DspFunc (void *buf, ULONG size) |
| void | DirectFile (ULONG bufType, ULONG FileBufSize, ULONG FileBufNum, ULONG FileBlkNum) |
Variables | |
| HANDLE * | g_hBufFileMap = NULL |
| HANDLE | g_hFlgFileMap = NULL |
| HANDLE | g_hPostfixFileMap = NULL |
| int | g_fileMap |
| ULONG * | g_pFlags |
| char * | g_pPostfix |
| BRDctrl_StreamCBufAlloc | g_buf_dscr |
| BRD_Handle | g_hSRV |
| ULONG | g_MemAsFifo |
| ULONG | g_AdcDrqFlag |
| ULONG | g_MemDrqFlag |
| double | g_samplRate |
| int | g_IoDelay |
| BRDCHAR | g_AdcSrvName [] |
| ULONG | g_Cycle |
| unsigned long long | g_samplesOfChannel |
| unsigned long long | g_bBufSize |
| int | g_DirWriteFile |
| ULONG | g_FileBufSize |
| int | g_transRate |
| int | g_PretrigMode |
| long long | g_nPostTrigSamples |
| int | g_flbreak = 0 |
| ULONG | g_bufType |
| ULONG | g_fileBufSize |
| ULONG | g_fileBufNum |
| ULONG | g_fileBlkNum |
| BRDCHAR | g_dirFileName [] |
| typedef struct _THREAD_PARAM * PTHREAD_PARAM |
| typedef struct _THREAD_PARAM THREAD_PARAM |
| S32 AdcSettings | ( | BRD_Handle | hADC, |
| int | idx, | ||
| BRDCHAR * | srvName, | ||
| BRDCHAR * | iniFileName | ||
| ) |
Definition at line 130 of file adc_ctrl.cpp.
References CheckClock(), DisplayError(), g_AdcDrqFlag, g_bBufSize, g_DirWriteFile, g_FileBufSize, g_fileMap, g_hPostfixFileMap, g_IoDelay, g_MemDrqFlag, g_nPostTrigSamples, g_pPostfix, g_PretrigMode, g_samplesOfChannel, g_samplRate, MappingIsviParams(), and MAX_CHAN.
Referenced by TF_SourceAdc::PrepareAdc().
| S32 AllocDaqBuf | ( | BRD_Handle | hADC, |
| PVOID *& | pSig, | ||
| unsigned long long * | pbytesBufSize, | ||
| ULONG | bufType, | ||
| ULONG * | pBlkNum | ||
| ) |
Definition at line 806 of file adc_ctrl.cpp.
References DisplayError(), g_buf_dscr, g_fileMap, g_hBufFileMap, g_hFlgFileMap, and g_pFlags.
| int CheckClock | ( | BRD_Handle | hADC, |
| BRDCHAR * | AdcSrvName | ||
| ) |
Definition at line 82 of file adc_ctrl.cpp.
Referenced by AdcSettings().
| S32 DaqIntoFifo | ( | BRD_Handle | hADC, |
| PVOID | pSig, | ||
| ULONG | bBufSize, | ||
| int | DspMode | ||
| ) |
Definition at line 648 of file adc_ctrl.cpp.
References g_MemAsFifo.
| S32 DaqIntoFifoDMA | ( | BRD_Handle | hADC | ) |
Definition at line 697 of file adc_ctrl.cpp.
References DisplayError(), g_AdcDrqFlag, g_bBufSize, g_MemAsFifo, g_MemDrqFlag, and g_transRate.
| void DirectFile | ( | ULONG | bufType, |
| ULONG | FileBufSize, | ||
| ULONG | FileBufNum, | ||
| ULONG | FileBlkNum | ||
| ) |
Definition at line 1042 of file adc_ctrl.cpp.
References DirWriteIntoFile(), g_bufType, g_fileBlkNum, g_fileBufNum, g_fileBufSize, g_flbreak, g_hSRV, _THREAD_PARAM::handle, and _THREAD_PARAM::idx.
| unsigned __stdcall DirWriteIntoFile | ( | void * | pParams | ) |
Definition at line 1078 of file adc_ctrl.cpp.
References g_AdcDrqFlag, g_bufType, g_dirFileName, g_fileBlkNum, g_fileBufNum, g_fileBufSize, g_MemAsFifo, g_MemDrqFlag, _THREAD_PARAM::handle, _THREAD_PARAM::idx, MultiBlkProcWrDir(), and SimpleProcWrDir().
Referenced by DirectFile().
| void DisplayError | ( | S32 | status, |
| const char * | func_name, | ||
| const BRDCHAR * | cmd_str | ||
| ) |
Definition at line 49 of file adc_ctrl.cpp.
Referenced by AdcSettings(), AllocDaqBuf(), DaqIntoFifoDMA(), FreeDaqBuf(), MultiBlkProcWrDir(), and SimpleProcWrDir().
| void DspFunc | ( | void * | buf, |
| ULONG | size | ||
| ) |
| S32 FreeDaqBuf | ( | BRD_Handle | hADC, |
| ULONG | blkNum | ||
| ) |
Definition at line 913 of file adc_ctrl.cpp.
References DisplayError(), g_buf_dscr, g_fileMap, g_hBufFileMap, g_hFlgFileMap, and g_pFlags.
| void MappingIsviParams | ( | BRD_Handle | hADC, |
| unsigned long long | nNumberOfBytes | ||
| ) |
Definition at line 517 of file adc_ctrl.cpp.
References g_AdcSrvName, g_Cycle, g_pPostfix, g_samplRate, and MAX_CHAN.
Referenced by AdcSettings().
| int MapRdFlagSinc | ( | ) |
Definition at line 1012 of file adc_ctrl.cpp.
References g_pFlags.
| void MapWrFlagSinc | ( | int | flg, |
| int | isNewParam | ||
| ) |
Definition at line 1005 of file adc_ctrl.cpp.
References g_buf_dscr, and g_pFlags.
| int MultiBlkProcWrDir | ( | BRD_Handle | hSrv, |
| HANDLE | hfile, | ||
| int | idx, | ||
| BRDctrl_StreamCBufAlloc * | buf_dscr | ||
| ) |
Definition at line 1282 of file adc_ctrl.cpp.
References DisplayError(), g_fileBufNum, and g_flbreak.
Referenced by DirWriteIntoFile().
| int SimpleProcWrDir | ( | BRD_Handle | hSrv, |
| HANDLE | hfile, | ||
| int | idx, | ||
| BRDctrl_StreamCBufAlloc * | buf_dscr | ||
| ) |
Definition at line 1218 of file adc_ctrl.cpp.
References DisplayError(), g_fileBufNum, and g_flbreak.
Referenced by DirWriteIntoFile().
| ULONG g_AdcDrqFlag |
Definition at line 15 of file adc_ctrl_data.cpp.
Referenced by AdcSettings(), DaqIntoFifoDMA(), and DirWriteIntoFile().
| BRDCHAR g_AdcSrvName[] |
Definition at line 20 of file adc_ctrl_data.cpp.
Referenced by MappingIsviParams().
| unsigned long long g_bBufSize |
Definition at line 23 of file adc_ctrl_data.cpp.
Referenced by AdcSettings(), and DaqIntoFifoDMA().
| BRDctrl_StreamCBufAlloc g_buf_dscr |
Definition at line 25 of file adc_ctrl.cpp.
Referenced by AllocDaqBuf(), FreeDaqBuf(), and MapWrFlagSinc().
| ULONG g_bufType |
Definition at line 1037 of file adc_ctrl.cpp.
Referenced by DirectFile(), and DirWriteIntoFile().
| ULONG g_Cycle |
Definition at line 21 of file adc_ctrl_data.cpp.
Referenced by MappingIsviParams().
| BRDCHAR g_dirFileName[] |
Definition at line 26 of file adc_ctrl_data.cpp.
Referenced by DirWriteIntoFile().
| int g_DirWriteFile |
Definition at line 24 of file adc_ctrl_data.cpp.
Referenced by AdcSettings().
| ULONG g_fileBlkNum |
Definition at line 1040 of file adc_ctrl.cpp.
Referenced by DirectFile(), and DirWriteIntoFile().
| ULONG g_fileBufNum |
Definition at line 1039 of file adc_ctrl.cpp.
Referenced by DirectFile(), DirWriteIntoFile(), MultiBlkProcWrDir(), and SimpleProcWrDir().
| ULONG g_FileBufSize |
Definition at line 25 of file adc_ctrl_data.cpp.
Referenced by AdcSettings().
| ULONG g_fileBufSize |
Definition at line 1038 of file adc_ctrl.cpp.
Referenced by DirectFile(), and DirWriteIntoFile().
| int g_fileMap |
Definition at line 12 of file adc_ctrl_data.cpp.
Referenced by AdcSettings(), AllocDaqBuf(), and FreeDaqBuf().
| int g_flbreak = 0 |
Definition at line 1035 of file adc_ctrl.cpp.
Referenced by DirectFile(), MultiBlkProcWrDir(), and SimpleProcWrDir().
| HANDLE* g_hBufFileMap = NULL |
Definition at line 16 of file adc_ctrl.cpp.
Referenced by AllocDaqBuf(), and FreeDaqBuf().
| HANDLE g_hFlgFileMap = NULL |
Definition at line 17 of file adc_ctrl.cpp.
Referenced by AllocDaqBuf(), and FreeDaqBuf().
| HANDLE g_hPostfixFileMap = NULL |
Definition at line 18 of file adc_ctrl.cpp.
Referenced by AdcSettings().
| BRD_Handle g_hSRV |
Definition at line 13 of file adc_ctrl_data.cpp.
Referenced by DirectFile().
| int g_IoDelay |
Definition at line 18 of file adc_ctrl_data.cpp.
Referenced by AdcSettings().
| ULONG g_MemAsFifo |
Definition at line 14 of file adc_ctrl_data.cpp.
Referenced by DaqIntoFifo(), DaqIntoFifoDMA(), and DirWriteIntoFile().
| ULONG g_MemDrqFlag |
Definition at line 16 of file adc_ctrl_data.cpp.
Referenced by AdcSettings(), DaqIntoFifoDMA(), and DirWriteIntoFile().
| long long g_nPostTrigSamples |
Definition at line 30 of file adc_ctrl_data.cpp.
Referenced by AdcSettings().
| ULONG* g_pFlags |
Definition at line 22 of file adc_ctrl.cpp.
Referenced by AllocDaqBuf(), FreeDaqBuf(), MapRdFlagSinc(), and MapWrFlagSinc().
| char* g_pPostfix |
Definition at line 23 of file adc_ctrl.cpp.
Referenced by AdcSettings(), and MappingIsviParams().
| int g_PretrigMode |
Definition at line 29 of file adc_ctrl_data.cpp.
Referenced by AdcSettings().
| unsigned long long g_samplesOfChannel |
Definition at line 22 of file adc_ctrl_data.cpp.
Referenced by AdcSettings().
| double g_samplRate |
Definition at line 17 of file adc_ctrl_data.cpp.
Referenced by AdcSettings(), and MappingIsviParams().
| int g_transRate |
Definition at line 28 of file adc_ctrl_data.cpp.
Referenced by DaqIntoFifoDMA().
1.8.14