package com.nokia.sms.entity;

/**
 * Command_Id定义
 * SMIT_BIND 0x00000001 绑定请求
 * SMIT_BIND_RESP 0x80000001 绑定应答
 * SMIT_ACTIVE_TEST 0x0000000f 链路检测
 * SMIT_ACTIVE_TEST_RESP 0x8000000f 链路检测应答
 * SMIT_DELBLK 0x00000003 解除黑名单请求
 * SMIT_DELBLK_RESP 0x80000003 解除黑名单应答
 */
public enum CommandId {
    SMIT_BIND(1L), SMIT_BIND_RESP(2147483649L),
    SMIT_ACTIVE_TEST(15L), SMIT_ACTIVE_TEST_RESP(2147483663L),
    SMIT_DELBLK(3L), SMIT_DELBLK_RESP(2147483651L);

    public final long value;

    CommandId(long value) {
        this.value = value;
    }

    public static CommandId parse(long value) {
        for (CommandId commandId : values()) {
            if (value == commandId.value) {
                return commandId;
            }
        }
        return null;
    }
}
