I'm using an enum as flags:
[Flags]
public enum Partition_Status_ConditionEnum : long
{
Bypass_code_required = 1 << 0,
Fire_trouble = 1 << 1,
Fire = 1 << 2,
Pulsing_Buzzer = 1 << 3,
TLM_fault_memory = 1 << 4,
Reserved = 1 << 5,
Armed = 1 << 6,
Instant = 1 << 7,
Previous_Alarm = 1 << 8,
Siren_on = 1 << 9,
Steady_siren_on = 1 << 10,
Alarm_memory = 1 << 11,
Tamper = 1 << 12,
Cancel_command_entered = 1 << 13,
Code_entered = 1 << 14,
Cancel_pending = 1 << 15,
Silent_exit_enabled = 1 << 17,
Entryguard = 1 << 18,
Chime_mode_on = 1 << 19,
Entry = 1 << 20,
Delay_expiration_warning = 1 << 21,
Exit1 = 1 << 22,
Exit2 = 1 << 23,
LED_extinguish = 1 << 24,
Cross_timing = 1 << 25,
Recent_closing_being_timed = 1 << 26,
Exit_error_triggered = 1 << 28,
Auto_home_inhibited = 1 << 29,
Night_mode = 1 << 31,
Re_exit_active = 1 << 32,
Force_arm_triggered_by_auto_arm = 1 << 33,
Ready_to_arm = 1 << 34,
Ready_to_force_arm = 1 << 35,
Valid_PIN_accepted = 1 << 36,
Chime_on = 1 << 37,
Error_beep = 1 << 38,
Tone_on = 1 << 39,
Entry_1 = 1 << 40,
Open_period = 1 << 41,
Alarm_sent_using_phone_number_1 = 1 << 42,
Alarm_sent_using_phone_number_2 = 1 << 43,
Alarm_sent_using_phone_number_3 = 1 << 44,
Zone_bypassed = 1 << 45,
Keyswitch_armed = 1 << 46,
Delay_Trip_in_progress = 1 << 47,
}
But when I add them to a list
List<Partition_Status_ConditionEnum> PartitionConditionList = new List<Partition_Status_ConditionEnum>();
PartitionConditionList.Add(Partition_Status_ConditionEnum.Valid_PIN_accepted);
PartitionConditionList.Add(Partition_Status_ConditionEnum.Cancel_pending);
PartitionConditionList.Add(Partition_Status_ConditionEnum.Exit2);
PartitionConditionList.Add(Partition_Status_ConditionEnum.Auto_home_inhibited);
PartitionConditionList.Add(Partition_Status_ConditionEnum.Error_beep);
Byte[] Message = Msg.BuildMessage(true, PartitionNumber, LastUserNumber, PartitionConditionList);
Valid_Pin_Accepted is seen as TLM_Fault_Memory and Error_Beep as Armed. What am I missing?