24 #include <unordered_map> 115 Device(std::string n,
const std::vector<IO::channel_t>& c)
116 :
IO::
Block(std::move(n), c, false)
152 Thread(std::string n,
const std::vector<IO::channel_t>& c)
153 :
IO::
Block(std::move(n), c, true)
195 && (this->src_port == rhs.
src_port) && (this->dest == rhs.
dest)
286 std::vector<RT::block_connection_t>& block_connections);
372 std::vector<RT::Thread*> topological_sort();
373 std::vector<IO::Block*> block_registry;
374 std::vector<std::vector<RT::block_connection_t>> connections;
387 std::vector<RT::Thread*>*,
389 std::vector<RT::Device*>*,
471 void setRTParam(
const std::string_view& param_name,
477 std::string_view name;
480 std::vector<rt_param> rt_params;
502 void executeCMD(CMD* cmd);
503 void updateDeviceList(CMD* cmd);
504 void updateThreadList(CMD* cmd);
505 void ioLinkUpdateCMD(CMD* cmd);
506 void updateBlockActivity(CMD* cmd);
507 void setPeriod(CMD* cmd);
508 void shutdown(CMD* cmd);
509 void getPeriodTicksCMD(CMD* cmd);
510 void changeWidgetParametersCMD(CMD* cmd);
511 void changeWidgetStateCMD(CMD* cmd);
515 static void execute(
void* sys);
517 int64_t periodStartTime = 1;
518 int64_t periodEndTime = 1;
519 int64_t lastperiodStartTime = 1;
522 std::unique_ptr<RT::OS::Task> task;
523 std::unique_ptr<RT::OS::Fifo> eventFifo;
524 std::thread telemitry_processing_thread;
525 std::atomic<bool> telemitry_processing_thread_running =
true;
533 std::vector<RT::Device*> devices;
534 std::vector<RT::Thread*> threads;
Block(std::string blockname, const std::vector< channel_t > &channels, bool isdependent)
std::vector< RT::block_connection_t > getAllConnections()
std::vector< IO::Block * > getRegisteredBlocks()
std::vector< RT::Thread * > getThreads()
Connector(const Connector &connector)=delete
void propagateBlockConnections(IO::Block *block)
void disconnect(block_connection_t connection)
int connect(block_connection_t connection)
void insertBlock(IO::Block *block, std::vector< RT::block_connection_t > &block_connections)
bool isRegistered(IO::Block *block)
std::vector< RT::block_connection_t > getOutputs(IO::Block *src)
bool connected(block_connection_t connection)
void clearAllConnections(IO::Block *block)
Connector(Connector &&)=delete
Connector & operator=(Connector &&)=delete
Connector & operator=(const Connector &connector)=delete
std::vector< RT::Device * > getDevices()
void removeBlock(IO::Block *block)
Device & operator=(const Device &)=default
Device(const Device &)=default
Device(std::string n, const std::vector< IO::channel_t > &c)
~Device() override=default
Device & operator=(Device &&)=delete
std::vector< RT::Telemitry::Response > getTelemitry()
System(Event::Manager *em, RT::Connector *rtc)
void receiveEvent(Event::Object *event) override
System & operator=(const System &system)=delete
System & operator=(System &&)=delete
void createTelemitryProcessor()
System(const System &system)=delete
Thread(const Thread &connector)=default
Thread & operator=(const Thread &connector)=default
Thread & operator=(Thread &&)=delete
Thread(std::string n, const std::vector< IO::channel_t > &c)
~Thread() override=default
Connection Oriented Classes.
constexpr response_t RT_WIDGET_PARAM_UPDATE
constexpr response_t RT_DEVICE_LIST_UPDATE
constexpr response_t RT_NOOP
constexpr response_t NO_TELEMITRY
constexpr response_t IO_LINK_UPDATED
constexpr response_t RT_PERIOD_UPDATE
constexpr response_t RT_ERROR
constexpr response_t RT_THREAD_LIST_UPDATE
constexpr response_t RT_WIDGET_STATE_UPDATE
constexpr response_t RT_SHUTDOWN
struct RT::block_connection_t block_connection_t
std::variant< std::monostate, int64_t, int64_t *, uint64_t, double, RT::Thread *, std::vector< RT::Thread * > *, RT::Device *, std::vector< RT::Device * > *, IO::Block *, RT::block_connection_t, Widgets::Component *, State::state_t, std::string > command_param_t
bool operator==(const block_connection_t &rhs) const
IO::flags_t src_port_type
bool operator!=(const block_connection_t &rhs) const