# 枚举值更新映射表

## 需要更新的枚举值

### MessageType
- `"register"` → `"REGISTER"`
- `"register_ack"` → `"REGISTER_ACK"`
- `"unregister"` → `"UNREGISTER"`
- `"unregister_ack"` → `"UNREGISTER_ACK"`
- `"heartbeat"` → `"HEARTBEAT"`
- `"heartbeat_ack"` → `"HEARTBEAT_ACK"`
- `"command"` → `"COMMAND"`
- `"command_response"` → `"COMMAND_RESPONSE"`
- `"program"` → `"PROGRAM"`
- `"program_response"` → `"PROGRAM_RESPONSE"`
- `"progress_update"` → `"PROGRESS_UPDATE"`
- `"error"` → `"ERROR"`

### ClientType
- `"device"` → `"DEVICE"`
- `"backend"` → `"BACKEND"`
- `"edge"` → `"EDGE"`
- `"gateway"` → `"GATEWAY"`

### OperationType
- `"read"` → `"READ"`
- `"write"` → `"WRITE"`

### Priority
- `"low"` → `"LOW"`
- `"normal"` → `"NORMAL"`
- `"high"` → `"HIGH"`
- `"critical"` → `"CRITICAL"`

### CommandStatus
- `"completed"` → `"COMPLETED"`
- `"failed"` → `"FAILED"`
- `"timeout"` → `"TIMEOUT"`
- `"cancelled"` → `"CANCELLED"`
- `"in_progress"` → `"IN_PROGRESS"`

### CommandType
- `"simple"` → `"SIMPLE"`
- `"batch"` → `"BATCH"`
- `"complex"` → `"COMPLEX"`

### ProgramType
- `"dynamic"` → `"DYNAMIC"`
- `"static"` → `"STATIC"`

### ProgramDirection
- `"left_to_right"` → `"LEFT_TO_RIGHT"`
- `"right_to_left"` → `"RIGHT_TO_LEFT"`

### ProgressPhase
- `"downloading"` → `"DOWNLOADING"`
- `"decompressing"` → `"DECOMPRESSING"`
- `"preprocessing"` → `"PREPROCESSING"`
- `"createFrames"` → `"CREATE_FRAMES"`
- `"uploading"` → `"UPLOADING"`
- `"statistics"` → `"STATISTICS"`

### ProgressStatus
- `"pending"` → `"PENDING"`
- `"in_progress"` → `"IN_PROGRESS"`
- `"paused"` → `"PAUSED"`
- `"completed"` → `"COMPLETED"`
- `"failed"` → `"FAILED"`
- `"cancelled"` → `"CANCELLED"`

### ReportLevel
- `"debug"` → `"DEBUG"`
- `"info"` → `"INFO"`
- `"warning"` → `"WARNING"`
- `"error"` → `"ERROR"`
- `"critical"` → `"CRITICAL"`

### 其他
- `"command"` (sourceType) → `"COMMAND"`
- `"system"` (sourceType) → `"SYSTEM"`
- `"sha256"` → `"SHA256"`

## 更新脚本

```bash
# 批量替换文档中的枚举值
find docs -name "*.md" -type f -exec sed -i '' \
  -e 's/"type": "register"/"type": "REGISTER"/g' \
  -e 's/"type": "register_ack"/"type": "REGISTER_ACK"/g' \
  -e 's/"type": "unregister"/"type": "UNREGISTER"/g' \
  -e 's/"type": "unregister_ack"/"type": "UNREGISTER_ACK"/g' \
  -e 's/"type": "heartbeat"/"type": "HEARTBEAT"/g' \
  -e 's/"type": "heartbeat_ack"/"type": "HEARTBEAT_ACK"/g' \
  -e 's/"type": "command"/"type": "COMMAND"/g' \
  -e 's/"type": "command_response"/"type": "COMMAND_RESPONSE"/g' \
  -e 's/"type": "program"/"type": "PROGRAM"/g' \
  -e 's/"type": "program_response"/"type": "PROGRAM_RESPONSE"/g' \
  -e 's/"type": "progress_update"/"type": "PROGRESS_UPDATE"/g' \
  -e 's/"type": "error"/"type": "ERROR"/g' \
  -e 's/"clientType": "device"/"clientType": "DEVICE"/g' \
  -e 's/"clientType": "backend"/"clientType": "BACKEND"/g' \
  -e 's/"clientType": "edge"/"clientType": "EDGE"/g' \
  -e 's/"clientType": "gateway"/"clientType": "GATEWAY"/g' \
  -e 's/"operationType": "read"/"operationType": "READ"/g' \
  -e 's/"operationType": "write"/"operationType": "WRITE"/g' \
  -e 's/"priority": "low"/"priority": "LOW"/g' \
  -e 's/"priority": "normal"/"priority": "NORMAL"/g' \
  -e 's/"priority": "high"/"priority": "HIGH"/g' \
  -e 's/"priority": "critical"/"priority": "CRITICAL"/g' \
  -e 's/"status": "completed"/"status": "COMPLETED"/g' \
  -e 's/"status": "failed"/"status": "FAILED"/g' \
  -e 's/"status": "timeout"/"status": "TIMEOUT"/g' \
  -e 's/"status": "cancelled"/"status": "CANCELLED"/g' \
  -e 's/"status": "in_progress"/"status": "IN_PROGRESS"/g' \
  -e 's/"commandType": "simple"/"commandType": "SIMPLE"/g' \
  -e 's/"commandType": "batch"/"commandType": "BATCH"/g' \
  -e 's/"commandType": "complex"/"commandType": "COMPLEX"/g' \
  -e 's/"programType": "dynamic"/"programType": "DYNAMIC"/g' \
  -e 's/"programType": "static"/"programType": "STATIC"/g' \
  -e 's/"direction": "left_to_right"/"direction": "LEFT_TO_RIGHT"/g' \
  -e 's/"direction": "right_to_left"/"direction": "RIGHT_TO_LEFT"/g' \
  -e 's/"phase": "downloading"/"phase": "DOWNLOADING"/g' \
  -e 's/"phase": "decompressing"/"phase": "DECOMPRESSING"/g' \
  -e 's/"phase": "preprocessing"/"phase": "PREPROCESSING"/g' \
  -e 's/"phase": "createFrames"/"phase": "CREATE_FRAMES"/g' \
  -e 's/"phase": "uploading"/"phase": "UPLOADING"/g' \
  -e 's/"phase": "statistics"/"phase": "STATISTICS"/g' \
  -e 's/"status": "pending"/"status": "PENDING"/g' \
  -e 's/"status": "paused"/"status": "PAUSED"/g' \
  -e 's/"level": "debug"/"level": "DEBUG"/g' \
  -e 's/"level": "info"/"level": "INFO"/g' \
  -e 's/"level": "warning"/"level": "WARNING"/g' \
  -e 's/"level": "error"/"level": "ERROR"/g' \
  -e 's/"level": "critical"/"level": "CRITICAL"/g' \
  -e 's/"sourceType": "command"/"sourceType": "COMMAND"/g' \
  -e 's/"sourceType": "system"/"sourceType": "SYSTEM"/g' \
  -e 's/"hashAlgorithm": "sha256"/"hashAlgorithm": "SHA256"/g' \
  {} \;
```