rewrite.lib.common package

Submodules

rewrite.lib.common.CountRecord module

class rewrite.lib.common.CountRecord.CountRecord(msg)[source]

Bases: object

Holds the counting information

incoming format: DS S0=00000000 S1=00000000 S2=00000000 S3=00000000 S4=00000000 S5=18531FFD

Parameters:
  • (Bool) (valid) – validity of the record. Will be set to True if the message starts with ‘DS’
  • (int) (counts_trigger) – Counts in channel X
  • (int) – trigger counts recieved
  • (Real) (counts_time) – the time of the record

rewrite.lib.common.DataRecord module

class rewrite.lib.common.DataRecord.DataRecord(msg)[source]

Bases: object

Record to hold a DataRecords from the DAQ card. Basically just a string wrapper.

msg = ''

rewrite.lib.common.PressureRecord module

class rewrite.lib.common.PressureRecord.PressureRecord(msg)[source]

Bases: object

Holds Pressure information

incoming format: ‘BA 1495’ or: “mBar now reads = 1015.0 (use cmd ‘SA’ when done)”

Parameters:
  • (Bool) (valid) – Validity of the record. Set to True, if the message starts with ‘BA’
  • (Real) (pressure) – Floating point value of in the pressure record
  • (PressureType) (pressure_type) – Either mBar or plain data
class rewrite.lib.common.PressureRecord.PressureType[source]

Bases: enum.Enum

Type of measured pressure. Plaindata or mBar

MBAR = 1
PLAIN = 0

rewrite.lib.common.Record module

class rewrite.lib.common.Record.Record(packageNumber, RecType, timestamp, payload)[source]

Bases: object

The basic data-structure used to communicate between DAQ and analysis

VERY EARLY STAGE! Everything is subject to change!

Parameters:
  • packageNumber – A sequential number of all packages send by a DAQ server
  • RecType – Type of the record
  • timestamp – Unixtimestamp
  • payload – Payload to be send
class rewrite.lib.common.Record.RecordType[source]

Bases: enum.IntEnum

Enum of the possible types of Records between DAQ and analysis. Enum for “type-safety”

CONTROL = 0
COUNTER = 4
DATA = 1
GPS = 5
PRESSURE = 3
TEMPERATURE = 2

rewrite.lib.common.TemperatureRecord module

class rewrite.lib.common.TemperatureRecord.TemperatureRecord(msg)[source]

Bases: object

Holds Temperature information

incoming format: TH TH=22.2

Parameters:
  • (Bool) (valid) – Validity of the record. Set to True, if the message starts with ‘TH’
  • (Real) (temperature) – The temperature of the record.

Module contents