Maybe I have already found the answer to this question in that it's not possible, but if there's a nifty trick... I'm all ears. I'm trying to reproduce the following C enumeration list in python:
enum Id
{
NONE = 0,
HEARTBEAT, //0x1
FLUID_TRANSFER_REQUEST,
FLUID_TRANSFER_STATUS_MSG,
FLUID_TRANSFER_ERROR_MSG,
FLUID_TRANSFER_RESUME,
EMERGENCY_STOP_MSG,
LOG_MSG,
VERSION_REQUEST,
VERSION_RESPONSE,
CHANNEL_INFORMATION_REQUEST,
CHANNEL_INFORMATION_RESPONSE,
TEST_REQUEST,
LED_CONTROL_REQ,
RESET_REQ,
// Camera App Messages
START_SENDING_PICTURES = 0x010000,
STOP_SENDING_PICTURES,
START_RECORDING_VIDEO_REQ,
STOP_RECORDING_VIDEO_REQ,
TAKE_PICTURE_REQ,
SET_VOLUME_LIMIT,
VIDEO_FRAME_MSG,
PICTURE_MSG,
I_FRAME_REQUEST,
CURRENT_VOLUME,
START_ANALYZING_IMAGES_REQ,
STOP_ANALYZING_IMAGES_REQ,
SET_FILE_PATH,
//Sensor Calibration
VOLUME_REQUEST = 0x020000,
START_CAL,
CLI_COMMAND_REQUEST,
CLI_COMMAND_RESPONSE,
// File Mananger
NEW_DELIVERY_REQ = 0x30000,
GET_DELIVERY_FILE_REQ,
GET_FILE_REQ,
ACK_NACK,
RESPONSE,
LAST_ID
};
However, I don't want to have to specify every value for the list because it's changing often. Since I also have it set to a new value in the various sections, I can't use the AutoNumber methodology (e.g. VOLUME_REQUEST = 0x020000). Anyone got a clever trick to reproduce C style enums in python, or am I stuck with reproducing it the hard way?