Class AppOwnerAdapter
- java.lang.Object
-
- com.automation_pros.odva.cip.types.AppOwnerAdapter
-
- All Implemented Interfaces:
AppLinkBase
,AppOwner
public class AppOwnerAdapter extends java.lang.Object implements AppOwner
Provides a generic intermediary between an AppOwner and its application (connectable). Intended to be overridden by anonymous classes where a specific application connection owner's behaviour needs to be adjusted. Otherwise passes the method calls through to the real owner.
-
-
Constructor Summary
Constructors Constructor Description AppOwnerAdapter(AppOwner owner)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
disconnect()
When a connection is closed or an application forces a disconnect, this shutdown method is called to clean up.int
getConsumeRTF()
An Application Consumer Owner must supply an indicator of the consumed real-time mode handling format.boolean
isDisconnected()
void
setRealTimeMode(int newMode)
When an application consumer decodes a packet and it provides a real-time mode indicator, the consumer must convert it to a 32-bit indicator and give it to the owner with this method.
-
-
-
Field Detail
-
owner
protected final AppOwner owner
-
-
Constructor Detail
-
AppOwnerAdapter
public AppOwnerAdapter(AppOwner owner)
-
-
Method Detail
-
disconnect
public void disconnect()
Description copied from interface:AppLinkBase
When a connection is closed or an application forces a disconnect, this shutdown method is called to clean up. It should close the connection when called by the application.- Specified by:
disconnect
in interfaceAppLinkBase
-
isDisconnected
public boolean isDisconnected()
- Specified by:
isDisconnected
in interfaceAppLinkBase
-
getConsumeRTF
public int getConsumeRTF()
Description copied from interface:AppOwner
An Application Consumer Owner must supply an indicator of the consumed real-time mode handling format. The following values are allowed: -1: Application default 0: Modeless 1: Zero length packet==idle 3: Heartbeat 4: 32-bit run/idle header is present 5: Safety- Specified by:
getConsumeRTF
in interfaceAppOwner
- Returns:
- Consumed payload real-time mode format
-
setRealTimeMode
public void setRealTimeMode(int newMode)
Description copied from interface:AppOwner
When an application consumer decodes a packet and it provides a real-time mode indicator, the consumer must convert it to a 32-bit indicator and give it to the owner with this method.- Specified by:
setRealTimeMode
in interfaceAppOwner
- Parameters:
newMode
- Decoded or inferred 32-bit run/idle header
-
-