Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions rclc/include/rclc/executor.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,29 @@ typedef enum
LET
} rclc_executor_semantics_t;

typedef enum
{
NONE,
SINGLE_THREADED,
MULTI_THREADED,
NON_POSIX,
} rclc_executor_type_t;

/// Type definition for trigger function. With the parameters:
/// - array of executor_handles
/// - size of array
/// - application specific struct used in the trigger function
typedef bool (* rclc_executor_trigger_t)(rclc_executor_handle_t *, unsigned int, void *);

/// function pointer specification
typedef struct rclc_executor_t_s rclc_executor_t;
typedef rcl_ret_t (* rclc_executor_func_t)(rclc_executor_t *);

/// Container for RCLC-Executor
typedef struct
struct rclc_executor_t_s
{
/// Type of Executor
rclc_executor_type_t type;
/// Context (to get information if ROS is up-and-running)
rcl_context_t * context;
/// Container for dynamic array for DDS-handles
Expand All @@ -83,7 +97,9 @@ typedef struct
void * trigger_object;
/// data communication semantics
rclc_executor_semantics_t data_comm_semantics;
} rclc_executor_t;
/// pointer to custom executor data structure
void * custom;
};

/**
* Return a rclc_executor_t struct with pointer members initialized to `NULL`
Expand Down
2 changes: 2 additions & 0 deletions rclc/include/rclc/executor_handle.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ typedef struct
/// Interval variable. Flag, which is true, if new data is available from DDS queue
/// (is set after calling rcl_take)
bool data_available;
/// pointer to custom handle
void * custom;
} rclc_executor_handle_t;

/// Information about total number of subscriptions, guard_conditions, timers, subscription etc.
Expand Down