Processor

class eagerx.core.entities.Processor[source]

Baseclass for processors.

Use this baseclass to implement processor that preprocess an input/output message.

This baseclass only supports one-way processing.

Users must call make() to make the subclass’ specification.

Subclasses must implement the following methods:

abstract convert(msg)[source]

An abstract method to preprocess messages.

Parameters:

msg (Any) – Raw message.

Return type:

Any

Returns:

Preprocessed message.

classmethod info(method=None)

A helper method to get info on a method of the specified subclass.

Parameters:

method (Union[List[str], str, None]) – The registered method we would like to receive info on. If no method is specified, it provides info on the class itself.

Return type:

str

Returns:

Info on the subclass’ method.

abstract initialize(spec)[source]

An abstract method to initialize the processor.

Parameters:

spec (ProcessorSpec) – Specification of the processor.

Return type:

None

abstract classmethod make(*args, **kwargs)

An abstract method that makes the specification (also referred to as spec) of this entity.

Parameters:
  • args (Any) – Arguments to the subclass’ make function.

  • kwargs (Any) – Optional Arguments to the subclass’ make function.

Returns:

A (mutable) spec that can be used to build and subsequently initialize the entity (e.g. node, engine, …).