gondola.packets#

Packets are containers for the different data structures which allow (de)serialization, so that they can be written to disk or sent over the network. There are 2 main types of packets within GAPS: - TofPackets (which are used internally by the TOF and are written to the TOF disks) - TelemetryPackets which are sent to ground

Each packet typically has methods for (de)serialization, for that see the respective from_bytestream methods

Classes

TelemetryPacket()

A wrapper for packets from the telemetry stream

TelemetryPacketHeader()

This gets attached to each telemetry packet "in front" of it, conveying meta information

TelemetryPacketType

Describe the contents of a byte sequence ("packet") typicially crafted for telemetry.

TofPacket()

Internal Tof communication protocol.

TofPacketType

Types of serializable data structures used throughout the TOF system.

class gondola.packets.TelemetryPacket#

A wrapper for packets from the telemetry stream

This is very compact and mostly used as an intermediary

static from_bytestream(stream, pos)#
header#
is_event_packet()#

Check if this is either any of the different merged event types

packet_type#
payload#

Get a zero copy view of the payload Might be mostly useful for debugging purposes

to_bytestream()#
class gondola.packets.TelemetryPacketHeader#

This gets attached to each telemetry packet "in front" of it, conveying meta information

checksum#
counter#
gcutime#
length#
packet_type#
timestamp#
class gondola.packets.TelemetryPacketType#

Describe the contents of a byte sequence ("packet") typicially crafted for telemetry. The numbers are defined by the 'bfsw' software package.

Ack = TelemetryPacketType.Ack#
AnyTofHK = TelemetryPacketType.AnyTofHK#
AnyTrackerHK = TelemetryPacketType.AnyTrackerHK#
BoringEvent = TelemetryPacketType.BoringEvent#
CardHKP = TelemetryPacketType.CardHKP#
CoolingHK = TelemetryPacketType.CoolingHK#
DecimationSettings = TelemetryPacketType.DecimationSettings#
GPS = TelemetryPacketType.GPS#
GcuEvtBldSettings = TelemetryPacketType.GcuEvtBldSettings#
GcuEvtBuilderStats = TelemetryPacketType.GcuEvtBuilderStats#
GcuMon = TelemetryPacketType.GcuMon#
GcuMonHKAddendum = TelemetryPacketType.GcuMonHKAddendum#
HeatHVLVSettings = TelemetryPacketType.HeatHVLVSettings#
InterestingEvent = TelemetryPacketType.InterestingEvent#
LabJackHK = TelemetryPacketType.LabJackHK#
LabjackSettings = TelemetryPacketType.LabjackSettings#
MagHK = TelemetryPacketType.MagHK#
NoGapsTriggerEvent = TelemetryPacketType.NoGapsTriggerEvent#
NoTofDataEvent = TelemetryPacketType.NoTofDataEvent#
PDUHK = TelemetryPacketType.PDUHK#
PacketStats = TelemetryPacketType.PacketStats#
RBWaveform = TelemetryPacketType.RBWaveform#
RPiHKP = TelemetryPacketType.RPiHKP#
RatePacket = TelemetryPacketType.RatePacket#
SurvivalPacket = TelemetryPacketType.SurvivalPacket#
TeleMainSettings = TelemetryPacketType.TeleMainSettings#
TmP214 = TelemetryPacketType.TmP214#
TmP33 = TelemetryPacketType.TmP33#
TmP34 = TelemetryPacketType.TmP34#
TmP37 = TelemetryPacketType.TmP37#
TmP38 = TelemetryPacketType.TmP38#
TmP55 = TelemetryPacketType.TmP55#
TmP64 = TelemetryPacketType.TmP64#
TmP96 = TelemetryPacketType.TmP96#
Tracker = TelemetryPacketType.Tracker#
TrackerDAQCntr = TelemetryPacketType.TrackerDAQCntr#
TrkTempLeak = TelemetryPacketType.TrkTempLeak#
Unknown = TelemetryPacketType.Unknown#
static from_u8(byte)#
class gondola.packets.TofPacket#

Internal Tof communication protocol. Simple, yet powerful

A TofPacket has the following layout on disk HEAD : u16 = 0xAAAA TYPE : u8 = PacketType SIZE : u32 PAYLOAD : [u8;6-SIZE] TAIL : u16 = 0x5555

The total packet size is thus 13 + SIZE

static from_bytestream(stream, start_pos)#

Factory function for TofPackets

# Arguments:

  • streambytes presumably representing

    a TofPacket

  • start_posthe assumed position of

    HEAD identifier in the bytestream (start of TofPacket)

get_paddle(paddle_id)#
packet_type#
payload#
to_bytestream()#
unpack()#
class gondola.packets.TofPacketType#

Types of serializable data structures used throughout the TOF system.

AnalysisEngineConfig = TofPacketType.AnalysisEngineConfig#
BfswAckPacket = TofPacketType.BfswAckPacket#
CPUMoniData = TofPacketType.CPUMoniData#
ConfigBinary = TofPacketType.ConfigBinary#
DataPublisherConfig = TofPacketType.DataPublisherConfig#
DataSinkHB = TofPacketType.DataSinkHB#
EventBuilderHB = TofPacketType.EventBuilderHB#
LTBMoniData = TofPacketType.LTBMoniData#
LTBThresholdConfig = TofPacketType.LTBThresholdConfig#
LiftofBinaryService = TofPacketType.LiftofBinaryService#
LiftofCCBinary = TofPacketType.LiftofCCBinary#
LiftofRBBinary = TofPacketType.LiftofRBBinary#
LiftofSettings = TofPacketType.LiftofSettings#
LiftofSettingsDiff = TofPacketType.LiftofSettingsDiff#
MasterTrigger = TofPacketType.MasterTrigger#
MasterTriggerHB = TofPacketType.MasterTriggerHB#
MtbMoniData = TofPacketType.MtbMoniData#
MultiPacket = TofPacketType.MultiPacket#
PAMoniData = TofPacketType.PAMoniData#
PBMoniData = TofPacketType.PBMoniData#
PanicPacket = TofPacketType.PanicPacket#
PreampBiasConfig = TofPacketType.PreampBiasConfig#
RBCalibration = TofPacketType.RBCalibration#
RBCalibrationFlightT = TofPacketType.RBCalibrationFlightT#
RBCalibrationFlightV = TofPacketType.RBCalibrationFlightV#
RBChannelMaskConfig = TofPacketType.RBChannelMaskConfig#
RBCommand = TofPacketType.RBCommand#
RBEvent = TofPacketType.RBEvent#
RBEventHeader = TofPacketType.RBEventHeader#
RBEventMemoryView = TofPacketType.RBEventMemoryView#
RBMoniData = TofPacketType.RBMoniData#
RBPing = TofPacketType.RBPing#
RBWaveform = TofPacketType.RBWaveform#
RunConfig = TofPacketType.RunConfig#
TOFEventBuilderConfig = TofPacketType.TOFEventBuilderConfig#
TofCommand = TofPacketType.TofCommand#
TofCommandV2 = TofPacketType.TofCommandV2#
TofDetectorStatus = TofPacketType.TofDetectorStatus#
TofEvent = TofPacketType.TofEvent#
TofEventDeprecated = TofPacketType.TofEventDeprecated#
TofRBConfig = TofPacketType.TofRBConfig#
TofResponse = TofPacketType.TofResponse#
TofRunConfig = TofPacketType.TofRunConfig#
TriggerConfig = TofPacketType.TriggerConfig#
Unknown = TofPacketType.Unknown#
static from_u8(byte)#