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
6411e517
Commit
6411e517
authored
Sep 09, 2015
by
Lucas Russo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
examples/rffe_ctl.c: add temperature reading
parent
da3c9ad1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
1 deletion
+39
-1
rffe_ctl.c
examples/rffe_ctl.c
+39
-1
No files found.
examples/rffe_ctl.c
View file @
6411e517
...
...
@@ -96,6 +96,7 @@ typedef struct _func_call_t {
int
main
(
int
argc
,
char
*
argv
[])
{
int
verbose
=
0
;
bpm_client_err_e
err
=
BPM_CLIENT_SUCCESS
;
char
*
broker_endp
=
NULL
;
char
*
board_number_str
=
NULL
;
char
*
bpm_number_str
=
NULL
;
...
...
@@ -226,7 +227,7 @@ int main (int argc, char *argv [])
if
(
func_call
[
i
].
call
==
1
)
{
fprintf
(
stdout
,
"[client:rffe_ctl]: Calling function #%d
\n
"
,
i
);
fprintf
(
stdout
,
"[client:rffe_ctl]: Argument: %f
\n
"
,
strtod
(
*
func_call
[
i
].
arg
,
NULL
));
bpm_client_err_e
err
=
bpm_rffe_funcs
[
i
]
err
=
bpm_rffe_funcs
[
i
]
(
bpm_client
,
service
,
strtod
(
*
func_call
[
i
].
arg
,
NULL
));
if
(
err
!=
BPM_CLIENT_SUCCESS
)
{
...
...
@@ -236,6 +237,43 @@ int main (int argc, char *argv [])
}
}
double
temp
;
err
=
bpm_get_rffe_temp1
(
bpm_client
,
service
,
&
temp
);
if
(
err
!=
BPM_CLIENT_SUCCESS
)
{
fprintf
(
stderr
,
"[client:rffe_ctl]: Error executing remote "
"function: %s
\n
"
,
bpm_client_err_str
(
err
));
}
fprintf
(
stdout
,
"[client:rffe_ctl]: Temp1: %f
\n
"
,
temp
);
err
=
bpm_get_rffe_temp2
(
bpm_client
,
service
,
&
temp
);
if
(
err
!=
BPM_CLIENT_SUCCESS
)
{
fprintf
(
stderr
,
"[client:rffe_ctl]: Error executing remote "
"function: %s
\n
"
,
bpm_client_err_str
(
err
));
}
fprintf
(
stdout
,
"[client:rffe_ctl]: Temp2: %f
\n
"
,
temp
);
err
=
bpm_get_rffe_temp3
(
bpm_client
,
service
,
&
temp
);
if
(
err
!=
BPM_CLIENT_SUCCESS
)
{
fprintf
(
stderr
,
"[client:rffe_ctl]: Error executing remote "
"function: %s
\n
"
,
bpm_client_err_str
(
err
));
}
fprintf
(
stdout
,
"[client:rffe_ctl]: Temp3: %f
\n
"
,
temp
);
err
=
bpm_get_rffe_temp4
(
bpm_client
,
service
,
&
temp
);
if
(
err
!=
BPM_CLIENT_SUCCESS
)
{
fprintf
(
stderr
,
"[client:rffe_ctl]: Error executing remote "
"function: %s
\n
"
,
bpm_client_err_str
(
err
));
}
fprintf
(
stdout
,
"[client:rffe_ctl]: Temp4: %f
\n
"
,
temp
);
double
att
;
err
=
bpm_get_rffe_att1
(
bpm_client
,
service
,
&
att
);
if
(
err
!=
BPM_CLIENT_SUCCESS
)
{
fprintf
(
stderr
,
"[client:rffe_ctl]: Error executing remote "
"function: %s
\n
"
,
bpm_client_err_str
(
err
));
}
fprintf
(
stdout
,
"[client:rffe_ctl]: Att1: %f
\n
"
,
att
);
err_bpm_client_new:
bpm_client_destroy
(
&
bpm_client
);
...
...
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