ecal.core.publisher module

Module that contains the ecal message publisher interface.

class ecal.core.publisher.MessagePublisher(name, topic_type='', topic_descriptor=b'')

Bases: object

Message publisher - Base class for all specialized publishers Classes inheriting from this class need to implement the send() function.

send(msg, time=- 1)

Send out a message

Parameters
  • msg – Message object to send

  • time (int) – optional, timestamp which to send

set_layer_mode(layer, mode)

set send mode for specific transport layer

Parameters
  • layer (int) – 0 = udp, 1 = shm, 2 = hdf5

  • mode – 0 = off, 1 = on, 2 = auto

set_max_bandwidth_udp(bandwidth)

set publisher maximum transmit bandwidth for the udp layer.

Parameters

bandwidth (int) – maximum bandwidth in bytes/s (-1 == unlimited)

set_qos(qos)

set publisher quality of service

Parameters

qos (int) – 0 = default, 1 = best effort, 2 = reliable

class ecal.core.publisher.ProtoPublisher(name, type_=None)

Bases: ecal.core.publisher.MessagePublisher

Spezialized publisher that sends out protobuf messages

send(msg, time=- 1)

Send out a message

Parameters
  • msg – Message object to send

  • time (int) – optional, timestamp which to send

class ecal.core.publisher.StringPublisher(name)

Bases: ecal.core.publisher.MessagePublisher

Spezialized publisher that sends out plain strings

send(msg, time=- 1)

Send out a message

Parameters
  • msg – Message object to send

  • time (int) – optional, timestamp which to send