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) {
|
switch (value.type) {
|
||||||
case VALUE_INT64:
|
case VALUE_INT64:
|
||||||
val = value.i;
|
val = value.i;
|
||||||
|
if (rchan->flags & PRV_NEXT)
|
||||||
|
val++;
|
||||||
|
|
||||||
//if (val == 0) {
|
//if (val == 0) {
|
||||||
// err("forbidden value 0 in %s: %s\n",
|
// err("forbidden value 0 in %s: %s\n",
|
||||||
// chan->name,
|
// chan->name,
|
||||||
|
@ -12,7 +12,8 @@
|
|||||||
struct prv;
|
struct prv;
|
||||||
|
|
||||||
enum prv_flags {
|
enum prv_flags {
|
||||||
PRV_DUP = 1,
|
PRV_DUP = 1<<0,
|
||||||
|
PRV_NEXT = 1<<1, /* Add one to the channel value */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct prv_chan {
|
struct prv_chan {
|
||||||
|
Loading…
Reference in New Issue
Block a user