Interface IDataRequest<DataType>
- Type Parameters:
DataType
- The data type of this data request, such as Byte, Short...
- All Known Subinterfaces:
IReadOnlyRequest<DataType>
,IWriteOnlyRequest<DataType>
- All Known Implementing Classes:
ByteArrayRequest
,ByteRequest
,DoubleRequest
,FloatRequest
,FSControlRequest
,IntRequest
,LongRequest
,LuaHelper.LuaControlRequest
,LuaHelper.LuaParamRequest
,LVarHelper.ByteLVarReadRequest
,LVarHelper.ByteLVarWriteRequest
,LVarHelper.DoubleLVarReadRequest
,LVarHelper.DoubleLVarWriteRequest
,LVarHelper.FloatLVarReadRequest
,LVarHelper.FloatLVarWriteRequest
,LVarHelper.IntegerLVarReadRequest
,LVarHelper.IntegerLVarWriteRequest
,LVarHelper.LVarControlRequest
,LVarHelper.LVarParamRequest
,LVarHelper.ShortLVarReadRequest
,LVarHelper.ShortLVarWriteRequest
,MacroHelper.MacroExecuteRequest
,MacroHelper.MacroParamRequest
,ShortRequest
,StringRequest
public interface IDataRequest<DataType>
This interface is used by many functions in
FSUIPC
class. Every data request that should be supported by the FSUIPC class must implement this interface.
It provides basic functions that are common for all data requests no matter the data (data type) they hold internally. See also the DataRequest
abstract class,
which provides many default functions useful when implementing data request.- Author:
- Mouseviator
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
IDataRequest.RequestType
This enumeration defines the possible types of data request. -
Method Summary
Modifier and Type Method Description byte[]
getDataBuffer()
Returns the actual byte buffer that holds the request data.int
getOffset()
Returns the offset the data request is associated with.int
getSize()
Returns the size of the byte buffer holding this request data.IDataRequest.RequestType
getType()
Returns the type of this data request (Whether READ or WRITE).DataType
getValue()
Returns the value stored within this data request byte data buffer.void
setOffset(int offset)
Sets the offset this data request is associated with.void
setType(IDataRequest.RequestType type)
Sets the type of this data request.void
setValue(DataType value)
Sets the value to be stored in the byte data buffer of this data request.
-
Method Details
-
getDataBuffer
byte[] getDataBuffer()Returns the actual byte buffer that holds the request data.- Returns:
- Byte array.
-
getOffset
int getOffset()Returns the offset the data request is associated with.- Returns:
- The offset.
-
getSize
int getSize()Returns the size of the byte buffer holding this request data.- Returns:
- Size of the byte data buffer.
-
setOffset
void setOffset(int offset)Sets the offset this data request is associated with.- Parameters:
offset
- The offset.
-
getValue
DataType getValue()Returns the value stored within this data request byte data buffer.- Returns:
- The value stored within this data request.
-
setValue
Sets the value to be stored in the byte data buffer of this data request.- Parameters:
value
- The value to store.
-
getType
IDataRequest.RequestType getType()Returns the type of this data request (Whether READ or WRITE).- Returns:
- Type of this data request.
-
setType
Sets the type of this data request.- Parameters:
type
- Data request type.
-