Examples of Relay


Examples of c8y.Relay

   
    @Test
    public void shouldCreateRelayOperation() {
        GId deviceId = getMoId(1);
        OperationRepresentation operation = new OperationRepresentation();
        Relay relayControl = new Relay();
        relayControl.setRelayState(RelayState.OPEN);
        operation.set(relayControl);
        operation.setDeviceId(deviceId);
       
        operation1 = deviceControlResource.create(operation);
    }
View Full Code Here

Examples of c8y.Relay

    private static final String PROP_STATE = "state";
   
    public JSONObject toJson(Object representation) {
        JSONObject json = new JSONObject();
        Relay relayControl = (Relay) representation;
        putString(json, PROP_STATE, relayControl.getRelayState().name());
        return json;
    }
View Full Code Here

Examples of c8y.Relay

        putString(json, PROP_STATE, relayControl.getRelayState().name());
        return json;
    }

    public Object fromJson(JSONObject json) {
        Relay relayControl = new Relay();
        relayControl.setRelayState(RelayState.OPEN);
        return relayControl;
    }
View Full Code Here

Examples of c8y.Relay

    private String relayRepresentationWithInvalidState = "{\"relayState\":\"MEH\"}";

    @Test
    public final void testThatTheRepresentationOfTheEnumerationSerializesCorrectlyIfStateIsValid() {
        Relay relay = new Relay();
        relay.setRelayState(RelayState.OPEN);
        Relay newRelay = JSONParser.defaultJSONParser().parse(Relay.class, relayRepresentationWithValidState);
        assertTrue(newRelay.getRelayState().equals(relay.getRelayState()));
    }
View Full Code Here

Examples of edu.wpi.first.wpilibj.Relay

    /**
     * Creates relay and sets it to a port number on the digital side car as specified
     * @param channel
     */
    public GRTRelay(int channel) {
        relay = new Relay(channel);
    }
View Full Code Here

Examples of edu.wpi.first.wpilibj.Relay

    public static final double RELAY_OFF = 0.0;
    private Relay relay;
   

    public GRTRelay(int channel) {
        relay = new Relay(channel);
    }
View Full Code Here

Examples of edu.wpi.first.wpilibj.Relay

    private boolean isOn = false;
    // Put methods for controlling this subsystem
    // here. Call these from Commands.
   
    public BallLight() {
        ballLight = new Relay(RobotMap.BALL_LIGHT, Relay.Direction.kForward);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.