/// <summary>
        /// create an instance of <seealso cref="ProtocolSwitch"/> according to byte value
        /// </summary>
        /// <param name="value"> </param>
        /// <returns> ProtocolSwitchStatus with initialized bit set. </returns>
        public static ProtocolSwitch create(int value)
        {
            ProtocolSwitch status = new ProtocolSwitch();

            status.Bs = toBitSet(value);
            return(status);
        }
        /// <summary>
        /// create an instance of <seealso cref="ProtocolSwitch"/> according to switch index
        /// </summary>
        /// <param name="index"> the switch index which you want to set true </param>
        /// <returns> ProtocolSwitchStatus with initialized bit set. </returns>
        public static ProtocolSwitch create(int[] index)
        {
            ProtocolSwitch status = new ProtocolSwitch();

            for (int i = 0; i < index.Length; ++i)
            {
                status.turnOn(index[i]);
            }
            return(status);
        }