Command to request the vehicle capabilities. The car will respond with the Capabilities command that manifests all different APIs that are enabled on the specific car. It is good practice to only inspect the vehicle capabilities the first time when access is gained. The capabilities are fixed for each car type and will not change between every session unless the user meanwhile receives new permissions (requires a whole new certificate).
Command sent when a Get Capabilities command is received by the car.
Response received will be resolved into Capabilities() object. Capabilities that are available for the vehicle.
# send get capabilities command to Vehicle constructed_bytes = get_capabilities.GetCapabilities().get_bytearray() hmkit.bluetooth.link.sendcommand(constructed_bytes) # To check get DoorLock capability of the vehicle # in Link_Listener Class def command_incoming(self, link, cmd): cmd_obj = CommandResolver.resolve(cmd) if isinstance(cmd_obj, capabilities.Capabilities): print("Capabilities Command received (resolved to Class capabilities.Capabilities())") # Example: Capability Checks doorlock_capability = cmd_obj.get_capability(Identifiers.DOOR_LOCKS) if doorlock_capability is not None: is_sup = doorlock_capability.is_supported(msg_type.MsgType(Identifiers.DOOR_LOCKS,0x00)) print("App: get doorlocks() capability is_sup: " + str(is_sup))
list of properties.capability.Capability
Get all of the Capabilities that are available for the vehicle.
Get the capability for a specific command type.