- 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: int | None = None, v_r: int | None = None)¶
Initialize COP1.
- Parameters:
type – One of
WITH_CLCW_CHECK,WITHOUT_CLCW_CHECK,UNLOCKorSET_VRclcw_wait_timeout – timeout in seconds used for the reception of CLCW. Required if type is
WITH_CLCW_CHECKv_r – value of v(R) if type is set to
SET_VR
- resume_cop1()¶
Resume COP1.
- run_action(action: str, message: Mapping[str, Any] | None = 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)
- sdls_get_ctr(spi: int) → int¶
Get the sequence counter associated with a given spi (Security Parameter Index) on this link.
- sdls_set_ctr(spi: int, new_seq: int)¶
Set the sequence counter associated with a given spi (Security Parameter Index) on this link to new_seq.
- sdls_set_key(spi: int, key: bytes)¶
Update the key associated with a given spi (Security Parameter Index) on this link.
- class yamcs.client.Cop1Subscription(manager)¶
Bases:
WebSocketSubscriptionFutureLocal object providing access to COP1 status updates.
Initializes the future. Should not be called by clients.
- get_status() → Cop1Status | None¶
Returns the latest known COP1 status.