Skip to content

Commit

Permalink
adi:Generic: Address the review comments
Browse files Browse the repository at this point in the history
1. Add docstrings for properties
2. Remove extra line
3. Fix type in docstring
4. Remove extraneous comment

Signed-off-by: RibhuDP <[email protected]>
  • Loading branch information
ribdp committed Jan 5, 2024
1 parent 6b11d41 commit 7ff284b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 7 deletions.
22 changes: 20 additions & 2 deletions +adi/+Generic/Rx.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
% data from any generic ADI precision ADC.
%
% rx = adi.Generic.Rx('adxxxx', 'ip:analog.local');
%

properties
% DeviceAttributeNames Device Attribute Names
Expand All @@ -15,7 +14,7 @@
% at initialization time
DeviceAttributeNames

% ChannelAttributeNames Device Attribute Names
% ChannelAttributeNames Channel Attribute Names
% Array of channel IIO attribute names as defined in the
% driver/firmware, and queried from the hardware
% at initialization time
Expand All @@ -30,11 +29,27 @@
end

properties (Nontunable, Hidden)
% channel_names Channel Names
channel_names = {'voltage0'}

% Timeout Timeout for the IIO client
Timeout = Inf

% kernelBuffersCount Kernel Buffers Count
% For Tinyiiod firmware, set the value to 1.
% For Linux platforms, value can be greater than 1 aa well
kernelBuffersCount = 1

% dataTypeStr Data Type String
% Data type to store the samples
dataTypeStr = 'int32'

% phyDevName Physical Device Name
% Set this to match the IIO device name
phyDevName = 'adxxxx'

% devName Device Name
% Set this to match the IIO device name
devName = 'adxxxx'
end

Expand All @@ -48,6 +63,9 @@
end

properties(Hidden, Access = protected)
% cachedAttrWrites Cached Attribute Writes
% Stores the attr write values locally until hardware is
% connected.
cachedAttrWrites = {}
end

Expand Down
10 changes: 5 additions & 5 deletions examples/Generic_DataCapture.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
rx = adi.Generic.Rx("devName", 'ad4630-24', 'phyDevName', 'ad4630-24',...
'uri', 'ip:analog.local');

rx.SamplesPerFrame = 4096; % Using values less than 3660 can yield poor
% performance, generally
% Specify number of samples to fetch using buffered capture
rx.SamplesPerFrame = 4096;

% Enable channels for data capture
rx.EnabledChannels = [1];

% Display device and channel attribute names
rx.DeviceAttributeNames
rx.ChannelAttributeNames
% Uncomment to display device and channel attribute names
%rx.DeviceAttributeNames
%rx.ChannelAttributeNames

% Read and write attribute values
% For example, with ad4630-24
Expand Down

0 comments on commit 7ff284b

Please sign in to comment.