Class ChannelArrayRequestImpl
- java.lang.Object
-
- org.epics.pvaccess.client.impl.remote.BaseRequestImpl
-
- org.epics.pvaccess.client.impl.remote.ChannelArrayRequestImpl
-
- All Implemented Interfaces:
ChannelArray,ChannelRequest,Lockable,DataResponse,ResponseRequest,SubscriptionRequest,TransportSender,org.epics.pvdata.misc.Destroyable
public class ChannelArrayRequestImpl extends BaseRequestImpl implements ChannelArray
PVA get request.- Version:
- $Id$
- Author:
- Matej Sekoranja
-
-
Field Summary
Fields Modifier and Type Field Description protected ChannelArrayRequestercallbackResponse callback listener.protected intcountprotected org.epics.pvdata.pv.PVArraydataprotected intlengthprotected intoffsetprotected org.epics.pvdata.pv.PVArrayputDataprotected intstride-
Fields inherited from class org.epics.pvaccess.client.impl.remote.BaseRequestImpl
channel, channelDestroyed, channelNotConnected, context, destroyed, destroyedStatus, invalidBitSetLengthStatus, invalidPutArrayStatus, invalidPutStructureStatus, ioid, lastRequest, lock, NULL_REQUEST, okStatus, otherRequestPendingStatus, pendingRequest, PURE_CANCEL_REQUEST, PURE_DESTROY_REQUEST, pvDataCreate, pvRequest, remotelyDestroyed, requester, statusCreate, subscribed
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedChannelArrayRequestImpl(ChannelImpl channel, ChannelArrayRequester callback, org.epics.pvdata.pv.PVStructure pvRequest)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidactivate()static ChannelArrayRequestImplcreate(ChannelImpl channel, ChannelArrayRequester callback, org.epics.pvdata.pv.PVStructure pvRequest)voidgetArray(int offset, int count, int stride)get from the remote array.voidgetLength()Get the length and the capacity.voidputArray(org.epics.pvdata.pv.PVArray putArray, int offset, int count, int stride)put to the remote array.voidsend(ByteBuffer buffer, TransportSendControl control)Called by transport.voidsetLength(int length)Set the length and/or the capacity.-
Methods inherited from class org.epics.pvaccess.client.impl.remote.BaseRequestImpl
cancel, createBitSetFor, destroy, destroy, getChannel, getIOID, getPendingRequest, getRequester, lastRequest, lock, reportStatus, response, resubscribeSubscription, reuseOrCreatePVField, startRequest, stopRequest, timeout, unlock, updateSubscription
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.epics.pvaccess.client.ChannelRequest
cancel, getChannel, lastRequest
-
-
-
-
Field Detail
-
callback
protected final ChannelArrayRequester callback
Response callback listener.
-
data
protected org.epics.pvdata.pv.PVArray data
-
putData
protected org.epics.pvdata.pv.PVArray putData
-
offset
protected int offset
-
count
protected int count
-
stride
protected int stride
-
length
protected int length
-
-
Constructor Detail
-
ChannelArrayRequestImpl
protected ChannelArrayRequestImpl(ChannelImpl channel, ChannelArrayRequester callback, org.epics.pvdata.pv.PVStructure pvRequest)
-
-
Method Detail
-
create
public static ChannelArrayRequestImpl create(ChannelImpl channel, ChannelArrayRequester callback, org.epics.pvdata.pv.PVStructure pvRequest)
-
activate
protected void activate()
- Overrides:
activatein classBaseRequestImpl
-
send
public void send(ByteBuffer buffer, TransportSendControl control)
Description copied from interface:TransportSenderCalled by transport. By this call transport gives callee ownership over the buffer. Calls onTransportSendControlinstance must be made from calling thread. Moreover, ownership is valid only for the time of call of this method. NOTE: these limitations allow efficient implementation.- Specified by:
sendin interfaceTransportSender- Overrides:
sendin classBaseRequestImpl- Parameters:
buffer- buffer to send.control- transport send control instance.
-
getArray
public void getArray(int offset, int count, int stride)Description copied from interface:ChannelArrayget from the remote array.- Specified by:
getArrayin interfaceChannelArray- Parameters:
offset- The offset in the remote array, i.e. the PVArray returned by ChannelArrayRequester.channelArrayConnect.count- The number of elements to get, 0 means "till the end of array".stride- 1 means all the elements from offset to count, 2 means every other, 3 means every third, etc.
-
putArray
public void putArray(org.epics.pvdata.pv.PVArray putArray, int offset, int count, int stride)Description copied from interface:ChannelArrayput to the remote array.- Specified by:
putArrayin interfaceChannelArray- Parameters:
putArray- array to put.offset- The offset in the remote array, i.e. the PVArray returned by ChannelArrayRequester.channelArrayConnect.count- The number of elements to put, 0 means "entire array".stride- 1 means all the elements from offset to count, 2 means every other, 3 means every third, etc.
-
setLength
public void setLength(int length)
Description copied from interface:ChannelArraySet the length and/or the capacity.- Specified by:
setLengthin interfaceChannelArray- Parameters:
length- The new length.
-
getLength
public void getLength()
Description copied from interface:ChannelArrayGet the length and the capacity.- Specified by:
getLengthin interfaceChannelArray
-
-