Doxygen Book
gsttensor_srciio.h
Go to the documentation of this file.
1 
27 #ifndef __GST_TENSOR_SRC_IIO_H__
28 #define __GST_TENSOR_SRC_IIO_H__
29 
30 #include <gst/gst.h>
31 #include <gst/base/gstbasesrc.h>
32 #include <glib/gprintf.h>
33 #include <tensor_common.h>
34 #include <poll.h>
35 
36 G_BEGIN_DECLS
37 #define GST_TYPE_TENSOR_SRC_IIO \
38  (gst_tensor_src_iio_get_type())
39 #define GST_TENSOR_SRC_IIO(obj) \
40  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_TENSOR_SRC_IIO,GstTensorSrcIIO))
41 #define GST_TENSOR_SRC_IIO_CLASS(klass) \
42  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_TENSOR_SRC_IIO,GstTensorSrcIIOClass))
43 #define GST_IS_TENSOR_SRC_IIO(obj) \
44  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_TENSOR_SRC_IIO))
45 #define GST_IS_TENSOR_SRC_IIO_CLASS(klass) \
46  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_TENSOR_SRC_IIO))
47 #define GST_TENSOR_SRC_IIO_CAST(obj) ((GstTensorSrcIIO *)(obj))
50 
54 typedef enum
55 {
60 
68 {
69  gchar *name;
70  gchar *base_dir;
71  gint id;
73 
78 {
79  gboolean enabled;
80  gboolean pre_enabled;
81  gchar *name;
82  gchar *generic_name;
83  gchar *base_dir;
84  gchar *base_file;
85  gint index;
87  gboolean big_endian;
88  gboolean is_signed;
89  guint used_bits;
90  guint64 mask;
91  guint storage_bytes;
92  guint storage_bits;
93  guint shift;
94  guint location;
95  gfloat offset;
96  gfloat scale;
98 
105 {
106  GstBaseSrc element;
109  gboolean silent;
110  gboolean configured;
113  gchar *mode;
114  gchar *base_dir;
115  gchar *dev_dir;
118  GList *channels;
119  GHashTable *custom_channel_table;
121  guint scan_size;
122  struct pollfd *buffer_data_fp;
125  gboolean is_tensor;
136 };
137 
144 {
145  GstBaseSrcClass parent_class;
146 };
147 
151 GType gst_tensor_src_iio_get_type (void);
152 
153 G_END_DECLS
154 #endif
_GstTensorSrcIIO::buffer_data_fp
struct pollfd * buffer_data_fp
Definition: gsttensor_srciio.h:122
_GstTensorSrcIIODeviceProperties::name
gchar * name
Definition: gsttensor_srciio.h:69
_GstTensorSrcIIO::num_channels_enabled
guint num_channels_enabled
Definition: gsttensor_srciio.h:123
CHANNELS_ENABLED_CUSTOM
@ CHANNELS_ENABLED_CUSTOM
Definition: gsttensor_srciio.h:58
_GstTensorSrcIIOClass
GstTensorSrcIIOClass data structure.
Definition: gsttensor_srciio.h:143
_GstTensorSrcIIO::mode
gchar * mode
Definition: gsttensor_srciio.h:113
_GstTensorSrcIIOChannelProperties::storage_bits
guint storage_bits
Definition: gsttensor_srciio.h:92
_GstTensorSrcIIOChannelProperties::scale
gfloat scale
Definition: gsttensor_srciio.h:96
_GstTensorSrcIIO::poll_timeout
gint poll_timeout
Definition: gsttensor_srciio.h:132
_GstTensorSrcIIO::is_tensor
gboolean is_tensor
Definition: gsttensor_srciio.h:125
_GstTensorSrcIIO::merge_channels_data
gboolean merge_channels_data
Definition: gsttensor_srciio.h:124
_GstTensorSrcIIO
GstTensorSrcIIO data structure.
Definition: gsttensor_srciio.h:104
_GstTensorSrcIIOChannelProperties::big_endian
gboolean big_endian
Definition: gsttensor_srciio.h:87
_GstTensorSrcIIO::custom_channel_table
GHashTable * custom_channel_table
Definition: gsttensor_srciio.h:119
_GstTensorSrcIIO::tensors_config
GstTensorsConfig * tensors_config
Definition: gsttensor_srciio.h:135
_GstTensorSrcIIOChannelProperties::mask
guint64 mask
Definition: gsttensor_srciio.h:90
CHANNELS_ENABLED_AUTO
@ CHANNELS_ENABLED_AUTO
Definition: gsttensor_srciio.h:57
_GstTensorSrcIIOChannelProperties::index
gint index
Definition: gsttensor_srciio.h:85
gst_tensor_src_iio_get_type
GType gst_tensor_src_iio_get_type(void)
Function to get type of tensor_src_iio.
_GstTensorSrcIIO::base_dir
gchar * base_dir
Definition: gsttensor_srciio.h:114
CHANNELS_ENABLED_ALL
@ CHANNELS_ENABLED_ALL
Definition: gsttensor_srciio.h:56
_GstTensorSrcIIOChannelProperties::used_bits
guint used_bits
Definition: gsttensor_srciio.h:89
_GstTensorSrcIIODeviceProperties
GstTensorSrcIIO devices's properties (internal data structure)
Definition: gsttensor_srciio.h:67
_GstTensorSrcIIOClass::parent_class
GstBaseSrcClass parent_class
Definition: gsttensor_srciio.h:145
_GstTensorSrcIIO::default_sampling_frequency
guint64 default_sampling_frequency
Definition: gsttensor_srciio.h:129
GstTensorsConfig
Internal data structure for configured tensors info (for other/tensors).
Definition: tensor_typedef.h:284
_GstTensorSrcIIO::default_buffer_capacity
guint default_buffer_capacity
Definition: gsttensor_srciio.h:130
_GstTensorSrcIIOChannelProperties::name
gchar * name
Definition: gsttensor_srciio.h:81
_GstTensorSrcIIO::default_trigger
gchar * default_trigger
Definition: gsttensor_srciio.h:131
_GstTensorSrcIIO::dev_dir
gchar * dev_dir
Definition: gsttensor_srciio.h:115
_GstTensorSrcIIODeviceProperties::base_dir
gchar * base_dir
Definition: gsttensor_srciio.h:70
_GstTensorSrcIIO::device
GstTensorSrcIIODeviceProperties device
Definition: gsttensor_srciio.h:116
_GstTensorSrcIIOChannelProperties::shift
guint shift
Definition: gsttensor_srciio.h:93
_GstTensorSrcIIODeviceProperties::id
gint id
Definition: gsttensor_srciio.h:71
tensor_common.h
Common header file for NNStreamer, the GStreamer plugin for neural networks.
_GstTensorSrcIIOChannelProperties::storage_bytes
guint storage_bytes
Definition: gsttensor_srciio.h:91
_GstTensorSrcIIOChannelProperties::generic_name
gchar * generic_name
Definition: gsttensor_srciio.h:82
_GstTensorSrcIIO::element
GstBaseSrc element
Definition: gsttensor_srciio.h:106
_GstTensorSrcIIO::buffer_capacity
guint buffer_capacity
Definition: gsttensor_srciio.h:126
_GstTensorSrcIIOChannelProperties::base_file
gchar * base_file
Definition: gsttensor_srciio.h:84
_GstTensorSrcIIOChannelProperties::location
guint location
Definition: gsttensor_srciio.h:94
_GstTensorSrcIIOChannelProperties::base_dir
gchar * base_dir
Definition: gsttensor_srciio.h:83
_GstTensorSrcIIOChannelProperties::is_signed
gboolean is_signed
Definition: gsttensor_srciio.h:88
_GstTensorSrcIIOChannelProperties::enabled
gboolean enabled
Definition: gsttensor_srciio.h:79
_GstTensorSrcIIO::trigger
GstTensorSrcIIODeviceProperties trigger
Definition: gsttensor_srciio.h:117
_GstTensorSrcIIO::configured
gboolean configured
Definition: gsttensor_srciio.h:110
_GstTensorSrcIIOChannelProperties::offset
gfloat offset
Definition: gsttensor_srciio.h:95
_GstTensorSrcIIOChannelProperties
GstTensorSrcIIO channel's properties (internal data structure)
Definition: gsttensor_srciio.h:77
_GstTensorSrcIIO::channels
GList * channels
Definition: gsttensor_srciio.h:118
_GstTensorSrcIIO::sampling_frequency
guint64 sampling_frequency
Definition: gsttensor_srciio.h:127
_GstTensorSrcIIO::scan_size
guint scan_size
Definition: gsttensor_srciio.h:121
_GstTensorSrcIIO::channels_enabled
channels_enabled_options channels_enabled
Definition: gsttensor_srciio.h:120
_GstTensorSrcIIO::silent
gboolean silent
Definition: gsttensor_srciio.h:109
GstTensorSrcIIOChannelProperties
struct _GstTensorSrcIIOChannelProperties GstTensorSrcIIOChannelProperties
GstTensorSrcIIO channel's properties (internal data structure)
channels_enabled_options
channels_enabled_options
iio device channel enabled mode
Definition: gsttensor_srciio.h:54
GstTensorSrcIIODeviceProperties
struct _GstTensorSrcIIODeviceProperties GstTensorSrcIIODeviceProperties
GstTensorSrcIIO devices's properties (internal data structure)
_GstTensorSrcIIOChannelProperties::pre_enabled
gboolean pre_enabled
Definition: gsttensor_srciio.h:80