/  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, instance, link)

Client object that groups operations for a specific link.

create_cop1_subscription(on_data, timeout=60)

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 (Optional[Callable[Cop1Status])) – Function that gets called on each Cop1Status.

  • timeout (Optional[float]) – The amount of seconds to wait for the request to complete.

Returns

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

Return type

Cop1Subscription

disable_cop1(bypass_all=True)

Disable COP1 for a data link.

Parameters

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

Disables this link.

Enables this link.

get_cop1_config()

Gets the COP1 configuration for a data link.

Return type

Cop1Config

get_cop1_status()

Retrieve the COP1 status.

Return type

Cop1Status

get_info()

Get info on this link.

Return type

Link

initialize_cop1(type, clcw_wait_timeout=None, v_r=None)

Initialize COP1.

Parameters
  • type (str) – One of WITH_CLCW_CHECK, WITHOUT_CLCW_CHECK, UNLOCK or SET_VR

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

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

resume_cop1()

Resume COP1.

update_cop1_config(window_width=None, timeout_type=None, tx_limit=None, t1=None)

Sets the COP1 configuration for a data link.

Return type

Cop1Config

class yamcs.link.client.Cop1Subscription(manager)

Bases: yamcs.core.futures.WebSocketSubscriptionFuture

Local object providing access to COP1 status updates.

Initializes the future. Should not be called by clients.

property bypass_all
property cop1_active
get_status()

Returns the latest known COP1 status.

Return type

Cop1Status

property nn_r
property state
property v_s