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

Add the ability to define array items using from_file #48

Open
ehsteve opened this issue Jan 25, 2023 · 2 comments
Open

Add the ability to define array items using from_file #48

ehsteve opened this issue Jan 25, 2023 · 2 comments

Comments

@ehsteve
Copy link
Member

ehsteve commented Jan 25, 2023

I would suggest the following convention

name, bit_length, data_type
ARRAY, 8, uint(16)

So uint(shape).
This matches the programmatic way to define it and does not add too much complexity to the csv file.

PacketArray(name='SENSOR_GRID', data_type='uint', bit_length=16,
            array_shape=(32, 32), array_order='C')
@ddasilva
Copy link
Collaborator

ddasilva commented Jan 25, 2023

This sounds like a very elegant solution. For expanding fields, can be fieldname(expand) or fieldname(*).

I plan on adding a capability to have an array shape be defined by a preceding field in the packet. this allows multiple variable length fields in the same packet. I was told a few instruments being developed at LASP do this with their packets. in this spec, that could be written out as fieldname(otherfield). if we do that maybe we should change fieldname(expand) and array_shape=“expand” to just fieldname(*) and array_shape=“*” so no one thinks there is a field called expand.

We should really put together a page on the site which describes this csv format, too

@ddasilva
Copy link
Collaborator

Leaving this open after #49 finished to implement fieldname(*)

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