Commit ddbe8dc0 authored by Romolo Politi's avatar Romolo Politi
Browse files

fixed the type of an element in the DB

parent 26976488
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
Verison 0.4.1
* fixed a data type in the database

Version 0.4.0
* the fields of the subobject are now dict type.
* improved prefomace
+9 −2
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@

SCOSpy is a python library for the Satellite Control and Operation System 2000 (SCOS-2000) header written as hexadecimal string.

Current version is 0.4.0
Current version is 0.4.1

## Library Installation
```bash
@@ -35,12 +35,16 @@ The SCOS object contain:

* [**Common Packet Header Structure (CPH)**](#common-packet-header-structure-chp)

and one of the following sub-object:
one of the following sub-object:

* [**Telemetry Packet Header (TMPH)**](#telemetry-packet-header-tmph)
* [**Telecommand Packet Header (TCPH)**](#telecommand-packet-header-tcph)
* [**Event Packet Header (EPH)**](#event-packet-header-eph) (not implemented)

and the attribute 

* **data** with the data in the packet as hex string

Many of the entries of the objects are dictionary. Usually the structure is the following: *{'id': x, 'description': 'blablabla'}* ad is reported in the tables.

### Common Packet Header Structure (CHP)
@@ -219,6 +223,9 @@ If the _**CHP.PType**_ is equal to 3, the packet is a event. In this case is pre

## Change Log

### Version 0.4.1
+ fixed a data type in te database

### Version 0.4.0
+ the fields of the subobject are now dict type.
+ improved prefomace
+17 −17
Original line number Diff line number Diff line
@@ -77,22 +77,22 @@ DataUnitType = {
    2: {'id': 2, 'description': "Internal MCS TM Packet"},
}
Qualifier = {
    0: {'id': 0, 'description': "Good"},
    1: {'id': 1, 'description': "Good"},
    2: {'id': 2, 'description': "CLCW"},
    10: {'id': 10, 'description': "Bad"},
    11: {'id': 11, 'description': "Bad"},
    12: {'id': 12, 'description': "User Defined Constant"},
    20: {'id': 20, 'description': "Idle"},
    21: {'id': 21, 'description': "Idle"},
    22: {'id': 22, 'description': "Status Consistency Check"},
    32: {'id': 32, 'description': "Dynamic Misc"},
    42: {'id': 42, 'description': "Online MIB changes"},
    52: {'id': 52, 'description': "SPPG"},
    62: {'id': 62, 'description': "SPID Validity"},
    72: {'id': 72, 'description': "TPKT Configuration"},
    82: {'id': 82, 'description': "External Source"},
},
    '0' : {'id': 0, 'description': "Good"},
    '1' : {'id': 1, 'description': "Good"},
    '2' : {'id': 2, 'description': "CLCW"},
    '10': {'id': 10, 'description': "Bad"},
    '11': {'id': 11, 'description': "Bad"},
    '12': {'id': 12, 'description': "User Defined Constant"},
    '20': {'id': 20, 'description': "Idle"},
    '21': {'id': 21, 'description': "Idle"},
    '22': {'id': 22, 'description': "Status Consistency Check"},
    '32': {'id': 32, 'description': "Dynamic Misc"},
    '42': {'id': 42, 'description': "Online MIB changes"},
    '52': {'id': 52, 'description': "SPPG"},
    '62': {'id': 62, 'description': "SPID Validity"},
    '72': {'id': 72, 'description': "TPKT Configuration"},
    '82': {'id': 82, 'description': "External Source"},
}



@@ -186,7 +186,7 @@ class SCOS_TMPH:
        # 7: PUS Service, 8: PUS SubService
        dp= BitStream(hex=data).unpack(2*'uint:32,'+'uint:8,'+2*'uint:4,'+2*'uint:16,'+2*'uint:8,')
        self.TPSD=dp[1]
        self.RouteID={'Data Unit Type' : DataUnitType[dp[3]], 'Qualifier' : Qualifier[dp[4]]} #RouteID(data[16:20])
        self.RouteID={'Data Unit Type' : DataUnitType[dp[3]], 'Qualifier' : Qualifier[str(dp[4])]} #RouteID(data[16:20])
        self.PUSAPID=dp[5]
        self.PUSSSC=dp[6] 
        self.PUSService=dp[7]