Example #1
0
 /// <summary>
 /// Constructor to initialize the parameters of ShelfLife
 /// </summary>
 /// <param name="slBlock0">ShelfLifeBlock0</param>
 /// <param name="slBlock1">ShelfLifeBlock1</param>
 public SetShelfLife(ShelfLifeBlock0 slBlock0, ShelfLifeBlock1 slBlock1)
     : base(0xAB)
 {
     this.shelfLifeBlock0 = slBlock0;
     this.shelfLifeBlock1 = slBlock1;
 }
Example #2
0
 /// <summary>
 /// Constructor to initialize the parameters of ShelfLife
 /// </summary>
 /// <param name="slBlock0">ShelfLifeBlock0</param>
 /// <param name="slBlock1">ShelfLifeBlock1</param>
 /// <param name="passwordLevel">PasswordLevel</param>
 /// <param name="password">Password</param>                    
 public SetShelfLife(ShelfLifeBlock0 slBlock0, ShelfLifeBlock1 slBlock1, Level passwordLevel, uint password)
     : base(0xAB, passwordLevel, password)
 {
     this.shelfLifeBlock0 = slBlock0;
     this.shelfLifeBlock1 = slBlock1;
 }
Example #3
0
                    /// <summary>
                    /// Create Get Log state reply object
                    /// </summary>
                    /// <param name="reply">Raw 9 or 21-bit Get Log State reply</param>
                    public LogState(byte[] reply)
                    {
                        if (!((9 == reply.Length) || (20 == reply.Length)))
                        {
                            throw new ArgumentOutOfRangeException("GetLogState replies must be 9 or 20 bytes in length");
                        }
                        int offset = 0;
                        _LimitCount = new LimitCounter(reply, offset); offset += 4;
                        _SystemStat = new SystemStatus(reply, offset); offset += 4;
                        
                        if (20 == reply.Length)
                        {   
                            _SetShelLifeBlock0 = new ShelfLifeBlock0(reply, offset);
                            offset += 4;
                            _SetShelLifeBlock1 = new ShelfLifeBlock1(reply, offset);
                             offset += 4;
                             _remainingShelfLife = GetRemainingShelfLife(reply, offset);
                            offset += 3;
                        }

                        _StatFlags = new StatusFlags(reply[offset]); offset += 1;
                    }