Package org.apache.plc4x.java.simulated
Class SimulatedDriver
- java.lang.Object
-
- org.apache.plc4x.java.simulated.SimulatedDriver
-
- All Implemented Interfaces:
PlcDriver
public class SimulatedDriver extends Object implements PlcDriver
Test driver holding its state in the client process. The URL schema issimulated:<device_name>. Devices are created each time a connection is established and should not be reused. Every device contains a random value generator accessible by addressrandom. Any value can be stored into test devices, however the state will be gone when connection is closed.
-
-
Constructor Summary
Constructors Constructor Description SimulatedDriver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PlcConnectiongetConnection(String url)PlcConnectiongetConnection(String url, PlcAuthentication authentication)StringgetProtocolCode()StringgetProtocolName()SimulatedTagprepareTag(String tagAddress)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.plc4x.java.api.PlcDriver
discoveryRequestBuilder, getMetadata
-
-
-
-
Method Detail
-
getProtocolCode
public String getProtocolCode()
- Specified by:
getProtocolCodein interfacePlcDriver
-
getProtocolName
public String getProtocolName()
- Specified by:
getProtocolNamein interfacePlcDriver
-
getConnection
public PlcConnection getConnection(String url) throws PlcConnectionException
- Specified by:
getConnectionin interfacePlcDriver- Throws:
PlcConnectionException
-
getConnection
public PlcConnection getConnection(String url, PlcAuthentication authentication) throws PlcConnectionException
- Specified by:
getConnectionin interfacePlcDriver- Throws:
PlcConnectionException
-
prepareTag
public SimulatedTag prepareTag(String tagAddress)
- Specified by:
prepareTagin interfacePlcDriver
-
-