Skip to content

Command configuration issue for little endian #1020

@onurturhan

Description

@onurturhan

Describe the bug
We created a cosmos demo project for testing the command configuration. Here are the two
command configuration layout. Simply, these configurations are same but only they have different
endianness.

To Reproduce

  1. Create new cosmos demo project
  2. Update file demo/config/targets/EXAMPLE/cmd_tlm/example_cmd.txt as below:
COMMAND EXAMPLE TEST_CMD1 BIG_ENDIAN ""
  PARAMETER PARAM0 0 16 UINT 0 65535 0 "" BIG_ENDIAN
  PARAMETER PARAM1 16 5 UINT 0 31 31 ""   BIG_ENDIAN
  PARAMETER PARAM2 21 5 UINT 0 31 31 ""   BIG_ENDIAN
  PARAMETER PARAM3 26 1 UINT 0 1 1 ""     BIG_ENDIAN 
  PARAMETER PARAM4 27 5 UINT 0 31 31 ""   BIG_ENDIAN

COMMAND EXAMPLE TEST_CMD2 LITTLE_ENDIAN "" 
  PARAMETER PARAM0 0 16 UINT 0 65535 0 "" LITTLE_ENDIAN
  PARAMETER PARAM1 16 5 UINT 0 31 31 ""   LITTLE_ENDIAN
  PARAMETER PARAM2 21 5 UINT 0 31 31 ""   LITTLE_ENDIAN
  PARAMETER PARAM3 26 1 UINT 0 1 1 ""     LITTLE_ENDIAN
  PARAMETER PARAM4 27 5 UINT 0 31 31 ""   LITTLE_ENDIAN
  1. Reload Configuration
  2. Click "Cmd Packets" Tab of COSMOS Command and Telemetry Server Window
  3. For TEST_CMD1 & TEST_CMD2's click "View In Command Sender" and "View Raw" Tabs.
  4. Send both commands and observe the behaviour from the "Raw Command Packet" Screen.

TEST_CMD1 (BIG_ENDIAN) case seems working fine with default values in the configuration.
However, TEST_CMD2 (LITTLE_ENDIAN) case seems not working with default values.

TEST_CMD1 
Address   Data                                             Ascii
---------------------------------------------------------------------------
00000000: 00 00 FF FF    
TEST_CMD2
Address   Data                                             Ascii
---------------------------------------------------------------------------
00000000: 00 C0 FF 3F      

Expected behavior
TEST_CMD1 is working as expected ( 00 00 FF FF ).
TEST_CMD2 is not working as expected ( 00 00 FF FF ) but ( 00 C0 FF 3F ) as shown in 'View Raw' tab.

Environment :

  • Centos6 - x86
  • COSMOS 4.3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions