Types

Description

Module: geocompy.gsi.gsitypes

The GSI Online types module provides type definitions and general constants, that are relevant to the GSI Online protocol.

Types

  • GsiOnlineResponse

  • GsiOnlineType

  • GsiOnlineSubsystem

Definitions

class GsiOnlineResponse(desc: str, cmd: str, response: str, value: _T | None, comment: str = '')[source]

Container class for parsed GSI Online responses.

Parameters:
desc: str

Description of the GSI Online command, that invoked this response.

cmd: str

Full, serialized command, that invoked this response.

response: str

Full, received response.

value: _T | None

Parsed response value. The content is dependent on the executed command.

comment: str = ''

Additional comment (e.g. explanation of an error).

map_value(transformer: collections.abc.Callable[[_T | None], _P | None]) GsiOnlineResponse[_P][source]

Returns a new response object with the metadata maintained, but the value transformed with the supplied function.

Parameters:
transformer: collections.abc.Callable[[_T | None], _P | None]

Function to transform the value to a new value.

Returns:

Response with transformed value.

Return type:

GeoComResponse

cmd : str[source]

Full, serialized command, that invoked this response.

comment : str[source]

Additional comment (e.g. explanation of an error).

desc : str[source]

Description of the GSI Online command, that invoked this response.

response : str[source]

Full, received response.

value : _T | None[source]

Parsed response value. The content is dependent on the executed command.

class GsiOnlineSubsystem(parent: GsiOnlineType)[source]

Base class for GSI Online subsystems.

Parameters:
parent: GsiOnlineType

The parent protocol instance of this subsystem.

class GsiOnlineType[source]

Interface definition for the GSI Online protocol handler type.

abstractmethod confrequest(param: int, parser: collections.abc.Callable[[str], _T]) GsiOnlineResponse[_T][source]
abstractmethod getrequest(mode: 'I' | 'M' | 'C', wordtype: type[_G]) GsiOnlineResponse[_G][source]
abstractmethod putrequest(word: _G) GsiOnlineResponse[bool][source]
abstractmethod request(cmd: str, desc: str = '') GsiOnlineResponse[bool][source]
abstractmethod setrequest(param: int, value: int) GsiOnlineResponse[bool][source]
abstract property is_client_gsi16 : bool[source]
param_descriptions : dict[int, str][source]

Mapping of parameter indices to short descriptions.

word_descriptions : dict[int, str][source]

Mapping of GSI word indices to short descriptions.