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

Payload Format Indicator should be int8, not byte #65

Open
wlisac opened this issue Aug 17, 2019 · 1 comment
Open

Payload Format Indicator should be int8, not byte #65

wlisac opened this issue Aug 17, 2019 · 1 comment

Comments

@wlisac
Copy link

wlisac commented Aug 17, 2019

The Payload Format Indicator should be int8, not byte.

https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901111

Here are a couple relevant places that would likely need to change.

payloadFormatIndicator: 'byte',

payloadFormatIndicator?: boolean,

@wlisac
Copy link
Author

wlisac commented Aug 17, 2019

I just noticed that the Will Message's Payload Format Indicator already has a type annotation of number instead of boolean.

payloadFormatIndicator?: number,

I think the publish packet using boolean instead of number is more of a semantic issue than an encoding issue (since the current possible values are only 0 or 1).

I'm happy to provide more information as needed.

Thanks,
Will

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

No branches or pull requests

1 participant