Cmd

rogue::protocols::srp::Cmd transmits lightweight opcode/context stream commands for fire-and-forget control paths. It is not an SRP register protocol, but remains in the srp namespace for API compatibility.

Cmd objects in C++ are referenced by the following shared pointer typedef:

typedef std::shared_ptr<rogue::protocols::srp::Cmd> rogue::protocols::srp::CmdPtr

The class description is shown below:

class Cmd : public rogue::interfaces::stream::Master

Lightweight command protocol transmitter for opcode/context messages.

Cmd implements a small command protocol that carries only an opcode and a context value. It is typically used for lightweight hardware commands such as triggers, strobes, and other fire-and-forget control events.

This protocol is distinct from SRP and does not model request/response memory transactions. In common usage, frames sent by Cmd do not require a response path.

Historical note: the class resides in rogue::protocols::srp for API compatibility with existing applications. Although that namespace placement is not semantically ideal, changing it would break downstream code.

Public Functions

Cmd()

Constructs an SRP command interface.

This constructor is a low-level C++ allocation path. Prefer create() when shared ownership or Python exposure is required.

~Cmd()

Destroys the SRP command interface.

void sendCmd(uint8_t opCode, uint32_t context)

Sends an SRP command frame.

Parameters:
  • opCode – SRP command opcode.

  • context – Command context value carried in the frame.

Public Static Functions

static std::shared_ptr<rogue::protocols::srp::Cmd> create()

Creates an SRP command interface instance.

This static factory is the preferred construction path when the object is shared across Rogue graph connections or exposed to Python. It returns std::shared_ptr ownership compatible with Rogue pointer typedefs.

Returns:

Shared pointer to the created Cmd.

static void setup_python()

Registers Python bindings for this class.