Skip to main content

WcpCommand

Enum WcpCommand 

Source
pub enum WcpCommand {
Show 17 variants get_item_list, get_item_info { ids: Vec<DisplayedItemRef>, }, set_item_color { id: DisplayedItemRef, color: String, }, add_variables { variables: Vec<String>, }, add_scope { scope: String, recursive: bool, }, add_items { items: Vec<String>, recursive: bool, }, add_markers { markers: Vec<MarkerInfo>, }, reload, set_viewport_to { timestamp: BigInt, }, set_viewport_range { start: BigInt, end: BigInt, }, remove_items { ids: Vec<DisplayedItemRef>, }, focus_item { id: DisplayedItemRef, }, clear, load { source: String, }, zoom_to_fit { viewport_idx: usize, }, set_cursor { timestamp: BigInt, }, shutdown,
}

Variants§

§

get_item_list

Responds with WcpResponse::get_item_list which contains a list of the items in the currently loaded waveforms

§

get_item_info

Responds with WcpResponse::get_item_info which contains information about each item specified in ids in the same order as in the ids array. Responds with an error if any of the specified IDs are not items in the currently loaded waveform.

§

set_item_color

Changes the color of the specified item to the specified color. Responds with WcpResponse::ack Responds with an error if the id does not exist in the currently loaded waveform.

§

add_variables

Adds the specified variables to the view. Responds with WcpResponse::add_variables which contains a list of the item references that can be used to reference the added items later Responds with an error if no waveforms are loaded

Fields

§variables: Vec<String>
§

add_scope

Adds all variables in the specified scope to the view. Does so recursively if specified Responds with WcpResponse::add_variables which contains a list of the item references that can be used to reference the added items later Responds with an error if no waveforms are loaded

Fields

§scope: String
§recursive: bool
§

add_items

Adds the specified variables or variables in the specified scopes to the view. Does so recursively if specified Responds with WcpResponse::add_items which contains a list of the item references that can be used to reference the added items later Responds with an error if no waveforms are loaded

Fields

§items: Vec<String>
§recursive: bool
§

add_markers

Adds the specified markers to the view. Responds with WcpResponse::add_markers which contains a list of the item references that can be used to reference the added items later Responds with an error if no waveforms are loaded

Fields

§markers: Vec<MarkerInfo>
§

reload

Reloads the waveform from disk if this is possible for the current waveform format. If it is not possible, this has no effect. Responds instantly with WcpResponse::ack Once the waveforms have been loaded, a separate event is triggered

§

set_viewport_to

Moves the viewport to center it on the specified timestamp. Does not affect the zoom level. Responds with WcpResponse::ack

Fields

§timestamp: BigInt
§

set_viewport_range

Moves the viewport to center it on the specified timestamps range. Does affect the zoom level. Responds with WcpResponse::ack

Fields

§start: BigInt
§

remove_items

Removes the specified items from the view. Responds with WcpResponse::ack Does not error if some of the IDs do not exist

§

focus_item

Sets the specified ID as the focused item. Responds with WcpResponse::ack Responds with an error if no waveforms are loaded or if the item reference does not exist

§

clear

Removes all currently displayed items Responds with WcpResponse::ack

§

load

Loads a waveform from the specified file. Responds instantly with WcpResponse::ack Once the file is loaded, a WcpEvent::waveforms_loaded is emitted.

Fields

§source: String
§

zoom_to_fit

Zooms out fully to fit the whole waveform in the view Responds instantly with WcpResponse::ack

Fields

§viewport_idx: usize
§

set_cursor

Set the cursor to the given time. Responds instantly with WcpResponse::ack

Fields

§timestamp: BigInt
§

shutdown

Shut down the WCP server.

Trait Implementations§

Source§

impl Debug for WcpCommand

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for WcpCommand

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for WcpCommand

Source§

fn eq(&self, other: &WcpCommand) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for WcpCommand

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for WcpCommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,