Add PRV_NEXT flag to auto-increment the channel value
This commit is contained in:
parent
1b30d5989c
commit
b1e3cf7403
@ -108,6 +108,9 @@ emit(struct prv *prv, struct prv_chan *rchan)
|
||||
switch (value.type) {
|
||||
case VALUE_INT64:
|
||||
val = value.i;
|
||||
if (rchan->flags & PRV_NEXT)
|
||||
val++;
|
||||
|
||||
//if (val == 0) {
|
||||
// err("forbidden value 0 in %s: %s\n",
|
||||
// chan->name,
|
||||
|
@ -12,7 +12,8 @@
|
||||
struct prv;
|
||||
|
||||
enum prv_flags {
|
||||
PRV_DUP = 1,
|
||||
PRV_DUP = 1<<0,
|
||||
PRV_NEXT = 1<<1, /* Add one to the channel value */
|
||||
};
|
||||
|
||||
struct prv_chan {
|
||||
|
Loading…
Reference in New Issue
Block a user