// * This constructor creates an instance which will control a DigitalOut object which has already been created on the mbed
 // *
 // * @param connectedMbed The mbed object for the mbed that the DigitalOut has been created on.
 // * @param ExistName The name of the existing DigitalOut object
 public DigitalOut(SerialRPC connectedMbed, String ExistName)
 {
     //Tie to existing instance
     mbedRPC = connectedMbed;
     name    = ExistName;
     //Debug.Print("Existing DigitalOut pin: " + ExistName);
 }
        // * This is the constructor to create a new Digital Out on mbed
        // *
        // * @param connectedMbed The mbed object for the mbed that the DigitalOut is to be created on.
        // * @param pin The pin that is to be used as a Digital Out
        public DigitalOut(SerialRPC connectedMbed, MbedPin pin)
        {
            //Create a new DigitalOut on mbed
            mbedRPC = connectedMbed;
            name    = "mbed_" + pin.PinName.ToLower();
            String[] Args      = { pin.PinName, name };
            string   parameter = mbedRPC.RPC("DigitalOut", "new", Args);

            Debug.Print("New DigitalOut initialized: " + parameter);
        }
        public Serial(SerialRPC connectedMbed, MbedPin TxPin, MbedPin RxPin)
        {
            //Create a new Serial on mbed
            mbedRPC = connectedMbed;
            name    = "serial_" + TxPin.PinName + RxPin.PinName;
            String[] Args      = { TxPin.PinName, RxPin.PinName, name };
            string   parameter = mbedRPC.RPC("Serial", "new", Args);

            Debug.Print("New Serial object initialized: " + parameter);
        }
 public AnalogOut(SerialRPC connectedMbed, String ExistName)
 {
     //Tie to existing instance
     mbedRPC = connectedMbed;
     name    = ExistName;
 }
Exemplo n.º 5
0
 // * This constructor creates an instance which will control a ValuePass object which has already been created on the mbed
 // * <br>
 // * Note that it must also have the same type as the data on mbed or else data will be parsed incorrectly
 // *
 // * @param connectedMbed The mbed object for the mbed that the ValuePass has been created on.
 // * @param ExistName The name of the existing ValuePass object
 public RPCVariable(SerialRPC connectedMbed, String ExistName)
 {
     //Tie to existing instance
     mbedRPC = connectedMbed;
     name    = ExistName;
 }
 // * Create a GetObjects Object for mbed
 // *
 // * @param connectedMbed The mbed object for the mbed to read the objects from
 public GetObjects(SerialRPC connectedMbed)
 {
     //Create a new DigitalOut on mbed
     mbedRPC = connectedMbed;
     Objects();
 }
Exemplo n.º 7
0
 public DigitalIn(SerialRPC connectedMbed, String ExistName)
 {
     //Tie to existing instance
     mbedRPC = connectedMbed;
     name    = ExistName;
 }