46 return "EspressifSensor";
56 return "Data Provider";
61 if (ImGui::InputTextWithHint(
"SensorPort",
"/dev/ttyACM0", &
_sensorPort))
69 "- \"COM1\" (Windows format for physical and virtual (USB) serial port)\n"
70 "- \"/dev/ttyS1\" (Linux format for physical serial port)\n"
71 "- \"/dev/ttyUSB0\" (Linux format for virtual (USB) serial port)\n"
72 "- \"/dev/tty.usbserial-FTXXXXXX\" (Mac OS X format for virtual (USB) serial port)\n"
73 "- \"/dev/ttyS0\" (CYGWIN format. Usually the Windows COM port number minus 1. This would connect to COM1)");
91 if (j.contains(
"UartSensor"))
132 _sensor->unregisterAsyncPacketReceivedHandler();
143 LOG_DATA(
"binaryAsyncMessageReceived");
146 auto obs = std::make_shared<UartPacket>(p);
147 obs->insTime = util::time::GetCurrentInsTime();
nlohmann::json json
json namespace
Text Help Marker (?) with Tooltip.
Utility class for logging to console and file.
#define LOG_DEBUG
Debug information. Should not be called on functions which receive observations (spamming)
#define LOG_DATA
All output which occurs repeatedly every time observations are received.
#define LOG_ERROR
Error occurred, which stops part of the program to work, but not everything.
#define LOG_TRACE
Detailled info to trace the execution of the program. Should not be called on functions which receive...
Keeps track of the current real/simulation time.
UART Packet storage class.
void guiConfig() override
ImGui config window which is shown on double click.
bool resetNode() override
Resets the node. It is guaranteed that the node is initialized when this is called.
EspressifSensor()
Default constructor.
static std::string typeStatic()
String representation of the Class Type.
vendor::espressif::EspressifUartSensor _sensor
Sensor Object.
std::string type() const override
String representation of the Class Type.
void restore(const json &j) override
Restores the node from a json object.
void deinitialize() override
Deinitialize the node.
~EspressifSensor() override
Destructor.
static constexpr size_t OUTPUT_PORT_INDEX_WIFI_OBS
Flow (EspressifObs)
static std::string category()
String representation of the Class Category.
json save() const override
Saves the node into a json object.
static void binaryAsyncMessageReceived(void *userData, uart::protocol::Packet &p, size_t index)
Callback handler for notifications of new asynchronous data packets received.
bool initialize() override
Initialize the node.
bool doDeinitialize(bool wait=false)
Asks the node worker to deinitialize the node.
ImVec2 _guiConfigDefaultWindowSize
Node(std::string name)
Constructor.
std::string nameId() const
Node name and id.
std::string name
Name of the Node.
bool _onlyRealTime
Whether the node can run in post-processing or only real-time.
bool _hasConfig
Flag if the config window should be shown.
static std::string type()
Returns the type of the data class.
static int baudrate2Selection(Baudrate baud)
Returns the guiSelection for the given baudrate.
int _selectedBaudrate
Baudrate for the sensor.
@ BAUDRATE_115200
Baudrate with 115200 symbols per second [Baud].
void restore(const json &j)
Restores the node from a json object.
Baudrate sensorBaudrate() const
Returns the Baudrate for the element Selected by the GUI.
json save() const
Saves the node into a json object.
OutputPin * CreateOutputPin(Node *node, const char *name, Pin::Type pinType, const std::vector< std::string > &dataIdentifier, OutputPin::PinData data=static_cast< void * >(nullptr), int idx=-1)
Create an Output Pin object.
void ApplyChanges()
Signals that there have been changes to the flow.