Params are defined as enums. A command has a defined set of params. So, a command can be defined as a pattern of enums.
This enum based approach allows MC to validate every command's param along with other useful functionality
- If
SRCSTMFandSRCFILEare present,SRCFILEis removed to give priority to stream files. - If
SRCSTMFis present andTGTCCSIDis missing, then MC adds it. - If
SRCSTMFandEXPORTare present,EXPORTis removed.
- Every command, param, and value is validated during deserialization.
- Invalid params for a given command are rejected, and an error is raised.
- Param values are automatically formatted if necessary, e.g.,
yesto*YES,Sourceto*SOURCE, etc.
Every change is tracked individually in the history of each param. This gives you full context of what MC does.