.. index:: single: ccsds_tc_frames(FrameLength,SegmentHeaderLength,HasFECF)
.. _ccsds_tc_frames/3:

.. rst-class:: right

**object**

``ccsds_tc_frames(FrameLength,SegmentHeaderLength,HasFECF)``
============================================================

* ``FrameLength`` - Fixed telecommand transfer frame length in octets.
* ``SegmentHeaderLength`` - Length in octets of the optional segment header when present.
* ``HasFECF`` - Boolean indicating if frames include the frame error control field.


CCSDS telecommand transfer frame parser and generator.

| **Availability:** 
|    ``logtalk_load(ccsds_frames(loader))``

| **Author:** Paulo Moura
| **Version:** 1:0:2
| **Date:** 2026-06-24

| **Compilation flags:**
|    ``static, context_switching_calls``


| **Implements:**
|    ``public`` :ref:`ccsds_frame_protocol <ccsds_frame_protocol/0>`
| **Uses:**
|    :ref:`list <list/0>`
|    :ref:`reader <reader/0>`
|    :ref:`type <type/0>`

| **Remarks:**
|    (none)

| **Inherited public predicates:**
|     :ref:`ccsds_frame_protocol/0::data_field/2`  :ref:`ccsds_frame_protocol/0::fecf/2`  :ref:`ccsds_frame_protocol/0::frame_type/2`  :ref:`ccsds_frame_protocol/0::generate/2`  :ref:`ccsds_frame_protocol/0::generate/3`  :ref:`ccsds_frame_protocol/0::ocf/2`  :ref:`ccsds_frame_protocol/0::parse/2`  :ref:`ccsds_frame_protocol/0::spacecraft_id/2`  :ref:`ccsds_frame_protocol/0::valid/1`  :ref:`ccsds_frame_protocol/0::version/2`  :ref:`ccsds_frame_protocol/0::virtual_channel_id/2`  

.. contents::
   :local:
   :backlinks: top

Public predicates
-----------------

.. index:: bypass_flag/2
.. _ccsds_tc_frames/3::bypass_flag/2:

``bypass_flag/2``
^^^^^^^^^^^^^^^^^

Extracts the bypass flag value.

| **Compilation flags:**
|    ``static``

| **Template:**
|    ``bypass_flag(Frame,Flag)``
| **Mode and number of proofs:**
|    ``bypass_flag(+compound,-integer)`` - ``one``


------------

.. index:: control_command_flag/2
.. _ccsds_tc_frames/3::control_command_flag/2:

``control_command_flag/2``
^^^^^^^^^^^^^^^^^^^^^^^^^^

Extracts the control command flag value.

| **Compilation flags:**
|    ``static``

| **Template:**
|    ``control_command_flag(Frame,Flag)``
| **Mode and number of proofs:**
|    ``control_command_flag(+compound,-integer)`` - ``one``


------------

.. index:: sequence_number/2
.. _ccsds_tc_frames/3::sequence_number/2:

``sequence_number/2``
^^^^^^^^^^^^^^^^^^^^^

Extracts the frame sequence number.

| **Compilation flags:**
|    ``static``

| **Template:**
|    ``sequence_number(Frame,SequenceNumber)``
| **Mode and number of proofs:**
|    ``sequence_number(+compound,-integer)`` - ``one``


------------

.. index:: segment_header/2
.. _ccsds_tc_frames/3::segment_header/2:

``segment_header/2``
^^^^^^^^^^^^^^^^^^^^

Extracts the optional segment header. Returns ``none`` when absent.

| **Compilation flags:**
|    ``static``

| **Template:**
|    ``segment_header(Frame,SegmentHeader)``
| **Mode and number of proofs:**
|    ``segment_header(+compound,-compound)`` - ``one``


------------

.. index:: update_fecf/2
.. _ccsds_tc_frames/3::update_fecf/2:

``update_fecf/2``
^^^^^^^^^^^^^^^^^

Computes the correct telecommand transfer frame FECF for the selected object configuration and returns the corresponding updated frame term.

| **Compilation flags:**
|    ``static``

| **Template:**
|    ``update_fecf(Frame,UpdatedFrame)``
| **Mode and number of proofs:**
|    ``update_fecf(+compound,-compound)`` - ``one_or_error``

| **Exceptions:**
|    ``Frame`` is a variable:
|        ``instantiation_error``
|    ``Frame`` is neither a variable nor a valid telecommand transfer frame term:
|        ``domain_error(ccsds_frame_term,Frame)``


------------

.. index:: verify_fecf/1
.. _ccsds_tc_frames/3::verify_fecf/1:

``verify_fecf/1``
^^^^^^^^^^^^^^^^^

True if the telecommand transfer frame term contains the correct FECF for the selected object configuration.

| **Compilation flags:**
|    ``static``

| **Template:**
|    ``verify_fecf(Frame)``
| **Mode and number of proofs:**
|    ``verify_fecf(@compound)`` - ``zero_or_one``


------------

Protected predicates
--------------------

(no local declarations; see entity ancestors if any)

Private predicates
------------------

(no local declarations; see entity ancestors if any)

Operators
---------

(none)

