C++ YASMIN (Yet Another State MachINe)
Loading...
Searching...
No Matches
publisher_demo.cpp File Reference
#include <iostream>
#include <memory>
#include <string>
#include "rclcpp/rclcpp.hpp"
#include "std_msgs/msg/int32.hpp"
#include "yasmin/cb_state.hpp"
#include "yasmin/logs.hpp"
#include "yasmin/state_machine.hpp"
#include "yasmin_ros/basic_outcomes.hpp"
#include "yasmin_ros/publisher_state.hpp"
#include "yasmin_ros/ros_logs.hpp"
#include "yasmin_viewer/yasmin_viewer_pub.hpp"
Include dependency graph for publisher_demo.cpp:

Classes

class  PublishIntState
 A state that publishes ints. More...
 

Functions

std::string check_count (std::shared_ptr< yasmin::blackboard::Blackboard > blackboard)
 Check the count in the blackboard and return an outcome based on it.
 
int main (int argc, char *argv[])
 

Function Documentation

◆ check_count()

std::string check_count ( std::shared_ptr< yasmin::blackboard::Blackboard > blackboard)

Check the count in the blackboard and return an outcome based on it.

This function checks the value of "counter" in the blackboard and compares it with "max_count". If "counter" exceeds "max_count", it returns "outcome1", otherwise it returns "outcome2".

Parameters
blackboardShared pointer to the blackboard.
Returns
A string representing the outcome.

◆ main()

int main ( int argc,
char * argv[] )