mirror of
https://github.com/ARM-software/devlib.git
synced 2025-02-12 07:58:07 +00:00
Documentation: Corrected typos
This commit is contained in:
parent
6bc3479abb
commit
1fd5636217
@ -99,7 +99,7 @@ Connection Types
|
|||||||
``adb`` is part of the Android SDK (though stand-alone versions are also
|
``adb`` is part of the Android SDK (though stand-alone versions are also
|
||||||
available).
|
available).
|
||||||
|
|
||||||
:param device: The name of the adb divice. This is usually a unique hex
|
:param device: The name of the adb device. This is usually a unique hex
|
||||||
string for USB-connected devices, or an ip address/port
|
string for USB-connected devices, or an ip address/port
|
||||||
combination. To see connected devices, you can run ``adb
|
combination. To see connected devices, you can run ``adb
|
||||||
devices`` on the host.
|
devices`` on the host.
|
||||||
@ -126,21 +126,21 @@ Connection Types
|
|||||||
.. note:: ``keyfile`` and ``password`` can't be specified
|
.. note:: ``keyfile`` and ``password`` can't be specified
|
||||||
at the same time.
|
at the same time.
|
||||||
|
|
||||||
:param port: TCP port on which SSH server is litening on the remoted device.
|
:param port: TCP port on which SSH server is listening on the remote device.
|
||||||
Omit to use the default port.
|
Omit to use the default port.
|
||||||
:param timeout: Timeout for the connection in seconds. If a connection
|
:param timeout: Timeout for the connection in seconds. If a connection
|
||||||
cannot be established within this time, an error will be
|
cannot be established within this time, an error will be
|
||||||
raised.
|
raised.
|
||||||
:param password_prompt: A string with the password prompt used by
|
:param password_prompt: A string with the password prompt used by
|
||||||
``sshpass``. Set this if your version of ``sshpass``
|
``sshpass``. Set this if your version of ``sshpass``
|
||||||
uses somethin other than ``"[sudo] password"``.
|
uses something other than ``"[sudo] password"``.
|
||||||
|
|
||||||
|
|
||||||
.. class:: TelnetConnection(host, username, password=None, port=None,\
|
.. class:: TelnetConnection(host, username, password=None, port=None,\
|
||||||
timeout=None, password_prompt=None,\
|
timeout=None, password_prompt=None,\
|
||||||
original_prompt=None)
|
original_prompt=None)
|
||||||
|
|
||||||
A connectioned to a device on the network over Telenet.
|
A connection to a device on the network over Telenet.
|
||||||
|
|
||||||
.. note:: Since Telenet protocol is does not support file transfer, scp is
|
.. note:: Since Telenet protocol is does not support file transfer, scp is
|
||||||
used for that purpose.
|
used for that purpose.
|
||||||
@ -153,7 +153,7 @@ Connection Types
|
|||||||
``sshpass`` utility must be installed on the
|
``sshpass`` utility must be installed on the
|
||||||
system.
|
system.
|
||||||
|
|
||||||
:param port: TCP port on which SSH server is litening on the remoted device.
|
:param port: TCP port on which SSH server is listening on the remote device.
|
||||||
Omit to use the default port.
|
Omit to use the default port.
|
||||||
:param timeout: Timeout for the connection in seconds. If a connection
|
:param timeout: Timeout for the connection in seconds. If a connection
|
||||||
cannot be established within this time, an error will be
|
cannot be established within this time, an error will be
|
||||||
|
@ -114,14 +114,14 @@ Instrument
|
|||||||
:class:`Measurement` objects (one for each active channel).
|
:class:`Measurement` objects (one for each active channel).
|
||||||
|
|
||||||
.. note:: This method is only implemented by :class:`Instrument`\ s that
|
.. note:: This method is only implemented by :class:`Instrument`\ s that
|
||||||
support ``INSTANTANEOUS`` measurment.
|
support ``INSTANTANEOUS`` measurement.
|
||||||
|
|
||||||
.. method:: Instrument.start()
|
.. method:: Instrument.start()
|
||||||
|
|
||||||
Starts collecting measurements from ``active_channels``.
|
Starts collecting measurements from ``active_channels``.
|
||||||
|
|
||||||
.. note:: This method is only implemented by :class:`Instrument`\ s that
|
.. note:: This method is only implemented by :class:`Instrument`\ s that
|
||||||
support ``CONTINUOUS`` measurment.
|
support ``CONTINUOUS`` measurement.
|
||||||
|
|
||||||
.. method:: Instrument.stop()
|
.. method:: Instrument.stop()
|
||||||
|
|
||||||
@ -129,14 +129,14 @@ Instrument
|
|||||||
:func:`start()`.
|
:func:`start()`.
|
||||||
|
|
||||||
.. note:: This method is only implemented by :class:`Instrument`\ s that
|
.. note:: This method is only implemented by :class:`Instrument`\ s that
|
||||||
support ``CONTINUOUS`` measurment.
|
support ``CONTINUOUS`` measurement.
|
||||||
|
|
||||||
.. method:: Instrument.get_data(outfile)
|
.. method:: Instrument.get_data(outfile)
|
||||||
|
|
||||||
Write collected data into ``outfile``. Must be called after :func:`stop()`.
|
Write collected data into ``outfile``. Must be called after :func:`stop()`.
|
||||||
Data will be written in CSV format with a column for each channel and a row
|
Data will be written in CSV format with a column for each channel and a row
|
||||||
for each sample. Column heading will be channel, labels in the form
|
for each sample. Column heading will be channel, labels in the form
|
||||||
``<site>_<kind>`` (see :class:`InstrumentChannel`). The order of the coluns
|
``<site>_<kind>`` (see :class:`InstrumentChannel`). The order of the columns
|
||||||
will be the same as the order of channels in ``Instrument.active_channels``.
|
will be the same as the order of channels in ``Instrument.active_channels``.
|
||||||
|
|
||||||
This returns a :class:`MeasurementCsv` instance associated with the outfile
|
This returns a :class:`MeasurementCsv` instance associated with the outfile
|
||||||
@ -144,7 +144,7 @@ Instrument
|
|||||||
returned by ``take_measurement()``.
|
returned by ``take_measurement()``.
|
||||||
|
|
||||||
.. note:: This method is only implemented by :class:`Instrument`\ s that
|
.. note:: This method is only implemented by :class:`Instrument`\ s that
|
||||||
support ``CONTINUOUS`` measurment.
|
support ``CONTINUOUS`` measurement.
|
||||||
|
|
||||||
.. attribute:: Instrument.sample_rate_hz
|
.. attribute:: Instrument.sample_rate_hz
|
||||||
|
|
||||||
@ -163,16 +163,16 @@ Instrument Channel
|
|||||||
``site`` and a ``measurement_type``.
|
``site`` and a ``measurement_type``.
|
||||||
|
|
||||||
A ``site`` indicates where on the target a measurement is collected from
|
A ``site`` indicates where on the target a measurement is collected from
|
||||||
(e.g. a volage rail or location of a sensor).
|
(e.g. a voltage rail or location of a sensor).
|
||||||
|
|
||||||
A ``measurement_type`` is an instance of :class:`MeasurmentType` that
|
A ``measurement_type`` is an instance of :class:`MeasurmentType` that
|
||||||
describes what sort of measurment this is (power, temperature, etc). Each
|
describes what sort of measurement this is (power, temperature, etc). Each
|
||||||
mesurement type has a standard unit it is reported in, regardless of an
|
measurement type has a standard unit it is reported in, regardless of an
|
||||||
instrument used to collect it.
|
instrument used to collect it.
|
||||||
|
|
||||||
A channel (i.e. site/measurement_type combination) is unique per instrument,
|
A channel (i.e. site/measurement_type combination) is unique per instrument,
|
||||||
however there may be more than one channel associated with one site (e.g. for
|
however there may be more than one channel associated with one site (e.g. for
|
||||||
both volatage and power).
|
both voltage and power).
|
||||||
|
|
||||||
It should not be assumed that any site/measurement_type combination is valid.
|
It should not be assumed that any site/measurement_type combination is valid.
|
||||||
The list of available channels can queried with
|
The list of available channels can queried with
|
||||||
@ -180,22 +180,22 @@ Instrument Channel
|
|||||||
|
|
||||||
.. attribute:: InstrumentChannel.site
|
.. attribute:: InstrumentChannel.site
|
||||||
|
|
||||||
The name of the "site" from which the measurments are collected (e.g. voltage
|
The name of the "site" from which the measurements are collected (e.g. voltage
|
||||||
rail, sensor, etc).
|
rail, sensor, etc).
|
||||||
|
|
||||||
.. attribute:: InstrumentChannel.kind
|
.. attribute:: InstrumentChannel.kind
|
||||||
|
|
||||||
A string indingcating the type of measrument that will be collted. This is
|
A string indicating the type of measurement that will be collected. This is
|
||||||
the ``name`` of the :class:`MeasurmentType` associated with this channel.
|
the ``name`` of the :class:`MeasurmentType` associated with this channel.
|
||||||
|
|
||||||
.. attribute:: InstrumentChannel.units
|
.. attribute:: InstrumentChannel.units
|
||||||
|
|
||||||
Units in which measurment will be reported. this is determined by the
|
Units in which measurement will be reported. this is determined by the
|
||||||
underlying :class:`MeasurmentType`.
|
underlying :class:`MeasurmentType`.
|
||||||
|
|
||||||
.. attribute:: InstrumentChannel.label
|
.. attribute:: InstrumentChannel.label
|
||||||
|
|
||||||
A label that can be attached to measurments associated with with channel.
|
A label that can be attached to measurements associated with with channel.
|
||||||
This is constructed with ::
|
This is constructed with ::
|
||||||
|
|
||||||
'{}_{}'.format(self.site, self.kind)
|
'{}_{}'.format(self.site, self.kind)
|
||||||
|
@ -126,7 +126,7 @@ policies (governors). The ``devlib`` module exposes the following interface
|
|||||||
cpuidle
|
cpuidle
|
||||||
-------
|
-------
|
||||||
|
|
||||||
``cpufreq`` is the kernel subsystem for managing CPU low power (idle) states.
|
``cpuidle`` is the kernel subsystem for managing CPU low power (idle) states.
|
||||||
|
|
||||||
.. method:: target.cpuidle.get_driver()
|
.. method:: target.cpuidle.get_driver()
|
||||||
|
|
||||||
@ -182,7 +182,7 @@ Every module (ultimately) derives from :class:`Module` class. A module must
|
|||||||
define the following class attributes:
|
define the following class attributes:
|
||||||
|
|
||||||
:name: A unique name for the module. This cannot clash with any of the existing
|
:name: A unique name for the module. This cannot clash with any of the existing
|
||||||
names and must be a valid Python identifier, but is otherwise free-from.
|
names and must be a valid Python identifier, but is otherwise free-form.
|
||||||
:kind: This identifies the type of functionality a module implements, which in
|
:kind: This identifies the type of functionality a module implements, which in
|
||||||
turn determines the interface implemented by the module (all modules of
|
turn determines the interface implemented by the module (all modules of
|
||||||
the same kind must expose a consistent interface). This must be a valid
|
the same kind must expose a consistent interface). This must be a valid
|
||||||
|
@ -74,13 +74,13 @@ This sets up the target for ``devlib`` interaction. This includes creating
|
|||||||
working directories, deploying busybox, etc. It's usually enough to do this once
|
working directories, deploying busybox, etc. It's usually enough to do this once
|
||||||
for a new device, as the changes this makes will persist across reboots.
|
for a new device, as the changes this makes will persist across reboots.
|
||||||
However, there is no issue with calling this multiple times, so, to be on the
|
However, there is no issue with calling this multiple times, so, to be on the
|
||||||
safe site, it's a good idea to call this once at the beginning of your scripts.
|
safe side, it's a good idea to call this once at the beginning of your scripts.
|
||||||
|
|
||||||
Command Execution
|
Command Execution
|
||||||
~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
There are several ways to execute a command on the target. In each case, a
|
There are several ways to execute a command on the target. In each case, a
|
||||||
:class:`TargetError` will be raised if something goes wrong. In very case, it is
|
:class:`TargetError` will be raised if something goes wrong. In each case, it is
|
||||||
also possible to specify ``as_root=True`` if the specified command should be
|
also possible to specify ``as_root=True`` if the specified command should be
|
||||||
executed as root.
|
executed as root.
|
||||||
|
|
||||||
@ -154,7 +154,7 @@ Process Control
|
|||||||
# kill all running instances of a process.
|
# kill all running instances of a process.
|
||||||
t.killall('badexe', signal=signal.SIGKILL)
|
t.killall('badexe', signal=signal.SIGKILL)
|
||||||
|
|
||||||
# List processes running on the target. This retruns a list of parsed
|
# List processes running on the target. This returns a list of parsed
|
||||||
# PsEntry records.
|
# PsEntry records.
|
||||||
entries = t.ps()
|
entries = t.ps()
|
||||||
# e.g. print virtual memory sizes of all running sshd processes:
|
# e.g. print virtual memory sizes of all running sshd processes:
|
||||||
|
@ -18,7 +18,7 @@ it was not specified explicitly by the user.
|
|||||||
:param core_names: A list of CPU core names in the order they appear
|
:param core_names: A list of CPU core names in the order they appear
|
||||||
registered with the OS. If they are not specified,
|
registered with the OS. If they are not specified,
|
||||||
they will be queried at run time.
|
they will be queried at run time.
|
||||||
:param core_clusters: Alist with cluster ids of each core (starting with
|
:param core_clusters: A list with cluster ids of each core (starting with
|
||||||
0). If this is not specified, clusters will be
|
0). If this is not specified, clusters will be
|
||||||
inferred from core names (cores with the same name are
|
inferred from core names (cores with the same name are
|
||||||
assumed to be in a cluster).
|
assumed to be in a cluster).
|
||||||
@ -38,13 +38,13 @@ Versatile Express
|
|||||||
The generic platform may be extended to support hardware- or
|
The generic platform may be extended to support hardware- or
|
||||||
infrastructure-specific functionality. Platforms exist for ARM
|
infrastructure-specific functionality. Platforms exist for ARM
|
||||||
VersatileExpress-based :class:`Juno` and :class:`TC2` development boards. In
|
VersatileExpress-based :class:`Juno` and :class:`TC2` development boards. In
|
||||||
addition to the standard :class:`Platform` parameters above, these platfroms
|
addition to the standard :class:`Platform` parameters above, these platforms
|
||||||
support additional configuration:
|
support additional configuration:
|
||||||
|
|
||||||
|
|
||||||
.. class:: VersatileExpressPlatform
|
.. class:: VersatileExpressPlatform
|
||||||
|
|
||||||
Normally, this would be instatiated via one of its derived classes
|
Normally, this would be instantiated via one of its derived classes
|
||||||
(:class:`Juno` or :class:`TC2`) that set appropriate defaults for some of
|
(:class:`Juno` or :class:`TC2`) that set appropriate defaults for some of
|
||||||
the parameters.
|
the parameters.
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ support additional configuration:
|
|||||||
mounted on the host system.
|
mounted on the host system.
|
||||||
:param hard_reset_method: Specifies the method for hard-resetting the devices
|
:param hard_reset_method: Specifies the method for hard-resetting the devices
|
||||||
(e.g. if it becomes unresponsive and normal reboot
|
(e.g. if it becomes unresponsive and normal reboot
|
||||||
method doesn not work). Currently supported methods
|
method doesn't not work). Currently supported methods
|
||||||
are:
|
are:
|
||||||
|
|
||||||
:dtr: reboot by toggling DTR line on the serial
|
:dtr: reboot by toggling DTR line on the serial
|
||||||
@ -80,7 +80,7 @@ support additional configuration:
|
|||||||
The following values are currently supported:
|
The following values are currently supported:
|
||||||
|
|
||||||
:uefi: Boot via UEFI menu, by selecting the entry
|
:uefi: Boot via UEFI menu, by selecting the entry
|
||||||
specified by ``uefi_entry`` paramter. If this
|
specified by ``uefi_entry`` parameter. If this
|
||||||
entry does not exist, it will be automatically
|
entry does not exist, it will be automatically
|
||||||
created based on values provided for ``image``,
|
created based on values provided for ``image``,
|
||||||
``initrd``, ``fdt``, and ``bootargs`` parameters.
|
``initrd``, ``fdt``, and ``bootargs`` parameters.
|
||||||
|
@ -38,7 +38,7 @@ Target
|
|||||||
by the connection's account). This location will be created,
|
by the connection's account). This location will be created,
|
||||||
if necessary, during ``setup()``.
|
if necessary, during ``setup()``.
|
||||||
|
|
||||||
This location does *not* to be same as the system's executables
|
This location does *not* need to be same as the system's executables
|
||||||
location. In fact, to prevent devlib from overwriting system's defaults,
|
location. In fact, to prevent devlib from overwriting system's defaults,
|
||||||
it better if this is a separate location, if possible.
|
it better if this is a separate location, if possible.
|
||||||
|
|
||||||
@ -83,12 +83,12 @@ Target
|
|||||||
|
|
||||||
.. attribute:: Target.big_core
|
.. attribute:: Target.big_core
|
||||||
|
|
||||||
This is the name of the cores that the "big"s in an ARM big.LITTLE
|
This is the name of the cores that are the "big"s in an ARM big.LITTLE
|
||||||
configuration. This is obtained via the underlying :class:`Platform`.
|
configuration. This is obtained via the underlying :class:`Platform`.
|
||||||
|
|
||||||
.. attribute:: Target.little_core
|
.. attribute:: Target.little_core
|
||||||
|
|
||||||
This is the name of the cores that the "little"s in an ARM big.LITTLE
|
This is the name of the cores that are the "little"s in an ARM big.LITTLE
|
||||||
configuration. This is obtained via the underlying :class:`Platform`.
|
configuration. This is obtained via the underlying :class:`Platform`.
|
||||||
|
|
||||||
.. attribute:: Target.is_connected
|
.. attribute:: Target.is_connected
|
||||||
@ -440,12 +440,12 @@ Target
|
|||||||
|
|
||||||
.. method:: Target.extract(path, dest=None)
|
.. method:: Target.extract(path, dest=None)
|
||||||
|
|
||||||
Extracts the specified archive/file and returns the path to the extrated
|
Extracts the specified archive/file and returns the path to the extracted
|
||||||
contents. The extraction method is determined based on the file extension.
|
contents. The extraction method is determined based on the file extension.
|
||||||
``zip``, ``tar``, ``gzip``, and ``bzip2`` are supported.
|
``zip``, ``tar``, ``gzip``, and ``bzip2`` are supported.
|
||||||
|
|
||||||
:param dest: Specified an on-target destination directory (which must exist)
|
:param dest: Specified an on-target destination directory (which must exist)
|
||||||
for the extrated contents.
|
for the extracted contents.
|
||||||
|
|
||||||
Returns the path to the extracted contents. In case of files (gzip and
|
Returns the path to the extracted contents. In case of files (gzip and
|
||||||
bzip2), the path to the decompressed file is returned; for archives, the
|
bzip2), the path to the decompressed file is returned; for archives, the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user