![]() |
libsigrok
0.3.0
sigrok hardware access and backend library
|
00001 /* 00002 * This file is part of the libsigrok project. 00003 * 00004 * Copyright (C) 2010-2012 Bert Vermeulen <bert@biot.com> 00005 * 00006 * This program is free software: you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation, either version 3 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00018 */ 00019 00020 #include "libsigrok.h" 00021 #include "libsigrok-internal.h" 00022 00023 /** 00024 * @file 00025 * 00026 * Input file/data format handling. 00027 */ 00028 00029 /** 00030 * @defgroup grp_input Input formats 00031 * 00032 * Input file/data format handling. 00033 * 00034 * libsigrok can process acquisition data in several different ways. 00035 * Aside from acquiring data from a hardware device, it can also take it from 00036 * a file in various formats (binary, CSV, VCD, and so on). 00037 * 00038 * Like everything in libsigrok that handles data, processing is done in a 00039 * streaming manner -- input should be supplied to libsigrok a chunk at a time. 00040 * This way anything that processes data can do so in real time, without the 00041 * user having to wait for the whole thing to be finished. 00042 * 00043 * Every input module is "pluggable", meaning it's handled as being separate 00044 * from the main libsigrok, but linked in to it statically. To keep things 00045 * modular and separate like this, functions within an input module should be 00046 * declared static, with only the respective 'struct sr_input_format' being 00047 * exported for use into the wider libsigrok namespace. 00048 * 00049 * @{ 00050 */ 00051 00052 /** @cond PRIVATE */ 00053 extern SR_PRIV struct sr_input_format input_chronovu_la8; 00054 extern SR_PRIV struct sr_input_format input_csv; 00055 extern SR_PRIV struct sr_input_format input_binary; 00056 extern SR_PRIV struct sr_input_format input_vcd; 00057 extern SR_PRIV struct sr_input_format input_wav; 00058 /* @endcond */ 00059 00060 static struct sr_input_format *input_module_list[] = { 00061 &input_vcd, 00062 &input_chronovu_la8, 00063 &input_wav, 00064 &input_csv, 00065 /* This one has to be last, because it will take any input. */ 00066 &input_binary, 00067 NULL, 00068 }; 00069 00070 /** @since 0.1.0 */ 00071 SR_API struct sr_input_format **sr_input_list(void) 00072 { 00073 return input_module_list; 00074 } 00075 00076 /** @} */
1.7.6.1