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. For conceptual guidance, see SRP Protocol Command.

Python binding

This C++ class is also exported into Python as rogue.protocols.srp.Cmd.

Python API page: - Cmd

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

typedef std::shared_ptr<rogue::protocols::srp::Cmd> rogue::protocols::srp::CmdPtr
[header]

The class description is shown below:

class Cmd : public rogue::interfaces::stream::Master
[header]

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()
[header] [impl]

Constructs an SRP command interface.

Creator with version constant.

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

~Cmd()
[header] [impl]

Destroys the SRP command interface.

Deconstructor.

void sendCmd(uint8_t opCode, uint32_t context)
[header] [impl]

Sends an SRP command frame.

Post a transaction.

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()
[header] [impl]

Creates an SRP command interface instance.

Class creation.

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.

Company : SLAC National Accelerator Laboratory

Description : CMD protocol bridge, 0

This file is part of the rogue software platform. It is subject to the license terms in the LICENSE.txt file found in the top-level directory of this distribution and at: https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. No part of the rogue software platform, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the LICENSE.txt file.

Returns:

Shared pointer to the created Cmd.

static void setup_python()
[header] [impl]

Registers Python bindings for this class.

Setup class in python.