Class CommandResolver

java.lang.Object
com.highmobility.autoapi.CommandResolver

public class CommandResolver extends Object
  • Constructor Details

    • CommandResolver

      public CommandResolver()
  • Method Details

    • resolve

      public static Command resolve(com.highmobility.value.Bytes bytes)
      Try to parse the command bytes to a more specific Command subclass. Check the returned object's instance type (instanceOf) to understand which command was received.
      Parameters:
      bytes - the raw command bytes.
      Returns:
      The parsed command.
    • resolve

      public static Command resolve(byte[] bytes)
      Try to parse the command bytes to a more specific Command subclass. Check the returned object's instance type (instanceOf) to understand which command was received.
      Parameters:
      bytes - the raw command bytes.
      Returns:
      The parsed command.
    • resolveBase64

      public static Command resolveBase64(String base64)
      Try to parse the command bytes to a more specific Command subclass. Check the returned object's instance type (instanceOf) to understand which command was received.
      Parameters:
      base64 - the raw command bytes in base64.
      Returns:
      The parsed command.
    • resolveHex

      public static Command resolveHex(String hexBytes)
      Try to parse the command bytes to a more specific Command subclass. Check the returned object's instance type (instanceOf) to understand which command was received.
      Parameters:
      hexBytes - the raw command bytes in hex.
      Returns:
      The parsed command.
    • resolve

      public static Command resolve(String value)
      Try to parse the command bytes to a more specific Command subclass. Check the returned object's instance type (instanceOf) to understand which command was received.
      Parameters:
      value - the raw command bytes in hex or base64.
      Returns:
      The parsed command.
    • setRuntime

      public static void setRuntime(CommandResolver.RunTime runtime)
      Deprecated.
      Override the runtime.

      Some commands are disabled in Android/Desktop environments. Use this method to override the runtime.

      Parameters:
      runtime - The runtime.
    • setEnvironment

      public static void setEnvironment(CommandResolver.Environment environment)
      Override the environment.

      Some commands are disabled when using the AutoAPI as the vehicle owner or as the vehicle. This method can be used to override the default CommandResolver.Environment.OWNER environment.

      Parameters:
      environment - The environment.