Class RecvLmcServiceHandler

Inheritance Relationships

Base Type

Class Documentation

class RecvLmcServiceHandler : public ska::pst::common::LmcServiceHandler

Class to act as a bridge between the local monitoring and control service and a.

See also

ska::pst::recv::Receiver that controls of PST RECV.CORE.

Public Functions

inline RecvLmcServiceHandler(std::shared_ptr<ska::pst::recv::Receiver> recv)

Constructor for the LMC service handler.

Parameters

recv – a Receiver that the service is acting as a bridge for.

virtual ~RecvLmcServiceHandler() = default
virtual void validate_beam_configuration(const ska::pst::lmc::BeamConfiguration &configuration) override

Validate a beam configuration.

Validate a beam configuration for correctness but does not apply the configuration.

Throws
  • std::exception – if there is a problem with the beam configuration of the service.

  • ska::pst::common::pst_validation_error – if there are validation errors in the request.

virtual void validate_scan_configuration(const ska::pst::lmc::ScanConfiguration &configuration) override

Validate a scan configuration.

Validate a scan configuration for correctness but does not apply the configuration.

Throws
  • std::exception – if there is a problem with the beam configuration of the service.

  • ska::pst::common::pst_validation_error – if there are validation errors in the request.

virtual void configure_beam(const ska::pst::lmc::BeamConfiguration &configuration) override

Handle configuring the service to be a part of a beam.

This implementation expects that there is an receive sub-field in the beam configuration request. It takes the beam configuration and creates a

See also

ska::pst::common::AsciiHeader and then calls configure_beam method on the Recevier with the config header.

Parameters

configuration – the configuration for the beam. This message has oneof field should be the receive sub-field message.

virtual void deconfigure_beam() override

Handle deconfiguring the service from a beam.

This will attempt to release and destroy the beam resources that had already been configured, such as disconnecting from the data and weights ring buffers. This implementation proxies the request through to the Receiver.

virtual void get_beam_configuration(ska::pst::lmc::BeamConfiguration *resources) override

Handle getting the current beam configuration for the service.

This will return the current beam configuration used for the RECV pipeline.

inline virtual bool is_beam_configured() const noexcept override

Check if beam configured to this service.

Will return true if the

See also

Receiver has beam configuration.

virtual void configure_scan(const ska::pst::lmc::ScanConfiguration &configuration) override

Handle configuring the service for a scan.

This will configure the Receiver for a scan. The implementation expects that there is a receive sub-field and will map the scan configuration data to an

See also

ska::pst::common::AsciiHeader config object and send that to the Receiver to do the actual configuration.

virtual void deconfigure_scan() override

Handle deconfiguring service for a scan.

This will proxy the request through to the Receiver to reset the receiver’s configuration. This Receiver will still have the allocated resources but it won’t have the scan specific configuration.

virtual void get_scan_configuration(ska::pst::lmc::ScanConfiguration *configuration) override

Handle getting the current scan configuration for the service.

This will map the current scan configuration, of the Receiver, to the receive sub-field message

See also

ska::pst::lmc::ReceiveScanConfiguration.

inline virtual bool is_scan_configured() const noexcept override

Check if the service has been configured for a scan.

Returns

This will return true if there had been a call to configure.

virtual void start_scan(const ska::pst::lmc::StartScanRequest &request) override

Handle initiating a scan.

This will initiate a scan on the Receiver, which in turns will start processing the data coming on the configured UDP listener.

virtual void stop_scan() override

Handle ending a scan.

This will mark the application as not scanning. The implementation will stop the Receiver from scanning.

virtual void reset() override

Handle resetting State into Idle.

This ties the states between LmcService ObsState::EMPTY with ApplicationManager State::Idle

inline virtual bool is_scanning() const noexcept override

Check if the service is currenting performing a scan.

virtual void get_monitor_data(ska::pst::lmc::MonitorData *data) override

Handle getting the monitoring data for the service.

This will get the current monitoring data for Receiver, including the amount of data received, the instantaneous rate of data being received, and the number of malformed packets. It is only valid to call this if the handler is currently scanning.

Parameters

data – Pointer to the protobuf message to return. Implementations should get mutable references to the sub-field they are responding to and update that message.

Throws

std::exception – if there is a validation issue or problem with configuring beam.

virtual void get_env(ska::pst::lmc::GetEnvironmentResponse *response) noexcept override

Return environment variables back to the client.

This implementation returns the data_host, as a string, of the Receiver back to the client. The data_host is returned due to the fact that the client may not know what the IP address is of the network interface controller that data is expected to be received on. In the case of SKA, the PST.LMC will expose this value back to the CSP-LMC that can then send the data to CBF.

Parameters

data – Pointer to a protobuf message message that includes the a map to populate.

inline virtual ska::pst::common::State get_application_manager_state() override

Get the UDPReceiveDB state.

Returns

ska::pst::common::State returns current the enum State of the UDPReceiveDB

inline virtual std::exception_ptr get_application_manager_exception() override

Get the UDPReceiveDB exception pointer.

Returns

std::exception_ptr returns the current captured exception caught by the UDPReceiveDB

virtual void go_to_runtime_error(std::exception_ptr exc) override

Put application into a runtime error state.

Parameters

exception – an exception pointer to store on the application manager.