CC: Tweaked

CC: Tweaked

57M Downloads

API for `peripheral_hub` chaining

SirEdvin opened this issue · 5 comments

commented

So, I am trying to make this work.

2023-09-11_20 56 39

I can create chaning from one peripheral proxy to another, but it is complicated things to do with wired modems. I don't want to artificially reuse wired networks here, because it probably would create some (a lot, actually) confusion.

Can I suggest to have some interface that peripheral_hub Peripherals should implement to became chain-able into another peripheral_hub's?

commented

While I think the concept is fine, I think the implementation of this is going to be incredibly nasty and/or error-prone, which ever way you slice it. I can elucidate, but it will require an essay, so hoping you can trust me on this and spare me from that :D.

I've made a change in b1248e4 which allows you to prevent the peripheral proxy being wrappable by a modem (if you so wish), similar to your current peripheral_proxy_forbidden tag.

This is exactly what the wired network API is here for. Use it!

commented

I've made a change in b1248e4 which allows you to prevent the peripheral proxy being wrappable by a modem (if you so wish), similar to your current peripheral_proxy_forbidden tag.

There's an argument that peripheral hubs should ignore any other peripheral tagged as peripheral_hub. I think making that change now is unhelpful, but is tempting in the future.

commented

This is exactly what the wired network API is here for. Use it!

Well, I can understand, but for this I would need to make peripheral proxy part of wired network and (!) part of my own wireless network to make it work. Which is possible, but

I think the implementation of this is going to be incredibly nasty and/or error-prone, which ever way you slice it.

However, I am pretty sure that implementing API for this would be a little hell by itself, so I am perfectly fine with tag solution! I hope, in my planned future mod related to network I will make something crazy enough to work.

commented

Hrmr, what do you mean by "wireless network" here - that seems a little suspicious.

commented

Something that I did with Enderwire networks :)

зображення

But I would need to handle something like this
зображення

So I would need a nice wireless network implementation, that could be handle cycles, sharing peripherals with all peripheral proxies in one direction or in two-way directions.