Package com.highmobility.autoapi
Class CommandResolver
java.lang.Object
com.highmobility.autoapi.CommandResolver
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe possible environments of the AutoAPI package user.static enumDeprecated.protected static classThe purpose of this iterator is to loop the possible setters. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Commandresolve(byte[] bytes) Try to parse the command bytes to a more specific Command subclass.static Commandresolve(com.highmobility.value.Bytes bytes) Try to parse the command bytes to a more specific Command subclass.static CommandTry to parse the command bytes to a more specific Command subclass.static CommandresolveBase64(String base64) Try to parse the command bytes to a more specific Command subclass.static CommandresolveHex(String hexBytes) Try to parse the command bytes to a more specific Command subclass.static voidsetEnvironment(CommandResolver.Environment environment) Override the environment.static voidsetRuntime(CommandResolver.RunTime runtime) Deprecated.useCommandResolver.Environmentinstead
-
Constructor Details
-
CommandResolver
public CommandResolver()
-
-
Method Details
-
resolve
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
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
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
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
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
Deprecated.useCommandResolver.EnvironmentinsteadOverride the runtime.Some commands are disabled in Android/Desktop environments. Use this method to override the runtime.
- Parameters:
runtime- The runtime.
-
setEnvironment
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.OWNERenvironment.- Parameters:
environment- The environment.
-
CommandResolver.Environmentinstead