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
b0d95efd
Commit
b0d95efd
authored
Jun 12, 2015
by
Lucas Russo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
{include/,src/dev_io}/dev_io_core.*: add ID in DEVIO structure
parent
38a1265b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
dev_io_core.h
include/dev_io_core.h
+1
-1
dev_io_core.c
src/dev_io/dev_io_core.c
+9
-2
No files found.
include/dev_io_core.h
View file @
b0d95efd
...
...
@@ -40,7 +40,7 @@ typedef struct {
/***************** Our methods *****************/
/* Creates a new instance of Device Information */
devio_t
*
devio_new
(
char
*
name
,
char
*
endpoint_dev
,
devio_t
*
devio_new
(
char
*
name
,
uint32_t
id
,
char
*
endpoint_dev
,
llio_type_e
type
,
char
*
endpoint_broker
,
int
verbose
,
const
char
*
log_file_name
);
/* Destroy an instance of the Device Information */
...
...
src/dev_io/dev_io_core.c
View file @
b0d95efd
...
...
@@ -49,6 +49,7 @@ struct _devio_t {
zpoller_t
*
poller_config
;
/* Poller structure to multiplex config threads messages*/
unsigned
int
nnodes
;
/* Number of actual nodes */
char
*
name
;
/* Identification of this worker instance */
uint32_t
id
;
/* ID number of this instance */
char
*
log_file
;
/* Log filename for tracing and debugging */
char
*
endpoint_broker
;
/* Broker location to connect to */
int
verbose
;
/* Print activity to stdout */
...
...
@@ -88,8 +89,9 @@ static devio_err_e _devio_destroy_smio (devio_t *self, zhash_t *smio_h, const ch
static
devio_err_e
_devio_destroy_smio_all
(
devio_t
*
self
,
zhash_t
*
smio_h
);
/* Creates a new instance of Device Information */
devio_t
*
devio_new
(
char
*
name
,
char
*
endpoint_dev
,
llio_type_e
type
,
char
*
endpoint_broker
,
int
verbose
,
const
char
*
log_file_name
)
devio_t
*
devio_new
(
char
*
name
,
uint32_t
id
,
char
*
endpoint_dev
,
llio_type_e
type
,
char
*
endpoint_broker
,
int
verbose
,
const
char
*
log_file_name
)
{
assert
(
name
);
assert
(
endpoint_dev
);
...
...
@@ -136,6 +138,11 @@ devio_t * devio_new (char *name, char *endpoint_dev, llio_type_e type,
/* Setup strings/options */
self
->
name
=
strdup
(
name
);
ASSERT_ALLOC
(
self
->
name
,
err_name_alloc
);
/* Setup ID number */
self
->
id
=
id
;
/* Setup Broker endpoint */
self
->
endpoint_broker
=
strdup
(
endpoint_broker
);
ASSERT_ALLOC
(
self
->
endpoint_broker
,
err_endp_broker_alloc
);
self
->
verbose
=
verbose
;
...
...
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