Package com.mouseviator.fsuipc.helpers

# Class LVarHelper.LVarParamRequest

java.lang.Object
com.mouseviator.fsuipc.datarequest.DataRequest
com.mouseviator.fsuipc.helpers.LVarHelper.LVarParamRequest

All Implemented Interfaces:
  `IDataRequest<java.lang.Integer>`, `IWriteOnlyRequest<java.lang.Integer>`

Enclosing class:
  LVarHelper

    public static class LVarHelper.LVarParamRequest
    extends DataRequest
    implements IWriteOnlyRequest<java.lang.Integer>

This class implements Lvar parameter request. It is an Integer type request, with offset 0x0D6C and is WRITE type. The 0x0D6C offset is being used a parameter for FSUIPC Lvar read/write/create operations (requests). The value of this request is expected to be the another offset. When we want to read LVar value, it is the offset at which we want FSUIPC to store the LVar value for us. If we are writing/creating Lvar, it is the offset at which FSUIPC will find out the value to write to the LVar / init the new Lvar with. The offset value is just the low 2 bytes if integer. The high 2 bytes specifies the format. There are predefined formats in the `LVarHelper.LVarValueFormat` enumeration. You can get the correct value to place in this request for your combination of offset and format, when you just add the value from the enumeration to the offset. Like this:

     //we will read LVar and want FSUIPC to store it at offset 0x66C0 as float.

     LVarParamRequest paramRequest = new LVarParamRequest(LVarValueFormat.FLOAT.getValue() + 0x66C0);

- ## 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
  --- | ---
  `LVarParamRequest​(java.lang.Integer value)` | Creates a new LVar parameter request with initial value.

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `void` | `setValue​(java.lang.Integer value)` | Sets the LVar parameter value.

  ### 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

  - ### LVarParamRequest

    public LVarParamRequest​(java.lang.Integer value)
    Creates a new LVar parameter request with initial value. Usually an offset and format at which to find the read value or the value to write/init new LVar with combined with value format. Read the description of this class for more info.
    Parameters:
      `value` - LVar parameter value.

- ## Method Details

  - ### setValue

    public void setValue​(java.lang.Integer value)
    Sets the LVar parameter value. Usually an offset and format at which to find the read value or the value to write/init new LVar with combined with value format. Read the description of this class for more info.
    Specified by:
      `setValue` in interface `IDataRequest<java.lang.Integer>`
    Parameters:
      `value` - The LVar parameter value.