public BlockSetDebugLed() { width = 100; height = 50; Capability capability = new Capability(this); capability.AddDataInput("State", "bool"); capability.AddTriggerInput(""); UpdateConnectors(); Name = "Set Debug LED"; }
public void Create() { Capabilities.Clear(); width = 100; height = 50; ProductDataBase.Device device = ProductDataBase.GetDeviceByID(DeviceType); if (device != null) { Capability capability = new Capability(this); ProductDataBase.Device.RemoteEvent evnt = device.GetRemoteEventByID(EventID); if (evnt != null) { foreach (ProductDataBase.Device.RemoteEvent.Output o in evnt.Outputs) { capability.AddDataOutput(o.Name, o.Type); } foreach (ProductDataBase.Device.RemoteEvent.Input i in evnt.Inputs) { if (i.Type == "void") capability.AddTriggerInput(i.Name); else capability.AddDataInput(i.Name, i.Type); } if (capability.TriggerInputs.Count == 0 && (capability.TriggerInputs.Count != 0 || capability.DataOutputs.Count == 0)) { capability.AddTriggerInput("Trigger"); } } } UpdateConnectors(); }
public BlockBoolInvert() { width = 100; height = 50; Capability capability = new Capability(this); capability.AddDataInput("", "bool"); capability.AddDataOutput("", "bool"); UpdateConnectors(); Name = "Invert"; }
public BlockDelay() { width = 100; height = 50; Capability capability = new Capability(this); capability.AddTriggerOutput(""); capability.AddTriggerInput("Reset"); capability.AddDataInput("Delay", "int"); UpdateConnectors(); }
public BlockDigitalOutputSetState() { width = 100; height = 25; Capability capability = new Capability(this); capability.AddTriggerInput(""); capability.AddDataInput("State", "bool"); UpdateConnectors(); Name = "K8055 set output"; }
public BlockIfNot() { width = 100; height = 25; Capability capability = new Capability(this); capability.AddDataInput("Condition", "bool"); capability.AddTriggerInput(""); capability.AddTriggerOutput(""); UpdateConnectors(); Name = "If not"; }
public BlockSwitchSetState() { width = 100; height = 25; Capability capability = new Capability(this); capability.AddTriggerInput(""); capability.AddDataInput("State", "bool"); UpdateConnectors(); Name = "Set state"; }
public BlockMathVariable() { width = 100; height = 50; Capability capability = new Capability(this); capability.AddDataInput("Value", "int"); capability.AddDataOutput("Value", "int"); UpdateConnectors(); }
public BlockMathSubstract() { width = 100; height = 50; Name = "Substract"; Capability capability = new Capability(this); capability.AddDataInput("A", "int"); capability.AddDataInput("B", "int"); capability.AddDataOutput("C", "int"); UpdateConnectors(); }
public BlockMathPrint() { width = 100; height = 25; Capability capability = new Capability(this); capability.AddTriggerInput("Invoke"); capability.AddDataInput("Value", "int"); UpdateConnectors(); }
public BlockMathEquals() { width = 100; height = 50; Capability capability = new Capability(this); capability.AddDataInput("A", "int"); capability.AddDataInput("B", "int"); capability.AddTriggerInput("Trigger"); capability.AddTriggerOutput("True"); capability.AddTriggerOutput("False"); UpdateConnectors(); }