heros.ref¶
Attributes¶
Classes¶
Identity of a HERO, given by its name and realm. |
Module Contents¶
- heros.ref._FORBIDDEN_CHARS¶
- class heros.ref.HERORef[source]¶
Identity of a HERO, given by its name and realm.
A
HERORefis a plain value. It holds no connection and does not look up or contact the HERO. Two references are equal if name and realm are equal.Name and realm must be non-empty strings without any of the characters
/ * ? # $. These characters have a special meaning in zenoh key expressions or in HEROS configuration strings. The check is strict on purpose.Connection settings are not fields of this class. If a field is ever needed that must not take part in comparison, add it as
field(default=..., compare=False, kw_only=True)so existing calls keep working.HERORefhas no CBOR encoding. If aHERORefis returned or sent as argument, the fallback inheros.serdes.cbor_default_encoder()stores it in the object store of the sender and transmits an unserializable-object tag with the class name, an identifier andstr(value). The receiver gets aheros.serdes.UnserializableRemoteObject. Sending that object back yields the originalHERORefon the side that stored it.- Parameters:
name – Name of the HERO.
realm – Realm of the HERO.
- Raises:
TypeError – If name or realm is not a string.
ValueError – If name or realm is empty or contains a forbidden character.
- name: str¶
- realm: str¶