0.4.0 • Published 5 years ago

libiio v0.4.0

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

Build Status npm version

Linux Industrial Input/Output (IIO) Subsystem library (libiio) bindings for Node.js

Dependencies

This module depends on libiio package being installed on your system.

Install

npm i libiio

Usage

const iio = require('libiio');

for(let i = 0; i < iio.get_backends_count(); i++) {
    console.log(iio.get_backend(i));
}

API

Most of API calls are directly mapped to libiio API without iio_ prefix.

namedescription
library_get_versionGet the version of the libiio library
get_backends_countGet the number of available backends
get_backendRetrieve the name of a given backend
create_scan_contextCreate a scan context
scan_context_get_info_listEnumerate available contexts
create_context_from_uriCreate a context from a URI description
context_info_get_uriGet a uri of a discovered context + index
context_info_get_descriptionGet a description of a discovered context + index
context_get_devices_countEnumerate the devices found in the given context
context_get_deviceGet the device present at the given index
device_get_idRetrieve the device ID (e.g. iio:device0)
device_get_nameRetrieve the device name (e.g. xadc)
device_get_attrs_countEnumerate the device-specific attributes of the given device
device_get_attrGet the device-specific attribute present at the given index
device_attr_readRead the content of the given device-specific attribute
device_get_channels_countEnumerate the channels of the given device
device_get_channelGet the channel present at the given index
channel_is_outputReturn True if the given channel is an output channel
channel_get_idRetrieve the channel ID (e.g. voltage0)
channel_get_nameRetrieve the channel name (e.g. vccint)
channel_is_enabledReturns True if the channel is enabled
channel_get_typeGet the type of the given channel
channel_disableDisable the given channel
channel_enableEnable the given channel
channel_get_attrs_countEnumerate the channel-specific attributes of the given channel
channel_get_attrGet the channel-specific attribute present at the given index
channel_attr_readRead the content of the given channel-specific attribute
channel_attr_write_rawSet the value of the given channel-specific attribute
channel_attr_writeSet the value of the given channel-specific attribute

License

MIT

0.4.0

5 years ago

0.3.0

5 years ago

0.2.0

6 years ago

0.1.0

6 years ago