Skip to content

serialize.make_generic

Full path: schola.core.protocols.protobuf.serialize.make_generic

schola.core.protocols.protobuf.serialize.make_generic

make_generic

make_generic(obj)

Convert a specific protobuf message to a generic Point or Space message.

This function wraps specific typed protobuf messages (like BoxSpace, DiscretePoint) into generic protobuf messages that use oneof fields.

Parameters

obj (Any) : The specific protobuf message (e.g., BoxSpace, DiscretePoint).

Returns

The generic protobuf message (e.g., Space, Point) containing the specific typed message.

Return type: Any

Raises

  • ValueError - If the message type is not supported.

None