AnimatLab  2
Test
FirmataDigitalInput.cs
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 
6 namespace RoboticsGUI
7 {
8  namespace RobotIOControls
9  {
10  namespace Firmata
11  {
12 
13  public class FirmataDigitalInput : AnimatGUI.DataObjects.Robotics.InputSystem
14  {
15  public override string Description {get {return "Reads input from a digital switch on a Firmata controller.";} set { }}
16  public override string WorkspaceImageName {get {return "RoboticsGUI.Graphics.DigitalInputSmall.gif";}}
17  public override string ButtonImageName {get {return "RoboticsGUI.Graphics.DigitalInputLarge.gif";}}
18  public override string PartType {get { return "FirmataDigitalInput"; }}
19  public override string ModuleName { get { return "RoboticsAnimatSim"; } }
20 
21  public FirmataDigitalInput(AnimatGUI.Framework.DataObject doParent)
22  : base(doParent)
23  {
24  m_strName = "Digital Input";
25  }
26 
27  public override AnimatGUI.Framework.DataObject Clone(AnimatGUI.Framework.DataObject doParent, bool bCutData, AnimatGUI.Framework.DataObject doRoot)
28  {
29  FirmataDigitalInput doEngine = new FirmataDigitalInput(doParent);
30  return doEngine;
31  }
32 
33  public override void BuildProperties(ref AnimatGuiCtrls.Controls.PropertyTable propTable)
34  {
35  base.BuildProperties(ref propTable);
36 
37  propTable.Properties.Add(new AnimatGuiCtrls.Controls.PropertySpec("Pin", this.IOComponentID.GetType(), "IOComponentID",
38  "Properties", "The pin number where the digial input will be retrieved.", this.IOComponentID));
39  }
40 
41  }
42 
43  }
44  }
45 }