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

manifesto: add mnfb parser #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cfriedt
Copy link
Contributor

@cfriedt cfriedt commented Aug 16, 2020

Previously the MnfbParser class was just a stub, so e.g. the following
would fail:

manifesto -I mnfb -O mnfs input.mnfb
Error: 'MnfbParser' object has no attribute 'parse_file'

This change adds a very simple binary file parser.

example output:

Warning: non-incremental id for '[None]'
Warning: non-incremental id for '[None]'
[manifest-header]
version-major = 0
version-minor = 1

[interface-descriptor]
vendor-string-id = 0x1
vendor-product-id = 0x2

; Interface vendor string
[string-descriptor 0x1]
string = Zephyr Project RTOS

; Interface product string
[string-descriptor 0x2]
string = Greybus Service Sample Application

; 'Control' class on Bundle 0
[bundle-descriptor 0x0]
class = 0x0

; 'Bridged PHY' class on Bundle 1
[bundle-descriptor 0x1]
class = 0xa

; 'Bridged PHY' class on Bundle 2
[bundle-descriptor 0x2]
class = 0xa

; 'Bridged PHY' class on Bundle 3
[bundle-descriptor 0x3]
class = 0xa

; 'Control' protocol on CPort 0
[cport-descriptor 0x0]
bundle = 0x0
protocol = 0x0

; 'GPIO' protocol on CPort 1
[cport-descriptor 0x1]
bundle = 0x1
protocol = 0x2

; 'I2C' protocol on CPort 2
[cport-descriptor 0x2]
bundle = 0x2
protocol = 0x3

; 'SPI' protocol on CPort 3
[cport-descriptor 0x3]
bundle = 0x3
protocol = 0xb

Previously the MnfbParser class was just a stub, so e.g. the following
would fail:

manifesto -I mnfb -O mnfs input.mnfb
Error: 'MnfbParser' object has no attribute 'parse_file'

This change adds a very simple binary file parser.

Signed-off-by: Christopher Friedt <[email protected]>
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

Successfully merging this pull request may close these issues.

1 participant