Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
Beam Positoning Monitor - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Beam Positoning Monitor - Software
Commits
b442b6c3
Commit
b442b6c3
authored
Feb 23, 2016
by
Lucas Russo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libs/libhutils/*: add support for "fmc_board" parameter
parent
b56ae507
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
hutils_utils.h
src/libs/libhutils/include/hutils_utils.h
+1
-0
hutils_utils.c
src/libs/libhutils/src/hutils_utils.c
+14
-0
No files found.
src/libs/libhutils/include/hutils_utils.h
View file @
b442b6c3
...
...
@@ -34,6 +34,7 @@ extern "C" {
typedef
struct
{
char
*
bind
;
/* AFE Endpoint address to bind to */
char
*
fmc_board
;
/* FMC board type */
bool
spawn_epics_ioc
;
/* DBE IOC spawn selection */
}
hutils_hints_t
;
...
...
src/libs/libhutils/src/hutils_utils.c
View file @
b442b6c3
...
...
@@ -391,6 +391,17 @@ hutils_err_e hutils_get_hints (zconfig_t *root_cfg, zhashx_t *hints_h)
item
=
(
hutils_hints_t
*
)
zmalloc
(
sizeof
*
item
);
ASSERT_ALLOC
(
item
,
err_hash_item_alloc
,
HUTILS_ERR_ALLOC
);
/* We expect to the FMC board type of this bpm/board instance
* in the configuration file */
char
*
fmc_board
=
zconfig_resolve
(
bpm_cfg
,
"/dbe/fmc_board"
,
NULL
);
ASSERT_TEST
(
fmc_board
!=
NULL
,
"[hutils:utils] Could not find "
"FMC Board type (fmc_board = <value>) in configuration file"
,
err_fmc_board
,
HUTILS_ERR_CFG
);
item
->
fmc_board
=
strdup
(
fmc_board
);
ASSERT_ALLOC
(
item
->
fmc_board
,
err_hash_fmc_board
,
HUTILS_ERR_ALLOC
);
/* Now, we expect to find the bind address of this bpm/board instance
* in the configuration file */
char
*
afe_bind
=
zconfig_resolve
(
bpm_cfg
,
"/afe/bind"
,
...
...
@@ -457,6 +468,9 @@ err_spawn_epics_ioc:
free
(
item
->
bind
);
err_hash_bind_alloc:
err_afe_bind:
free
(
item
->
fmc_board
);
err_hash_fmc_board:
err_fmc_board:
free
(
item
);
err_hash_item_alloc:
err_cfg_exit:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment