Skip to content

Commit

Permalink
Fix: wrong python types for python message publisher create (eclipse-…
Browse files Browse the repository at this point in the history
…ecal#515)

* Should fix eclipse-ecal#514 (wrong python types for python message publisher create)
  • Loading branch information
rex-schilasky authored Feb 15, 2022
1 parent 6407d9c commit 8c63ee0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions lang/python/core/ecal/core/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def pub_create(topic_name, topic_type, topic_desc):
:param topic_type: optional type name
:type topic_type: string
:param topic_desc: optional type description
:type topic_desc: string
:type topic_desc: bytes
"""
topic_handle = _ecal.pub_create(topic_name, topic_type)
Expand All @@ -180,8 +180,8 @@ def pub_set_description(topic_handle, description):
:param topic_handle: the topic handle
:type topic_handle: string
:param description: the publisher description
:type description: string
:param description: the topic description
:type description: bytes
"""
return _ecal.pub_set_description(topic_handle, description)
Expand Down Expand Up @@ -244,7 +244,7 @@ def pub_send(topic_handle, msg_payload, msg_time=-1):
:param topic_handle: the topic handle
:param msg_payload: message python string (can contain zeros)
:type msg_payload: string
:type msg_payload: bytes
:param msg_time: optional message time in us (default -1 == eCAL system time)
:type msg_time: int
Expand All @@ -257,7 +257,7 @@ def sub_create(topic_name, topic_type):
:param topic_name: the unique topic name
:type topic_name: string
:param topic_type: optional type description
:param topic_type: optional topic type
:type topic_type: string
"""
Expand Down Expand Up @@ -469,7 +469,7 @@ def client_call_method(client_handle, method_name, request, timeout = -1):
:param method_name: the method name to call
:type method_name: string
:param request: the request argument for the method
:type request: string
:type request: bytes
:param timeout: maximum time before operation returns (in milliseconds, -1 means infinite)
:type timeout: integer
Expand Down Expand Up @@ -563,7 +563,7 @@ def __init__(self, topic_name, topic_type="", topic_desc=b""):
:param topic_type: optional type name
:type topic_type: string
:param topic_desc: optional type description
:type topic_desc: string
:type topic_desc: bytes
"""
# topic name
Expand Down Expand Up @@ -624,7 +624,7 @@ def send(self, msg_payload, msg_time=-1):
""" send publisher content
:param msg_payload: message python string (can contain zeros)
:type msg_payload: string
:type msg_payload: bytes
:param msg_time: optional message time in us (default -1 == eCAL system time)
:type msg_time: int
Expand All @@ -641,7 +641,7 @@ def __init__(self, topic_name, topic_type=""):
:param topic_name: the unique topic name
:type topic_name: string
:param topic_type: optional type description
:param topic_type: optional topic type
:type topic_type: string
"""
Expand Down
4 changes: 2 additions & 2 deletions lang/python/core/ecal/core/publisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class MessagePublisher(object):
Classes inheriting from this class need to implement the
:func:`~msg_publisher.msg_publisher.send` function.
"""
def __init__(self, name, topic_type="", topic_descriptor=""):
def __init__(self, name, topic_type="", topic_descriptor=b""):
""" Initialize a message publisher
:param name: subscription name of the publisher
Expand All @@ -34,7 +34,7 @@ def __init__(self, name, topic_type="", topic_descriptor=""):
:type topic_type: string
:param topic_descriptor: optional, a string which can be registered with ecal to allow io
reflection features
:type topic_descriptor: string
:type topic_descriptor: bytes
"""
self.c_publisher = ecal_core.publisher(name, topic_type, topic_descriptor)
Expand Down

0 comments on commit 8c63ee0

Please sign in to comment.