/  Python Yamcs Client  /  Link Management  /  Client

Client

Note

LinkClient instances are usually created via YamcsClient.get_link():

from yamcs.client import YamcsClient

client = YamcsClient('localhost:8090')
link = client.get_link(instance='simulator', link='udp-in')
# ...
class yamcs.link.client.LinkClient(ctx: Context, instance: str, link: str)

Client object that groups operations for a specific link.

create_cop1_subscription(on_data: Callable[[Cop1Status], None], timeout: float = 60) Cop1Subscription

Create a new subscription for receiving status of the COP1 link.

This method returns a future, then returns immediately. Stop the subscription by canceling the future.

Parameters:
  • on_data – Function that gets called on each Cop1Status.

  • timeout – The amount of seconds to wait for the request to complete.

Returns:

Future that can be used to manage the background websocket subscription.

disable_cop1(bypass_all: bool = True)

Disable COP1 for a data link.

Parameters:

bypass_all – All frames have bypass activated (i.e. they will be BD frames)

Disables this link.

Enables this link.

get_cop1_config() Cop1Config

Gets the COP1 configuration for a data link.

get_cop1_status() Cop1Status

Retrieve the COP1 status.

get_info() Link

Get info on this link.

initialize_cop1(type: str, clcw_wait_timeout: Optional[int] = None, v_r: Optional[int] = None)

Initialize COP1.

Parameters:
  • type – One of WITH_CLCW_CHECK, WITHOUT_CLCW_CHECK, UNLOCK or SET_VR

  • clcw_wait_timeout – timeout in seconds used for the reception of CLCW. Required if type is WITH_CLCW_CHECK

  • v_r – value of v(R) if type is set to SET_VR

resume_cop1()

Resume COP1.

run_action(action: str, message: Optional[Mapping[str, Any]] = None) Dict[str, Any]

Runs the given action for this link

Parameters:
  • action – action identifier

  • message – action message

Returns:

Action result (if the action returns anything)

update_cop1_config(window_width: Optional[int] = None, timeout_type: Optional[str] = None, tx_limit: Optional[int] = None, t1: Optional[float] = None) Cop1Config

Sets the COP1 configuration for a data link.

class yamcs.link.client.Cop1Subscription(manager)

Bases: WebSocketSubscriptionFuture

Local object providing access to COP1 status updates.

Initializes the future. Should not be called by clients.

property bypass_all: Optional[bool]
property cop1_active: Optional[bool]
get_status() Optional[Cop1Status]

Returns the latest known COP1 status.

property nn_r: Optional[int]
property state: Optional[str]
property v_s: Optional[int]