- General Client
- Mission Database
- TM/TC Processing
- Archive
- Link Management
- Object Storage
- File Transfer
- Time Correlation (TCO)
- Timeline
- Examples
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.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)
- disable_link()¶
Disables this link.
- enable_link()¶
Enables this link.
- get_cop1_config() → Cop1Config¶
Gets the COP1 configuration for a data link.
- get_cop1_status() → Cop1Status¶
Retrieve the COP1 status.
- 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
orSET_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.
- class yamcs.client.Cop1Subscription(manager)¶
Bases:
WebSocketSubscriptionFuture
Local object providing access to COP1 status updates.
Initializes the future. Should not be called by clients.
- get_status() → Optional[Cop1Status]¶
Returns the latest known COP1 status.