| Package | org.MARS.robot.control |
| Class | public class IOPort |
See also
| Property | Defined by | ||
|---|---|---|---|
| connectedPorts : Array [read-only]
A list of all connected IO Ports
| IOPort | ||
| direction : Number | IOPort | ||
| value : Boolean [read-only]
Gets a value of the port, dependin on its direction:
| IOPort | ||
| Method | Defined by | ||
|---|---|---|---|
|
IOPort(direction:Number)
Create an IO Port with the given direction
| IOPort | ||
|
connectPorts(port:IOPort):void
Connect an IO port to the current port.
| IOPort | ||
|
high():void
Set a value of the output port to HIGH
| IOPort | ||
|
low():void
Set a value of the output port to LOW
| IOPort | ||
| Constant | Defined by | ||
|---|---|---|---|
| HIGH : Boolean = true [static]
| IOPort | ||
| INPUT : Number = 0 [static]
| IOPort | ||
| LOW : Boolean = false [static]
| IOPort | ||
| OUTPUT : Number = 1 [static]
| IOPort | ||
| connectedPorts | property |
connectedPorts:Array [read-only]A list of all connected IO Ports
Implementation public function get connectedPorts():Array
| direction | property |
public var direction:Number
| value | property |
value:Boolean [read-only]Gets a value of the port, dependin on its direction:
public function get value():Boolean
| IOPort | () | constructor |
public function IOPort(direction:Number)Create an IO Port with the given direction
Parametersdirection:Number |
| connectPorts | () | method |
public function connectPorts(port:IOPort):voidConnect an IO port to the current port.
NOTE: since every port contains a list of the connected ports connecting two ports of the same direction is not allowed due to the danger of an infinite loop.
Parametersport:IOPort — - target IO Port
|
— Error whenever two ports of the same direction are
attempted to be connected
|
See also
| high | () | method |
public function high():voidSet a value of the output port to HIGH
— Error whenever the input port direction is attempted to be set
|
| low | () | method |
public function low():voidSet a value of the output port to LOW
— Error whenever the input port direction is attempted to be set
|
| HIGH | constant |
public static const HIGH:Boolean = true
| INPUT | constant |
public static const INPUT:Number = 0
| LOW | constant |
public static const LOW:Boolean = false
| OUTPUT | constant |
public static const OUTPUT:Number = 1