My Project
configurationInfo.h
1 /*************************************************************************\
2 * Copyright (c) 2015 Paul Scherrer Institute (PSI), Villigen, Switzerland
3 * mrfioc2 is distributed subject to a Software License Agreement found
4 * in file LICENSE that is included with this distribution.
5 \*************************************************************************/
6 #ifndef CONFIGURATIONINFO_H
7 #define CONFIGURATIONINFO_H
8 
9 #include <devLibPCI.h>
10 
11 //VME
12 struct configuration_vme{
13  epicsInt32 slot; // slot where the card is inserted
14  epicsUInt32 address; // VME address in A24 space
15  epicsInt32 irqLevel; // interupt level
16  epicsInt32 irqVector; // interrupt vector
17  std::string position; // position description for EVR
18 };
19 
20 
21 // PCI
22 struct configuration_pci{
23  const epicsPCIDevice *dev;
24  configuration_pci()
25  :dev(0)
26  {}
27 };
28 
29 enum busType{
30  busType_vme = 0,
31  busType_pci = 1
32 };
33 
34 struct bus_configuration{
35  struct configuration_vme vme;
36  struct configuration_pci pci;
37  enum busType busType;
38 };
39 
40 // form factor corresponds to FPGA Firmware Version Register bit 26-24
41 enum formFactor {
42  formFactor_unknown = -1,
43  formFactor_CPCI=0, // 3U
44  formFactor_PMC=1,
45  formFactor_VME64=2,
46  formFactor_CRIO=3,
47  formFactor_CPCIFULL=4, // 6U
48  formFactor_PXIe=6,
49  formFactor_PCIe=7,
50  formFactor_mTCA=8,
51 };
52 
53 #endif // CONFIGURATIONINFO_H