Add topic name and QoS profile to Publisher_ struct
This commit is contained in:
parent
455ea630ec
commit
4bcbb93e4d
|
|
@ -38,6 +38,8 @@ unsafe impl<T> Send for Publisher<T> where T: WrappedTypesupport {}
|
||||||
|
|
||||||
pub(crate) struct Publisher_ {
|
pub(crate) struct Publisher_ {
|
||||||
handle: rcl_publisher_t,
|
handle: rcl_publisher_t,
|
||||||
|
topic_name: String,
|
||||||
|
qos_profile: QosProfile,
|
||||||
|
|
||||||
// TODO use a mpsc to avoid the mutex?
|
// TODO use a mpsc to avoid the mutex?
|
||||||
poll_inter_process_subscriber_channels: Mutex<Vec<oneshot::Sender<()>>>,
|
poll_inter_process_subscriber_channels: Mutex<Vec<oneshot::Sender<()>>>,
|
||||||
|
|
@ -155,6 +157,8 @@ pub fn create_publisher_helper(
|
||||||
if result == RCL_RET_OK as i32 {
|
if result == RCL_RET_OK as i32 {
|
||||||
Ok(Publisher_ {
|
Ok(Publisher_ {
|
||||||
handle: publisher_handle,
|
handle: publisher_handle,
|
||||||
|
topic_name: topic.to_string(),
|
||||||
|
qos_profile,
|
||||||
poll_inter_process_subscriber_channels: Mutex::new(Vec::new()),
|
poll_inter_process_subscriber_channels: Mutex::new(Vec::new()),
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue