//-----------------------------------------------------------------------
//
// Copyright © 2012 Nils Hammar. All rights reserved.
//
//-----------------------------------------------------------------------
/*
* Software to access vehicle information via the OBD-II connector.
*
* Copyright © 2012 Nils Hammar
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*
* Alternative licensing is possible, see the licensing document.
*
* The above text may not be removed or modified.
*/
namespace UserInterface.GUI.OBD
{
using System.Collections.Generic;
using global::SharedObjects.GUI;
using global::SharedObjects.Misc;
///
/// Wrapper class for PID item and additional data.
///
public class PidItemWrapper : IPidItemWrapper
{
///
/// Gets or sets List of destination ECU addresses for message.
///
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Reviewed, intentional.")]
public IList addrList { get; set; }
///
/// Gets actual mode.
///
public uint actualMode { get; private set; }
///
/// Gets identifier list mode.
///
public uint pidMode { get; private set; }
///
/// Gets PID item.
///
public XmlClass.pidgroup.pidlist pidItem { get; private set; }
///
/// Gets a value indicating whether all ECU:s shall be checked by default.
///
public bool defaultChecked { get; private set; }
///
/// Gets or sets selected plot group.
///
public int plotGroup { get; set; }
///
/// List of checked columns.
///
private List checkedCols = new List();
///
/// Gets which columns that shall be checked.
///
public IList checkedColumns
{
get
{
return this.checkedCols;
}
}
///
/// Initializes a new instance of the class.
///
/// Actual mode byte value.
/// PID mode byte value to use.
/// PID item to wrap.
/// Flag indicating that it shall be checked by default.
internal PidItemWrapper(uint actualMode, uint pidMode, XmlClass.pidgroup.pidlist pidItem, bool defaultChecked)
{
this.actualMode = actualMode;
this.pidMode = pidMode;
this.pidItem = pidItem;
this.defaultChecked = defaultChecked;
this.plotGroup = 0;
}
}
}