Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Trigger Distribution
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
White Rabbit Trigger Distribution
Commits
dcfc5a4f
Commit
dcfc5a4f
authored
Jul 05, 2019
by
Dimitris Lampridis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw: do not auto-increase rule and alarm count attributes
parent
d49642ed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
libwrtd-attributes.c
software/lib/libwrtd-attributes.c
+2
-2
libwrtd.h
software/lib/libwrtd.h
+5
-4
No files found.
software/lib/libwrtd-attributes.c
View file @
dcfc5a4f
...
...
@@ -366,7 +366,7 @@ enum wrtd_status wrtd_attr_set_alarm_repeat_count(struct wrtd_dev *wrtd,
status
=
wrtd_alarm_check_disabled
(
wrtd
,
idx
,
__func__
);
WRTD_RETURN_IF_ERROR
(
status
);
wrtd
->
alarms
[
idx
].
alarm
.
repeat_count
=
value
==
0
?
0
:
value
+
1
;
wrtd
->
alarms
[
idx
].
alarm
.
repeat_count
=
value
;
status
=
wrtd_write_alarm
(
wrtd
,
idx
,
__func__
);
WRTD_RETURN_IF_ERROR
(
status
);
...
...
@@ -407,7 +407,7 @@ enum wrtd_status wrtd_attr_set_rule_repeat_count(struct wrtd_dev *wrtd,
status
=
wrtd_rule_check_disabled
(
wrtd
,
idx
,
__func__
);
WRTD_RETURN_IF_ERROR
(
status
);
wrtd
->
rules
[
idx
].
rule
.
conf
.
repeat_count
=
value
==
0
?
0
:
value
+
1
;
wrtd
->
rules
[
idx
].
rule
.
conf
.
repeat_count
=
value
;
status
=
wrtd_write_rule
(
wrtd
,
idx
,
__func__
);
WRTD_RETURN_IF_ERROR
(
status
);
...
...
software/lib/libwrtd.h
View file @
dcfc5a4f
...
...
@@ -136,16 +136,17 @@ typedef enum wrtd_attr {
WRTD_ATTR_ALARM_PERIOD
=
__WRTD_ATTR_BASE
+
0x14
,
/** `RW` `int32` `alarm` Specifies the number of times an Alarm will occur at the
period specified by #WRTD_ATTR_ALARM_PERIOD, before becoming automatically disabled.
0 means infinite repetitions. When read, it returns the remaining repetitions. */
0 means infinite repetitions. 1 means that the alarm will occur only once.
When read, it returns the remaining repetitions. */
WRTD_ATTR_ALARM_REPEAT_COUNT
=
__WRTD_ATTR_BASE
+
0x15
,
/** `RO` `int32` `global` Number of defined Rules. */
WRTD_ATTR_RULE_COUNT
=
__WRTD_ATTR_BASE
+
0x20
,
/** `RW` `bool` `rule` Enable/disable a Rule. */
WRTD_ATTR_RULE_ENABLED
=
__WRTD_ATTR_BASE
+
0x21
,
/** `RW` `int32` `rule` Specifies the number of times a Rule will fire before
becoming automatically disabled. 0 means infinite. When read, it returns the
remaining repetitions. */
/** `RW` `int32` `rule` Specifies the number of times a Rule will fire before
becoming
automatically disabled. 0 means infinite. 1 means that the alarm will fire only once.
When read, it returns the
remaining repetitions. */
WRTD_ATTR_RULE_REPEAT_COUNT
=
__WRTD_ATTR_BASE
+
0x22
,
/** `RW` `string` `rule` Get/set Rule source. Rule sources can be:
- Local source Event IDs (in the form of **LCI-x**)
...
...
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