BPM Data Format

File Structure

6 bytes

size bytes

Packet Header

Packet Data Blocks

Packet Header

Packet Data Blocks

Packet Header

Packet Data Blocks

...

...

The file consists of packets. Each packet starts with header, contained packet data block type and its length of data with header and payload. Header specifies the type of data block and packet size.

Packet Header

offset

size, bytes

type

name

description

0

4

int

ID

block Type Id

4

4

int

size

packet size, bytes, including header

Packet Data Blocks

There are four types of data blocks:

  1. Main Block
  2. Device Description Block
  3. Start/Trigger Description Block
  4. Event Description Block

Main (Type Id: 1)

offset

size, bytes

type

name

description

0

4

uint

timeStamp

[32bit time_t] Event time in sec from 1 Jan 1970 (UTC)

4

8

double

BField_B0

BField_B0, Tesla

12

8

double

BField_step

BField_step, Tesla/step

20

8

double

BField_drift

BField_drift, Tesla/sec

28

4

uint

particleCharge

Particle charge

32

8

double

particleMass

Particle mass, eV

40

8

double

NuclotronCircumference

Closed orbit length, m

48

4

uint

NuclotronKf

RF harmonic number

52

8

double

NuclotronRho

...

60

4

int

master_id

Id of master box

64

4

uint

sampleSize

Sample size of adc

Start/Trigger Description (Type Id: 2)

offset

size, bytes

type

name

description

0

4

int

start

Type of start

4

4

int

trigger

Type of trigger

8

8*8

double[8]

array

Trigger array

If trigger type is 'B Field': trigger array contains values on which this should enabled. If trigger type is 'Time': trigger array contains time in ms on which this should enabled. If trigger type is 'Periodic': first value in trigger array contains periodic delay, second one period length, others are unused.

Device Description (Type Id: 3)

offset

size, bytes

type

name

description

0

4

uint

id

Device Id

4

4

uint

serial

Device serial number

8

8

double

temp

Temperature in C

16

8

double

clock

Clock tics over the last second

24

4

uint

firmware_ver

Firmware version

28

4

uint

firmware_rev

Firmware revision

32

4

uint

eventNumbers

Number of events from this box

36

8

long long

timestampLastNCU

Clock ticks at start acceleration period

44

8

long long

timestampLastKCU

Clock ticks at end acceleration period

Event Description (Type Id: 4)

offset

size, bytes

type

name

description

0

4

uint

deviceId

Device serial number

4

4

uint

eventNumber

Event number

8

8

double

clock

Device clock ticks at event

16

4

int

BFieldTicks

B field ticks at event

20

2*4*sampleSize

uint[]

adc

ADC


BPM Raw Event Format RawData Bpm4100

BPMDataFormat (last edited 2015-06-15 08:44:40 by filippov)