Class SmrbLmcServiceHandler

Inheritance Relationships

Base Type

Class Documentation

class SmrbLmcServiceHandler : public ska::pst::common::LmcServiceHandler

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

Public Functions

inline SmrbLmcServiceHandler(std::shared_ptr<ska::pst::smrb::DataBlockManager> smrb)
virtual ~SmrbLmcServiceHandler() = 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 smrb sub-field in the configuration request. It takes the configuration and uses a data block manager to set up the data and weights ring buffers that can be used by the PST signal processing pipeline.

Parameters

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

virtual void deconfigure_beam() override

Handle deconfiguring the service from a beam.

This will attempt to release and destroy the created ring buffers for the PST signal processing pipeline. This should only be called after all other applications have disconnected from the ring buffers.

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

Handle getting the current beam configuration for the service.

This will return the current configuration used to create the the ring buffers.

Parameters

configuration – Pointer to the protobuf message to return. This implementation will set the smrb sub-field in configuration message.

virtual bool is_beam_configured() const noexcept override

Check if this service is configured for a beam.

Will return true if the

See also

DataBlockManager is configured for a beam.

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

Handle configuring the service for a scan.

This is a no-op method for SMRB, though checks if already configured.

virtual void deconfigure_scan() override

Handle deconfiguring service for a scan.

This is a no-op method for SMRB.

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

Handle getting the current scan configuration for the service.

This will return an empty smrb sub-field message, other than that it is a no-op method.

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 method is effectively a no-op method. However, this will set state that the service is scanning and also reset internal stats to allow monitoring to have stats specifically for the current scan.

virtual void stop_scan() override

Handle ending a scan.

This will mark the application as not scanning.

virtual void reset() override

Handle resetting DatablockManager State into Idle.

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

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 the data and weights ring buffers. 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 during monitoring.

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

Get the DatablockManager state.

Returns

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

inline virtual std::exception_ptr get_application_manager_exception() override

Get the DatablockManager exception pointer.

Returns

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

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.