Package com.automation_pros.odva.encap
Class EncapData
- java.lang.Object
-
- com.automation_pros.odva.encap.Encap
-
- com.automation_pros.odva.encap.EncapList
-
- com.automation_pros.odva.encap.EncapData
-
- All Implemented Interfaces:
CpfWrapper
public class EncapData extends EncapList
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EncapData.Decoder
Decode bytes expected to contain one encapsulated Ethernet/IP packet-
Nested classes/interfaces inherited from class com.automation_pros.odva.encap.Encap
Encap.EncapException
-
-
Field Summary
Fields Modifier and Type Field Description protected int
interfaceHandle
protected short
timeout
-
Fields inherited from class com.automation_pros.odva.encap.EncapList
expectedItems, items
-
Fields inherited from class com.automation_pros.odva.encap.Encap
CMD_CANCEL, CMD_LIST_ID, CMD_LIST_IFACE, CMD_LIST_SVC, CMD_LIST_TARG, CMD_NOP, CMD_REGISTER, CMD_SEND_RR, CMD_SEND_UNIT, CMD_STATUS, CMD_UNREGISTER, command, context, decodeTS, extralen, options, session, ST_EBUSY, ST_ECMD, ST_EDATA, ST_ELENGTH, ST_EPERM, ST_EREVISION, ST_ESESSION, ST_SUCCESS, status
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
EncapData()
EncapData(short cmd, int sess, int stat, int opt, int ifchnd, short timeout, CommonPacketFormat... cpfitems)
EncapData(short cmd, int sess, int stat, int opt, int ifchnd, short timeout, java.util.List<CommonPacketFormat> cpfitems)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CpfAddress
getAddressItem()
Obtain the packet's Address CPF item, if present and in the first position.DataCPF
getDataItem()
Obtain the packet's Data CPF item, if present and in the first or second position.int
getExtralen()
int
getInterfaceHandle()
java.net.InetSocketAddress
getO2Tsocket()
java.net.InetSocketAddress
getT2Osocket()
short
getTimeout()
boolean
isValid()
void
putPayload(java.nio.ByteBuffer dest)
void
setInterfaceHandle(int interfaceHandle)
void
setPayload(java.nio.ByteBuffer source)
void
setTimeout(short timeout)
java.lang.String
toString()
-
Methods inherited from class com.automation_pros.odva.encap.EncapList
add, getItem, getItemCount, getItems, setItems
-
Methods inherited from class com.automation_pros.odva.encap.Encap
decode, decode, getCommand, getContext, getError, getOptions, getSession, getStatus, putBytes, registerDecoder, setBytes, setContext, setError, setSession, setStatus, writeBytes, writePayload
-
-
-
-
Constructor Detail
-
EncapData
protected EncapData()
-
EncapData
public EncapData(short cmd, int sess, int stat, int opt, int ifchnd, short timeout, CommonPacketFormat... cpfitems)
-
EncapData
public EncapData(short cmd, int sess, int stat, int opt, int ifchnd, short timeout, java.util.List<CommonPacketFormat> cpfitems)
-
-
Method Detail
-
getExtralen
public int getExtralen()
- Overrides:
getExtralen
in classEncapList
-
putPayload
public void putPayload(java.nio.ByteBuffer dest)
- Overrides:
putPayload
in classEncapList
-
setPayload
public void setPayload(java.nio.ByteBuffer source)
- Overrides:
setPayload
in classEncapList
-
getInterfaceHandle
public int getInterfaceHandle()
-
setInterfaceHandle
public void setInterfaceHandle(int interfaceHandle)
-
getTimeout
public short getTimeout()
-
setTimeout
public void setTimeout(short timeout)
-
getAddressItem
public CpfAddress getAddressItem()
Description copied from interface:CpfWrapper
Obtain the packet's Address CPF item, if present and in the first position.- Specified by:
getAddressItem
in interfaceCpfWrapper
- Overrides:
getAddressItem
in classEncap
- Returns:
-
getDataItem
public DataCPF getDataItem()
Description copied from interface:CpfWrapper
Obtain the packet's Data CPF item, if present and in the first or second position.- Specified by:
getDataItem
in interfaceCpfWrapper
- Overrides:
getDataItem
in classEncap
- Returns:
-
getT2Osocket
public java.net.InetSocketAddress getT2Osocket()
-
getO2Tsocket
public java.net.InetSocketAddress getO2Tsocket()
-
-