Example #1
0
from parsec import count

from base import pid, label_as
from parsing import byte

CameraSyncCount = pid(0x37) >> byte
CameraSyncCount >>= label_as('Camera Sync Count')
Example #2
0
from base import uint16, count, label_as, pid, to_dict, field, joint

Photodiodes = pid(0x33) >> joint(
    field('Xn', uint16),
    field('Xp', uint16),
    field('Yn', uint16),
    field('Yp', uint16),
).bind(to_dict)
Photodiodes >>= label_as('Photodiodes')
Example #3
0
from base import uint16, count, label_as, pid, to_dict, field, joint

AllTemperatures = pid(0x32) >> joint(
    field('Supply', uint16),
    field('Xn', uint16),
    field('Xp', uint16),
    field('Yn', uint16),
    field('Yp', uint16),
    field('SADS', uint16),
    field('Sail', uint16),
    field('Camera Nadir', uint16),
    field('Camera Wing', uint16),
).bind(to_dict)
AllTemperatures >>= label_as('Temperatures')

SupplySADSTemperatures = pid(0x17) >> joint(
    field('Supply', uint16),
    field('SADS', uint16)
).bind(to_dict)
SupplySADSTemperatures >>= label_as('Temperatures Supply & SADS')

SADSTemperature = pid(0x41) >> uint16
SADSTemperature >>= label_as('SADS Temperature')
Example #4
0
from parsec import count, joint

from base import pid, label_as, field, to_dict
from parsing import byte, uint16
from parsec import Parser, Value

from emulator.beacon_parser import eps_controller_a_telemetry_parser, eps_controller_b_telemetry_parser, \
    error_counting_telemetry, experiment_telemetry_parser, mcu_temperature_parser
from emulator.beacon_parser.parser import BitArrayParser

from math import ceil

PayloadWhoAmI = pid(0x30) >> count(byte, 1)
PayloadWhoAmI >>= label_as('Payload Who Am I')

PayloadHousekeeping = pid(0x34) >> joint(
    field('INT 3V3D', uint16),
    field('OBC 3V3D', uint16),
).bind(to_dict)
PayloadHousekeeping >>= label_as('Payload Housekeeping')

##########################################################################


class PayloadOBCTelemetryParser:
    def __init__(self):
        self.storage = {}

    def write(self, category, name, value):
        if category not in self.storage.keys():
            self.storage[category] = {}
Example #5
0
from parsec import count

from base import pid, label_as
from parsing import int32, int16

Magnetometer = pid(0x19) >> count(int32, 3)
Magnetometer >>= label_as('Magnetometer')

Dipoles = pid(0x20) >> count(int16, 3)
Dipoles >>= label_as('Dipoles')