AwesomeStudioPedal
A programmable, multi-profile foot controller for DAWs, score readers, and studio automation
Loading...
Searching...
No Matches
serial_action.h
Go to the documentation of this file.
1#pragma once
2#include "action.h"
3#include <string>
4
13{
14private:
15 std::string message;
17public:
23 explicit SerialOutputAction(std::string message);
24
30 void execute() override;
31
37 Action::Type getType() const override { return Action::Type::SerialOutput; }
38
39#ifndef HOST_TEST_BUILD
40 void getJsonProperties(JsonObject& json) const override { json["value"] = message.c_str(); }
41#endif
42
48 bool isSendAction() const override { return false; }
49
55 const std::string& getMessage() const { return message; }
56};
Base class for all pedal actions.
Definition action.h:12
virtual void getJsonProperties(JsonObject &json) const
Definition action.h:39
Action that outputs text to serial console.
const std::string & getMessage() const
Gets the message that will be output.
Action::Type getType() const override
Gets the type of this action.
void execute() override
Executes the serial output action.
bool isSendAction() const override
Checks if this action is a send action.