2 using System.Collections.Generic;
5 using AnimatGUI.Framework;
9 namespace RobotIOControls
12 public class Spike2 : AnimatGUI.DataObjects.Robotics.RemoteControl
14 #region " Attributes "
16 protected int m_iPortNumber = 3;
20 #region " Properties "
22 public override string Description {
get {
return "Gets spike inputs from a spike2 data system.";} set { }}
23 public override string ButtonImageName {
get {
return "HybridInterfaceGUI.Graphics.Spike2_Large.gif"; } }
24 public override string WorkspaceImageName {
get {
return "HybridInterfaceGUI.Graphics.Spike2_Small.gif"; } }
25 public override string PartType {
get {
return "Spike2"; }}
26 public override string ModuleName {
get {
return "HybridInterfaceSim"; } }
28 public virtual int PortNumber
36 SetSimData(
"PortNumber", value.ToString(),
true);
37 m_iPortNumber = value;
45 public Spike2(AnimatGUI.Framework.DataObject doParent)
50 m_thDataTypes.DataTypes.Add(
new AnimatGUI.DataObjects.DataType(
"Data",
"Data",
"",
"", 0, 1));
53 public override AnimatGUI.Framework.DataObject Clone(AnimatGUI.Framework.DataObject doParent,
bool bCutData, AnimatGUI.Framework.DataObject doRoot)
59 protected override void CloneInternal(DataObject doOriginal,
bool bCutData, DataObject doRoot)
61 base.CloneInternal(doOriginal, bCutData, doRoot);
67 m_iPortNumber = doOrig.m_iPortNumber;
71 public override void BuildProperties(ref AnimatGuiCtrls.Controls.PropertyTable propTable)
73 base.BuildProperties(ref propTable);
75 propTable.Properties.Add(
new AnimatGuiCtrls.Controls.PropertySpec(
"Com Port",
this.PortNumber.GetType(),
"PortNumber",
"Properties",
"Com port number", this.PortNumber));
84 m_iPortNumber = oXml.GetChildInt(
"PortNumber", m_iPortNumber);
95 oXml.AddChildElement(
"PortNumber", m_iPortNumber);
102 base.SaveSimulationXml(oXml, ref nmParentControl, strName);
106 oXml.AddChildElement(
"PortNumber", m_iPortNumber);