Class PlotData#
Defined in File DataPlotter.h
Inheritance Relationships#
Base Type#
public Karana::Core::BaseWithVars(Class BaseWithVars)
Class Documentation#
-
class PlotData : public Karana::Core::BaseWithVars#
Class that contains plot data and associated methods for potentially multiple plots.
Public Functions
-
PlotData(const std::vector<SinglePlotData> &plot_data, std::string_view host, std::string_view port, std::string_view target)#
PlotData constructor. The constructor is not meant to be called directly. Please use the create(…) method instead to create an instance.
- Parameters:
plot_data – The data for the plots.
host – The host for the internal TCP transport.
port – The port for the internal TCP transport.
target – Retained for compatibility with the former WebSocket transport.
-
~PlotData()#
Destructor.
-
void addPlot(SinglePlotData plot_data)#
Add a plot.
- Parameters:
plot_data – The data for the plot to add.
-
void removePlot(size_t index)#
Remove the plot at index.
- Parameters:
index – The index of the plot to remove.
-
void update()#
Get data from SinglePlotData and send it via framed TCP to the Dash process.
-
void sendMessage(const std::string &msg)#
Send a JSON control message over the internal transport.
This should be used with caution and only if you know exactly what control messages are accepted by the Dash process.
- Parameters:
msg – The message to send.
-
void shutdown()#
Shutdown the internal TCP client.
Public Members
-
std::vector<SinglePlotData> plot_fns#
The data for the plots.
Public Static Functions
-
static Karana::Core::ks_ptr<PlotData> create(const std::vector<SinglePlotData> &plot_data, std::string_view host, std::string_view port, std::string_view target)#
Create an instance of PlotData.
- Parameters:
plot_data – The data for the plots.
host – The host for the internal TCP transport.
port – The port for the internal TCP transport.
target – Retained for compatibility with the former WebSocket transport.
- Returns:
A pointer to the newly created PlotData.
-
PlotData(const std::vector<SinglePlotData> &plot_data, std::string_view host, std::string_view port, std::string_view target)#