Class FSControlRequest
java.lang.Object
com.mouseviator.fsuipc.datarequest.DataRequest
com.mouseviator.fsuipc.datarequest.advanced.FSControlRequest
- All Implemented Interfaces:
IDataRequest<java.lang.Integer>
,IWriteOnlyRequest<java.lang.Integer>
public class FSControlRequest extends DataRequest implements IWriteOnlyRequest<java.lang.Integer>
This class implements special data request to send any FS control to flight simulator. This works via the 0x3110 FSUIPC offset. You do not need to specify this offset,
it is set by default. Use the
setControl(int)
method to specify which control to send, and the setValue(java.lang.Integer)
method to set any control
parameter.- Author:
- Murdock
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.mouseviator.fsuipc.datarequest.IDataRequest
IDataRequest.RequestType
-
Field Summary
Fields inherited from class com.mouseviator.fsuipc.datarequest.DataRequest
BUFFER_LENGTH_BYTE, BUFFER_LENGTH_DOUBLE, BUFFER_LENGTH_FLOAT, BUFFER_LENGTH_INT, BUFFER_LENGTH_LONG, BUFFER_LENGTH_SHORT, dataBuffer, MAX_OFFSET_VALUE, MIN_OFFSET_VALUE, offset, type
-
Constructor Summary
Constructors Constructor Description FSControlRequest(int control)
Creates a new FS control data request associated with given FS control.FSControlRequest(int control, int value)
Creates a new FS control data request associated with given FS control. -
Method Summary
Modifier and Type Method Description void
setControl(int control)
Sets the FS control to be sent by this data request.void
setValue(java.lang.Integer value)
Sets the value to be stored in the byte data buffer of this data request.Methods inherited from class com.mouseviator.fsuipc.datarequest.DataRequest
convertStringToByteArray, copyByteArray, getDataBuffer, getDouble, getFloat, getInt, getLong, getOffset, getShort, getSize, getType, getZeroTerminatedString, putDouble, putDouble, putFloat, putFloat, putInt, putInt, putLong, putLong, putShort, putShort, setOffset, setType
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.mouseviator.fsuipc.datarequest.IDataRequest
getDataBuffer, getOffset, getSize, getType, setOffset, setType
Methods inherited from interface com.mouseviator.fsuipc.datarequest.IWriteOnlyRequest
getValue
-
Constructor Details
-
FSControlRequest
public FSControlRequest(int control)Creates a new FS control data request associated with given FS control.- Parameters:
control
- A FS control to be sent by this data request.
-
FSControlRequest
public FSControlRequest(int control, int value)Creates a new FS control data request associated with given FS control.- Parameters:
control
- A FS control to be sent by this data request.value
- A value to be sent along with the control.
-
-
Method Details
-
setControl
public void setControl(int control)Sets the FS control to be sent by this data request.- Parameters:
control
- A FS control to be sent by this data request.
-
setValue
public void setValue(java.lang.Integer value)Description copied from interface:IDataRequest
Sets the value to be stored in the byte data buffer of this data request.- Specified by:
setValue
in interfaceIDataRequest<java.lang.Integer>
- Parameters:
value
- The value to store.
-