Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data drop / fifo overrun #28

Open
jdavidberger opened this issue Mar 12, 2017 · 5 comments
Open

data drop / fifo overrun #28

jdavidberger opened this issue Mar 12, 2017 · 5 comments

Comments

@jdavidberger
Copy link

Are there any plans to offer any thing like just latching in the last value on the ports, or somewhat equivalently, a FIFO that replaces the oldest value when it overflows?

Would be useful when you are processing data live. The specific use case I'm looking at is using it to prototype opencv filters.

@jonathan-beard
Copy link
Member

jonathan-beard commented Mar 12, 2017 via email

@jdavidberger
Copy link
Author

I looked into some of the code that was there and wasn't sure what the intention was for some of that.

Are you thinking this should be a run-time parameter you can set on the FIFO -- something like setOverflowBehavior -- or as a separate implementation type entirely put in the const_map for port_info?

@jonathan-beard
Copy link
Member

jonathan-beard commented Mar 12, 2017 via email

@jdavidberger
Copy link
Author

I checked out dev; seems like a lot is ifdef'ed out for the refactor so I couldn't trace through it while running.

It seems like overrun behavior should be settable on the port and not the kernel. So would the syntax look something like:

M += s["0"] >> raft::manip< raft::fifo::drop_overrun >::value >> l;

to set the fifo to drop overruns for s["0"]?

That seems to imply that this is a run-time settable attribute on the FIFO -- by the time any of the stream operators kick in, the ports are already made -- so would a PR where you can set the behavior directly on the FIFO be helpful until the refactor with more manip functionality is done?

@jonathan-beard
Copy link
Member

This one will be added into the improved parser over my current vacation :).

I'd rather not create yet another syntax option that would fragment the environment. The only problem with the runtime settable version is creating more than one way of doing things...which isn't a problem in and of itself, but does make it harder for people to learn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants