working on ethersex stuff
This commit is contained in:
parent
8c363fbf64
commit
892a7e6905
|
@ -5,13 +5,22 @@ import de.ctdo.bunti.model.BuntiEthersexDevice;
|
|||
import de.ctdo.bunti.model.BuntiDevice;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationListener;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Component
|
||||
public class EthersexMixerImpl implements EthersexMixer, ApplicationListener<DeviceChangedEvent> {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(EthersexMixerImpl.class);
|
||||
// private boolean hasDataChanged = true;
|
||||
ECMDSender sender;
|
||||
|
||||
@Autowired
|
||||
public void setECMDSender(ECMDSender sender) {
|
||||
this.sender = sender;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean updateDevice(BuntiDevice device, Map<String, Object> options) {
|
||||
|
@ -19,6 +28,12 @@ public class EthersexMixerImpl implements EthersexMixer, ApplicationListener<De
|
|||
return false;
|
||||
}
|
||||
|
||||
BuntiEthersexDevice edev = (BuntiEthersexDevice) device;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// BuntiDMXDevice dmxDev = (BuntiDMXDevice) device;
|
||||
//
|
||||
// if (dmxDev.setValuesFromOptions(options)) {
|
||||
|
|
|
@ -24,6 +24,8 @@ public class SimpleECMDSender implements ECMDSender {
|
|||
|
||||
try {
|
||||
Socket client = new Socket(dest, ECMD_TCP_PORT);
|
||||
client.setSoTimeout(2000);
|
||||
|
||||
|
||||
DataOutputStream outToServer = new DataOutputStream(client.getOutputStream());
|
||||
BufferedReader inFromServer = new BufferedReader(new InputStreamReader(client.getInputStream()));
|
||||
|
|
Loading…
Reference in New Issue