AFI Electronics
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

Navigation

  • FirstPage
  • ADC
  • TDC
  • Logical
  • Interfaces
  • Systems
  • Documentation
  • Contacts
  • PrivatePage
  • RecentChanges
PCI Digitizer, VME TDC, PCI VME Master, Data Acquisition System

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Comment

  • PnpRaw

Raw data protocol

byte offset

description

Block Header

0-3

Sync word (32-bit unsigned integer) 0x5F506E50 "_PnP"

4

Protocol version (Current/initial version: 1)

5

Message type

6-7

Block payload length: N bytes (16-bit unsigned integer)

Block Payload

8

Block payload

...

8+N-1

Message type:

  • PNPMessage_Type_Discover (0x1)
  • PNPMessage_Type_Close (0x2)
  • PNPMessage_Type_Search (0x3)

PNP TLV header structure by bits, MSB left

15

14

13

12

11

10

9

8

7

6

5

4

3

2

1

0

type

payload length

k_pnp_uuid

  • type: 0x01
  • length: 6 bytes
  • payload: UUID formatted according to RFC 4122

k_pnp_seq

  • type: 0x02
  • length: 4 bytes
  • payload: sequence number (counter) (32-bit unsigned integer)

k_pnp_host

  • type: 0x03
  • length: 4 bytes
  • payload: IPv4 adde

k_pnp_hostName

  • type: 0x04
  • length: 0- bytes
  • payload: ASCII string

k_pnp_verHash

  • type: 0x05
  • length: 0- bytes
  • payload: ASCII string

k_pnp_verDate

  • type: 0x06
  • length: 4 bytes
  • payload: datetime as a number of seconds after the start, in UTC, of the year 1970

k_pnp_clIndex

  • type: 0x07
  • length: xxx bytes
  • payload: client index

k_pnp_parClIndex

  • type: 0x08
  • length: xxx bytes
  • payload: client index of parent program (to determ ClIndex of DRE program for MStream sub-program)

k_pnp_options

  • type: 0x09
  • length: 0- bytes
  • payload: ASCII string, all key-value pairs joined with RS 0x1E record separator
  • example: <key1><RS><val1><RS><key2><RS><val2><RS><key3><RS><val3>

k_pnp_interfaces

  • type: 0x0a
  • length: 0- bytes
  • payload: series of PNP_RAW_INTERFACE blocks

PNP interface block

Block Header

byte offset

description

0

block payload length (bytes)

PNP interface payload

1

program_interface_mix (uint16_t union)

2

2

Rest of payload

...

8+N-1

PROGRAM_INTERFACE_MIX program_interface_mix structure by bits, MSB left

15

14

13

12

11

10

9

8

7

6

5

4

3

2

1

0

hostDiffer

isFree

en

type

id

unused

  • hostDiffer - if present interface work not from k_pnp_host but from another one
  • isFree - interface can accept a connection
  • en - interface is enabled
  • type - program interface type
    • 0x1: for remote control AFI Run Control protocol

    • 0x2: raw data output from DRE associated to single device (MStream)
    • 0x3: generic raw data output
    • 0x4: monitor raw data output (specific interface for Event builder)
  • id - interface identifier (by def is 0)

Device index block

byte offset

description

Header

0

payload length

Payload

1

DeviceId (uint8_t)

2-9

Device Serial (uint64_t)

10-

Rest payload for DeviceId string in ASCII