blob: 7b6768cc7af15fd41f9278cbfb6742324e5adce3 [file] [log] [blame]
#!/usr/bin/env python3
#
# Copyright 2023 The Fuchsia Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import Any
from antlion.controllers.fuchsia_lib.base_lib import BaseLib
class DeviceLib(BaseLib):
def __init__(self, addr: str) -> None:
super().__init__(addr, "device")
def get_device_name(self) -> dict[str, Any]:
"""Get the device name."""
return self.send_command("device_facade.GetDeviceName", {})
def get_product_name(self) -> dict[str, Any]:
"""Get the product name."""
return self.send_command("device_facade.GetProduct", {})
def get_version(self) -> dict[str, Any]:
"""Get the device version."""
return self.send_command("device_facade.GetVersion", {})