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);
 
  • 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.