This is my dad’s structure in C:
// EXT FLASH LOG In device database
// ************************************************************
typedef struct __packed _typeLogStruct
{
uint32_t DBIndex; // 4 Bytes
uint8_t Channel; // 1 Byte
unsigned char SerialNumber[8]; // 8 By from Sensors
float TemperatureCelsius; // 4 By -1000 Error
float Humidity; // 4 By -1000 Error
float BatteryInVolts; // 4 By
uint8_t FWMajor; // 1 By
uint8_t FWMinor; // 1 By
unsigned char DevSettings; // 1 By Device Settings from DIP Switch
char lastRSSIdBm; // 1 By last received RSSI value in dBm
RTCTimeStruct AckTimeDate; // RTC for last data from RF RHT sensor // 9 Bytes
uint8_t SensorType; // 1 By -- RF RHT, or Wired SHT21, or TCRTD etc...
uint8_t Reserved[25]; // 17 By // For Future Implementations
} typeLogStruct;
How can I make something like this in python? I couldnt find yt videos on how to make a structure in python