
public class DigitalSensor extends Object implements BinarySensor
| Modifier and Type | Field and Description |
|---|---|
protected int |
byteNumero
Gateway byte number where the sensor is coded.
|
protected boolean |
on
this represents the value sent by the sensor.
|
| Constructor and Description |
|---|
DigitalSensor(String dioName,
int inputNumero)
Build a new DigitalSensor.
|
DigitalSensor(String dioName,
int inputNumero,
int byteNumero)
Build a new DigitalSensor which is plugged on a plutoGateway for example.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getByteNumero() |
int |
getInputNumero() |
String |
getName()
The name of this component.
|
boolean |
isOn() |
String |
toString() |
void |
updateValue(int hex)
This methods updates the digital value for this sensor.
|
void |
updateValue(int[] hexaValues)
Update the field on from the bytes read on the gateway.
|
@ConfigurationParameter(range="0..15",
description="The numero of the byte where the value of this sensor is stored in.")
protected int byteNumero
protected boolean on
public DigitalSensor(String dioName, int inputNumero)
dioName - name of the CANopen dio device where this sensor is plugged on.inputNumero - public DigitalSensor(String dioName, int inputNumero, int byteNumero)
dioName - inputNumero - byteNumero - public String getName()
@Command(type=QUERY, level=1) public boolean isOn()
isOn in interface BinarySensorpublic void updateValue(int hex)
hex - public void updateValue(int[] hexaValues)
updateValue in interface BinarySensorhexaValues - Copyright © 2017 LSST. All rights reserved.