Flatbuffers schema

250 Views Asked by At

I am trying to write a flatbuffers schema file or .fbs file in my project. I have only two parameters to pass. a string and an array of 100 floating values.

id: string data: [float:100]

namespace FlatbufData;

struct senderSchemaData {    
    dataFloat: [float:100];
}
table startId {
    id:string;
}
root_type FlatData;

Can any one help me with writing the correct flatbuffer schema file?

1

There are 1 best solutions below

0
Aardappel On

There's not a lot of benefit using the fixed array size feature for an array this big, you're better off with simply table MyRoot { floats:[float]; id:string; }