public void SetCounter(byte value, string id = null, SetCounterType type = SetCounterType.Set)
 {
     PackageHost.WriteInfo("{0} counter {1} to {2}", type.ToString(), id, value);
     this.ipx.SetCounter(value, id, type);
 }
Exemple #2
0
        /// <summary>
        /// Sets the counter.
        /// </summary>
        /// <param name="value">The value of the counter (from 0 to 255).</param>
        /// <param name="id">The IPX counter identifier (eg. C01, C16 or null for all counters).</param>
        /// <param name="type">The type of set (set value, increment or decrement value).</param>
        public void SetCounter(byte value, string id = null, SetCounterType type = SetCounterType.Set)
        {
            string strValue = ((type == SetCounterType.Increment) ? "+" : (type == SetCounterType.Decrement) ? "-" : "") + value.ToString();

            this.SetValue(SetArgument.Counter, id, strValue);
        }