from parsec import count from base import pid, label_as from parsing import byte CameraSyncCount = pid(0x37) >> byte CameraSyncCount >>= label_as('Camera Sync Count')
from base import pid from parsing import * from parsec import joint Gyro = pid(0x10) >> \ joint( field('X', int16), field('Y', int16), field('Z', int16), field('Temperature', int16) ).bind(to_dict) Gyro >>= label_as('Gyro')
from parsec import joint from base import pid, count from parsing import * RadFET = pid(0x35) >> joint(field('Status', byte), field( 'Temperature', uint32), field('Voltages', count(uint32, 3))).bind(to_dict) RadFET >>= label_as('RadFET')
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')
) ExperimentalSunSStatus >>= to_dict SingleALS = count(uint16, 4) ALSs = count(SingleALS, 3) Temperatures = joint( field('Structure', uint16), field('A', uint16), field('B', uint16), field('C', uint16), field('D', uint16), ).bind(to_dict) ExperimentalSunSPrimary = pid(0x11) \ >> joint( field('WhoAmI ', byte), field('Status', ExperimentalSunSStatus), field('VisibleLight', ALSs), field('Temperatures', Temperatures), ).bind(to_dict) ExperimentalSunSPrimary >>= label_as('ExpSunS.Primary') ExperimentalSunSSecondary = pid(0x12) \ >> joint( field('Parameters', joint( field('gain', byte), field('itime', byte) ).bind(to_dict)
from base import pid from parsing import * from parsec import joint Sail = pid(0x18) >> \ joint( field('Temperature', uint16), field('Open', boolean) ).bind(to_dict) Sail >>= label_as('Sail')
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] = {}
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')
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')