Class S7DriverContext
- java.lang.Object
-
- org.apache.plc4x.java.s7.readwrite.context.S7DriverContext
-
- All Implemented Interfaces:
HasConfiguration<S7Configuration>,DriverContext
public class S7DriverContext extends Object implements DriverContext, HasConfiguration<S7Configuration>
-
-
Constructor Summary
Constructors Constructor Description S7DriverContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCalledTsapId()intgetCalledTsapId2()intgetCallingTsapId()ControllerTypegetControllerType()COTPTpduSizegetCotpTpduSize()intgetMaxAmqCallee()intgetMaxAmqCaller()protected COTPTpduSizegetNearestMatchingTpduSize(short tpduSizeParameter)Iterate over all values until one is found that the given tpdu size will fit.intgetPduSize()booleangetPing()intgetPingTime()intgetReadTimeout()intgetRetryTime()booleanisPassiveMode()voidsetCalledTsapId(int calledTsapId)voidsetCalledTsapId2(int calledTsapId2)voidsetCallingTsapId(int callingTsapId)voidsetConfiguration(S7Configuration configuration)voidsetControllerType(ControllerType controllerType)voidsetCotpTpduSize(COTPTpduSize cotpTpduSize)voidsetMaxAmqCallee(int maxAmqCallee)voidsetMaxAmqCaller(int maxAmqCaller)voidsetPassiveMode(boolean passiveMode)voidsetPduSize(int pduSize)voidsetPing(boolean ping)voidsetPingTime(int pingTime)voidsetReadTimeout(int readTimeout)voidsetRetryTime(int retryTime)
-
-
-
Method Detail
-
setConfiguration
public void setConfiguration(S7Configuration configuration)
- Specified by:
setConfigurationin interfaceHasConfiguration<S7Configuration>
-
isPassiveMode
public boolean isPassiveMode()
-
setPassiveMode
public void setPassiveMode(boolean passiveMode)
-
getCallingTsapId
public int getCallingTsapId()
-
setCallingTsapId
public void setCallingTsapId(int callingTsapId)
-
getCalledTsapId
public int getCalledTsapId()
-
setCalledTsapId
public void setCalledTsapId(int calledTsapId)
-
getCalledTsapId2
public int getCalledTsapId2()
-
setCalledTsapId2
public void setCalledTsapId2(int calledTsapId2)
-
getCotpTpduSize
public COTPTpduSize getCotpTpduSize()
-
setCotpTpduSize
public void setCotpTpduSize(COTPTpduSize cotpTpduSize)
-
getPduSize
public int getPduSize()
-
setPduSize
public void setPduSize(int pduSize)
-
getMaxAmqCaller
public int getMaxAmqCaller()
-
setMaxAmqCaller
public void setMaxAmqCaller(int maxAmqCaller)
-
getMaxAmqCallee
public int getMaxAmqCallee()
-
setMaxAmqCallee
public void setMaxAmqCallee(int maxAmqCallee)
-
getControllerType
public ControllerType getControllerType()
-
setControllerType
public void setControllerType(ControllerType controllerType)
-
getReadTimeout
public int getReadTimeout()
-
setReadTimeout
public void setReadTimeout(int readTimeout)
-
getPing
public boolean getPing()
-
setPing
public void setPing(boolean ping)
-
getPingTime
public int getPingTime()
-
setPingTime
public void setPingTime(int pingTime)
-
getRetryTime
public int getRetryTime()
-
setRetryTime
public void setRetryTime(int retryTime)
-
getNearestMatchingTpduSize
protected COTPTpduSize getNearestMatchingTpduSize(short tpduSizeParameter)
Iterate over all values until one is found that the given tpdu size will fit.- Parameters:
tpduSizeParameter- requested tpdu size.- Returns:
- smallest
COTPTpduSizewhich will fit a given size of tpdu.
-
-