|
int | read_pqm_attr (void *device, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t attr_id) |
| Read a pqm device attribute. More...
|
|
int | write_pqm_attr (void *device, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t attr_id) |
| Write a pqm device attribute. More...
|
|
int | read_ch_attr (void *device, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t attr_id) |
| Read a channel attribute. More...
|
|
int32_t | read_samples (struct iio_device_data *dev_data) |
| function for reading samples from the device. More...
|
|
int32_t | pqm_trigger_handler (struct iio_device_data *dev_data) |
| Handles trigger: reads one data-set and writes it to the buffer. More...
|
|
◆ EVENT_COMMON_ATTR
#define EVENT_COMMON_ATTR |
Value:{ \
.name = "countEvent", \
}, \
{ \
.name = "startTime", \
}, \
{ \
.name = "endTime", \
}, \
{ \
.name = "durationInCycles", \
}
◆ PQM_CURRENT_CHANNEL
#define PQM_CURRENT_CHANNEL |
( |
|
_idx, |
|
|
|
_scan_idx, |
|
|
|
_name |
|
) |
| |
Value: { \
.name = _name, .ch_type =
IIO_CURRENT, .channel = _idx, \
.scan_index = _scan_idx, .indexed =
true, .scan_type = &
pqm_scan_type, \
}
◆ PQM_EVENT_CHANNEL
#define PQM_EVENT_CHANNEL |
( |
|
_idx, |
|
|
|
_scan_idx, |
|
|
|
_name, |
|
|
|
_attrb_def |
|
) |
| |
Value:{ \
.name = _name, .ch_type =
IIO_COUNT, .channel = _idx, \
.scan_index = _scan_idx, .indexed = true, \
.ch_out = true \
}
◆ PQM_VOLTAGE_CHANNEL
#define PQM_VOLTAGE_CHANNEL |
( |
|
_idx, |
|
|
|
_scan_idx, |
|
|
|
_name |
|
) |
| |
Value: { \
.name = _name, .ch_type =
IIO_VOLTAGE, .channel = _idx, \
.scan_index = _scan_idx, .indexed =
true, .scan_type = &
pqm_scan_type, \
}
◆ pqm_trigger_handler()
Handles trigger: reads one data-set and writes it to the buffer.
- Parameters
-
dev_data | - The iio device data structure. |
- Returns
- ret - Result of the handling procedure. In case of success, the size of the written data is returned.
◆ read_ch_attr()
int read_ch_attr |
( |
void * |
device, |
|
|
char * |
buf, |
|
|
uint32_t |
len, |
|
|
const struct iio_ch_info * |
channel, |
|
|
intptr_t |
attr_id |
|
) |
| |
Read a channel attribute.
- Parameters
-
device | - The iio device structure |
buf | - Buffer to be filled with requested data |
len | - Length of the received command buffer in bytes |
channel | - Command channel info |
attr_id | - attribute descriptor |
- Returns
- - The length of the buffer in case of success, negative value otherwise
◆ read_pqm_attr()
int read_pqm_attr |
( |
void * |
device, |
|
|
char * |
buf, |
|
|
uint32_t |
len, |
|
|
const struct iio_ch_info * |
channel, |
|
|
intptr_t |
attr_id |
|
) |
| |
Read a pqm device attribute.
- Parameters
-
device | - The iio device structure |
buf | - Buffer to be filled with requested data |
len | - Length of the received command buffer in bytes |
channel | - Command channel info |
attr_id | - attribute descriptor |
- Returns
- - The length of the buffer in case of success, negative value otherwise
◆ read_samples()
function for reading samples from the device.
- Parameters
-
dev_data | - The iio device data structure. |
- Returns
- the number of read samples.
◆ write_pqm_attr()
int write_pqm_attr |
( |
void * |
device, |
|
|
char * |
buf, |
|
|
uint32_t |
len, |
|
|
const struct iio_ch_info * |
channel, |
|
|
intptr_t |
attr_id |
|
) |
| |
Write a pqm device attribute.
- Parameters
-
device | - The iio device structure |
buf | - Buffer to be filled with requested data |
len | - Length of the received command buffer in bytes |
channel | - Command channel info |
attr_id | - attribute descriptor |
- Returns
- - The length of the buffer in case of success, negative value otherwise
◆ configChanged
◆ current_pqm_attributes
◆ event_pqm_dips_attribute
Initial value:= {
{
.name = "minMag",
},
}
◆ event_pqm_intrpr_attribute
◆ event_pqm_rvc_attribute
Initial value:= {
{
.name = "deltaUmax",
},
{
.name = "deltaUss",
},
}
◆ event_pqm_swell_attribute
Initial value:= {
{
.name = "maxMag",
},
}
◆ global_pqm_attributes
◆ pqm_iio_descriptor
Initial value:= {
.channels = iio_pqm_channels,
.debug_attributes =
NULL,
.buffer_attributes =
NULL,
}
◆ pqm_scan_type
Initial value:= {.sign = 'd',
.realbits = 16,
.storagebits = 16,
.shift = 0,
.is_big_endian =
true
}
◆ processData
◆ voltage_pqm_attributes
#define END_ATTRIBUTES_ARRAY
Definition: iio_types.h:116
@ IIO_COUNT
Definition: iio_types.h:78
#define CHAN_EVENT_COUNT
Definition: iio_pqm.h:101
struct iio_attribute current_pqm_attributes[]
Definition: iio_pqm.c:759
#define CHAN_EVENT_DELTA_U_SS
Definition: iio_pqm.h:108
#define CHAN_EVENT_DURATION_IN_CYCL
Definition: iio_pqm.h:104
#define TOTAL_PQM_CHANNELS
Definition: common_data.h:72
int32_t read_samples(struct iio_device_data *dev_data)
function for reading samples from the device.
Definition: iio_pqm.c:629
#define EVENT_COMMON_ATTR
Definition: iio_pqm.c:66
#define CHAN_EVENT_MIN_MAG
Definition: iio_pqm.h:105
int32_t pqm_trigger_handler(struct iio_device_data *dev_data)
Handles trigger: reads one data-set and writes it to the buffer.
Definition: iio_pqm.c:648
struct iio_attribute global_pqm_attributes[]
Definition: iio_pqm.c:805
int read_ch_attr(void *device, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t attr_id)
Read a channel attribute.
Definition: iio_pqm.c:359
struct scan_type pqm_scan_type
Definition: iio_pqm.c:1039
@ IIO_CURRENT
Definition: iio_types.h:66
@ IIO_VOLTAGE
Definition: iio_types.h:65
#define CHAN_EVENT_END_TIME
Definition: iio_pqm.h:103
#define CHAN_EVENT_DELTA_U_MAX
Definition: iio_pqm.h:107
struct iio_attribute voltage_pqm_attributes[]
Definition: iio_pqm.c:678
#define CHAN_EVENT_MAX_MAG
Definition: iio_pqm.h:106
struct iio_attribute * attributes
Definition: iio_types.h:186
int32_t update_pqm_channels(void *dev, uint32_t mask)
active pqm channels
Definition: basic_example.c:78
#define NULL
Definition: wrapper.h:64
int32_t close_pqm_channels(void *dev)
close all channels
Definition: basic_example.c:91
#define CHAN_EVENT_START_TIME
Definition: iio_pqm.h:102