-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
99 lines (70 loc) · 3.27 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#==============================================================
#
# Name: README
#
# Rem:
# EPICS Driver
#
# Side: None
#
# Auth: March 21, Kukhee Kim (KHKIM)
# Rev: dd-mmm-yyyy, Reviewer's Name (USERNAME)
#--------------------------------------------------------------
# Mod:
# dd-mmm-yyyy, Reviewer's Name (USERNAME)
# coment
#
#==============================================================
#
PURPOSE
The yamlLoader is an epics driver for the follwing purpose:
1. Load hierarchy description yaml files
2. Load register configuration yaml files
3. Dump register configuration to yaml files
BUILD
The yamlLoader driver work with CPSW framework.
It it requires the following API layers.
cpsw/framework
yaml-cpp
boost
For building apllication, Makefile should include the following DBD file.
<your_application_name>_DBD += yamlLoader.dbd
In source code, the yamlLoader driver provides "cpswGetRoot()" API
to provide the root path for hierarchy.
ex) #include <yamlLoader.h>
Application_init_with_rootPath(cpswGetRoot());
USAGE for LOAD HIERARCHY
cpswLoadYamlFile 'YAML hierarchy descrtiption file'
'Root Device Name (optional; default = 'root')'
'directory where YAML includes can be found (optional)'
'IP address for carrier board (orverride the IP address in YAML)'
ex)
cd yamlConfig_0x000C ; change directory to a proper location
cpswLoadYamlFile("000TopLevel.yaml", "NetIODev", "", "10.0.3.105") ; root is NetIODe and override IP address to 10.0.3.105
USAGE for LOAD CONFIG
cpswLoadConfigFile 'CONFIG YAML file (NOT hierarchy YAML!)'
'Path prefix (if config YAML is not based of the root device; optional)'
'directory where YAML includes can be found (optional)'
ex)
cd ("${IOC_DATA}/vioc-b84-ev01/yamlConfig")
cpswLoadConfigFile("configDump.yaml", "mmio/AmcCarrierTimingGenerator/ApplicationCore/AmcGenericAdcDacCore", "")
USAGE for DUMP CONFIG
cpswDumpConfigFile 'DUMP YAML file (NOT hierarch YAML!)'
'Path prefix (if dump YAML is not based of the root device; optional)'
'directory where will be the DUMP YAML located (optional)'
ex)
cd ("${IOC_DATA}/vioc-b84-ev01/yamlConfig")
cpswDumpConfigFile("dump.yaml", "mmio/AmcCarrierTimingGenerator/ApplicationCore/AmcGenericAdcDacCore" , "")
USAGE for MULTIPLE BLADE IN A SINGLE IOC
There are additional argument to describe "named_root" which is an identifier for multiple root.
ex)
cd ${YAML_DIR0}
cpswLoadYamlFile("000TopLevel.yaml", "NetIODev", "", "10.0.3.102", "root_slot2")
cd ${YAML_DIR1}
cpswLoadYamlFile("000TopLevel.yaml", "NetIODev", "", "10.0.3.103", "root_slot3")
cd ${YAML_DIR2}
cpswLoadYamlFile("000TopLevel.yaml", "NetIODev", "", "10.0.3.104", "root_slot4")
Application driver can get root path with the following API calls
Path root = cpswGetRoot(); # root path from very last cpswLoadYamlFile() command, in this exampl, it should give root path for "root_slot4"
Path root = cpswGetNamedRoot("root_slot3") # gives root path for "root_slot3"
char *named_root = cpswGetRootName(); # gives root name for very last cpswLoadYamlFile() command, in this example, it should return a string "root_slot4"