15 package com.neuronrobotics.sdk.dyio.peripherals;
17 import com.neuronrobotics.sdk.commands.bcs.io.AsyncThreshholdEdgeType;
18 import com.neuronrobotics.sdk.commands.bcs.io.GetDyIOChannelCountCommand;
19 import com.neuronrobotics.sdk.commands.bcs.io.SetChannelValueCommand;
20 import com.neuronrobotics.sdk.common.BowlerMethod;
21 import com.neuronrobotics.sdk.common.ByteList;
22 import com.neuronrobotics.sdk.common.InvalidResponseException;
23 import com.neuronrobotics.sdk.dyio.DyIOChannel;
24 import com.neuronrobotics.sdk.dyio.DyIOChannelMode;
25 import com.neuronrobotics.sdk.dyio.IDyIOChannel;
78 Integer [] configs = (Integer[]) args[0];
90 return channel.getMode();
108 return channel.setMode(getClassMode());
118 return channel.setMode(getClassMode(), async);
130 if(mode != getClassMode())
131 throw new RuntimeException(
"The mode being set does not match the defined channel mode: "+mode+
" is not"+getClassMode());
132 return channel.setMode(getClassMode(), async);
152 return channel.getMode();
164 return channel.setValue(value);
176 return channel.setValue(value);
188 return channel.getValue();
206 if(getChannel().getDevice().isLegacyParser()){
210 getChannel().getDevice().send(
"bcs.io.*;0.3;;",
213 new Object[]{ getChannel().getChannelNumber(),
217 getChannel().setValue(pos);
220 }
catch (InterruptedException e) {
247 return getChannel().configAdvancedAsyncNotEqual(100);
258 return getChannel().configAdvancedAsyncDeadBand(100,deadbandSize);
270 return getChannel().configAdvancedAsyncTreshhold(100, threshholdValue, edgeType);
281 return getChannel().configAdvancedAsyncAutoSample(100);
289 return getChannel().configAdvancedAsyncNotEqual(msTime);
300 return getChannel().configAdvancedAsyncDeadBand(msTime,deadbandSize);
312 return getChannel().configAdvancedAsyncTreshhold(msTime, threshholdValue, edgeType);
323 return getChannel().configAdvancedAsyncAutoSample(msTime);
332 return getChannel().flush();
341 channel.setMode(getClassMode(), b);
350 return configuration;
359 this.configuration = configuration;
boolean setMode(DyIOChannelMode mode)
DyIOChannelMode getMode(boolean resync)
Object[] send(String NS, BowlerMethod method, String rpcString, Object[] arguments)
boolean configAdvancedAsyncNotEqual()
DyIOAbstractPeripheral(DyIOChannel channel, DyIOChannelMode myMode, boolean async)
boolean configAdvancedAsyncNotEqual(int msTime)
boolean configAdvancedAsyncAutoSample(int msTime)
boolean configAdvancedAsyncAutoSample()
DyIOChannelMode getClassMode()
DyIOChannelMode getMode()
boolean SavePosition(int pos)
boolean setMode(DyIOChannelMode mode, boolean async)
int getConfigurationFromDevice()
boolean setValue(int value)
void setConfiguration(int configuration)
boolean configAdvancedAsyncDeadBand(int deadbandSize)
boolean setValue(ByteList value)
boolean configAdvancedAsyncDeadBand(int msTime, int deadbandSize)
boolean configAdvancedAsyncTreshhold(int msTime, int threshholdValue, AsyncThreshholdEdgeType edgeType)
boolean configAdvancedAsyncTreshhold(int threshholdValue, AsyncThreshholdEdgeType edgeType)
abstract boolean hasAsync()
boolean setMode(boolean async)