importabcimportloggingimporttypingasTfrom.modelsimportAPIPath,DiscoveredDeviceInfoDeviceType=T.TypeVar("DeviceType",bound="DeviceBase")"""Type annotation for concrete sub-classes of :py:class:`DeviceBase<pupil_labs.realtime_api.base.DeviceBase>`."""
[docs]classDeviceBase(abc.ABC):"""Abstract base class representing Realtime API host devices"""def__init__(self,address:str,port:int,full_name:T.Optional[str]=None,dns_name:T.Optional[str]=None,suppress_decoding_warnings:bool=True,):self.address:str=address"""REST API server address"""self.port:int=port"""REST API server port"""self.full_name:T.Optional[str]=full_name"""Full service discovery name"""self.dns_name:T.Optional[str]=dns_name"""REST API server DNS name, e.g. ``pi.local.``"""ifsuppress_decoding_warnings:# suppress decoding warnings due to incomplete data transmissionslogging.getLogger("libav.h264").setLevel(logging.CRITICAL)logging.getLogger("libav.swscaler").setLevel(logging.ERROR)