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

DmxData Buffer doesn't go beyond 15 universes #14

Closed
Nexyll opened this issue Jan 19, 2020 · 3 comments
Closed

DmxData Buffer doesn't go beyond 15 universes #14

Nexyll opened this issue Jan 19, 2020 · 3 comments

Comments

@Nexyll
Copy link

Nexyll commented Jan 19, 2020

Hi,

It seems that the input buffer only support universe 0 thru 15, when we try to read data over the fifteenth universe all channel are at 0.

the concerned method is readDmxData from the ArtNetClient class.

An idea of the cause of this limitation ?

@cansik cansik self-assigned this Jan 19, 2020
@cansik
Copy link
Owner

cansik commented Jan 20, 2020

The ArtNetBuffer is implemented to create a new channel on demand.

It seems that the OpDMX parsing is limiting the value to 16 by masking it with 0x0F. I am not sure at the moment if this is needed or how the ArtNet standard handles this. Because atm in the code, the universe is the lower part of the 8bit subnet number, which means we only have 4bit to represent the universe (which is 16 in decimal).

@cansik
Copy link
Owner

cansik commented Jan 20, 2020

So it seems that we would have to combine the subnet and the universe into one number by shifting them back:

int overSixTeenUniverse = dmxPackage.getSubnetID() << 4 | dmxPackage.getUniverseID();

@Nexyll
Copy link
Author

Nexyll commented Jan 20, 2020

Thank you for your answer, I had misunderstood the specification, I must have confused net and subnet in the ArtDmx packet description.

The code seems to implement the specification correctly.

Bit 15 Bits 14-8 Bits 7-4 Bits 3-0
0 Net Sub-Net Universe

Thanks again for your help 😉

@Nexyll Nexyll closed this as completed Jan 20, 2020
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