.. |degc| unicode:: U+02103 .. DEGREE CELSIUS
.. _properties:

Properties
==========

Configuration, status and telemetry download from the device is handled using a number of property
variables. Each variable has a type (signed/unsigned integers, floating point numbers,
strings, etc.) and a default value. Some properties are used for configuration and can be modified
and stored in (optionally write-protected) non-volatile memory using the EGSE shell or remotely via
CSP commands. Others are read-only and used for telemetry purposes.
Most property changes take effect immediately, while others require a store
and a system reset after update.

The system properties are divided into a number of property groups, each covering a specific
part of the firmware. The :ref:`prop client<prop-client>` support library contains wrapper functions around
the CSP protocol to read and update properties. The ``satctl`` Linux application can be used
as a reference for the use of the library.

Property values can be listed, modified and stored using the ``prop`` EGSE shell commands or
remotely through the SRX-8 Client library. As an example, to change the CSP address of the
device to 11 and the default interface to RS422/KISS, run:

.. code-block:: none

    [srx-8] prop get sys.csp.address
    28
    [srx-8] prop set sys.csp.address 11
    [srx-8] prop set sys.csp.routes "0/0 KISS"
    [srx-8] prop unlock sys
    [srx-8] prop save sys
    [srx-8] prop unlock -f sys
    [srx-8] prop save -f sys
    [srx-8] reboot
    ...
    [srx-8] prop get sys.csp.address
    11
    [srx-8] prop get sys.csp.routes
    "0/0 KISS"

On boot, the SRX-8 loads stored properties from F-RAM. The ``sys`` and ``tx`` property groups
can be stored in both a ``boot`` and a ``fallback`` location, where the latter is write protected.
The ``boot`` location has priority over the ``fallback`` values, and is used if it is valid.
A set of default settings are hard coded into the SRX-8 firmware and used if no valid stored
properties are found.

It is possible to change properties runtime without saving them to F-RAM.

System Group
------------

The ``sys`` group contains system parameters that should remain fixed after launch. The group can be
stored twice in ``boot`` and ``fallback`` configuration. Both are write-protected and must be
unlocked using ``prop unlock`` before they can be written to.

The transmitter attempts to load the ``boot`` configuration when booting. The ``fallback`` configuration
is only loaded if loading of the ``boot`` configuration fails.

The Ethernet interfaces have multiple IP addresses on the same physical connector. The IP address to
use for downlink data is given by the base address plus one. With the default configuration, the
following IP addresses are assigned:

- 1Gb/s Ethernet 192.168.100.100: Reserved
- 1Gb/s Ethernet 192.168.100.101: Data
- 10Gb/s Ethernet 192.168.101.100: Reserved
- 10Gb/s Ethernet 192.168.101.101: Data

.. include:: ../../build/client/props/doc/sys.rst

Calibration Group
-----------------

The ``cal`` group contains factory calibration settings and should not be modified.

Transmitter Group
-----------------

The ``tx`` group contains settings for the transmitter. The group can be stored twice in ``boot``
and ``fallback`` configuration. Both are write-protected and must be unlocked using ``prop unlock``
before they can be written to.

.. include:: ../../build/client/props/doc/tx.rst

Telemetry Group
---------------

Telemetry values are stored in the ``tm`` group and updated once every second.
The group does not support storage.

.. include:: ../../build/client/props/doc/tm.rst

.. _gse_properties:

GSE Group
---------

Parameters that control the GSE encapsulator are stored in the ``gse`` group.

.. include:: ../../build/client/props/doc/gse.rst

.. _idle_properties:

Idle BBFRAME Generator Group
----------------------------

Parameters that control the idle BBFRAME generator are stored in the ``idle`` group.

.. include:: ../../build/client/props/doc/idle.rst
