pub enum Commands {
Load {
command: LoadSubcommand,
},
Set {
attribute: String,
value: String,
},
Status,
Remove {
command: RemoveSubcommand,
},
}Expand description
Top-level commands supported by the CLI.
This enum represents all the primary operations available through the fpgad CLI:
- Load: Load bitstreams or device tree overlays onto the FPGA
- Set: Configure FPGA attributes and flags (e.g., programming flags)
- Status: Query the current state of FPGA devices and loaded overlays
- Remove: Unload bitstreams or device tree overlays from the FPGA
Each command communicates with the fpgad daemon via DBus to perform privileged operations on FPGA devices managed through the Linux kernel’s FPGA subsystem.
§Examples
# Load a bitstream to a specific device
fpgad --device=fpga0 load bitstream /lib/firmware/design.bit.bin
# Load an overlay with platform override
fpgad --platform=universal load overlay /lib/firmware/overlay.dtbo --name=my_overlay
# Set flags for a device
fpgad --device=fpga0 set flags 0
# Get status for all devices
fpgad status
# Remove an overlay by name
fpgad remove overlay --name=my_overlayVariants§
Load
Load a bitstream or an overlay for the given device handle
Fields
§
command: LoadSubcommandSet
Set an option (e.g. flags) to a specific value for a given device handle
Status
Get the status information for the given device handle
Remove
Remove bitstream or an overlay
Fields
§
command: RemoveSubcommandTrait Implementations§
Source§impl FromArgMatches for Commands
impl FromArgMatches for Commands
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Source§impl Subcommand for Commands
impl Subcommand for Commands
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Append to
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Test whether
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for Commands
impl RefUnwindSafe for Commands
impl Send for Commands
impl Sync for Commands
impl Unpin for Commands
impl UnsafeUnpin for Commands
impl UnwindSafe for Commands
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more