BLE CSC Measurement with ESP32

Hi, i’m going to implement the BLE CSC Characteristics, reference GATT, but i’ve encountered a serious problem. The specs required a variable length structure with Flag (Array[7] of bool) and other field (Cumulative Wheel Revolutions: unsigned int 32, Last Wheel Event Time: unsigned int 16, … etc) but i can’t understand how to construct this structure. Can you please help me?

I am not sure but I think you can setup the characteristic with an array of max size
and when you get the value it manually convert bytes to integers.

Thank you for your answer. Please, can you give me an example?