HeartbeatA
Python class corresponding to the GridWorks type heartbeat.a.100 (VersionedTypeName).
- class gridworks.types.HeartbeatA(*, MyHex='0', YourLastHex='0', TypeName='heartbeat.a', Version='100')
Used to check that an actor can both send and receive messages.
Payload for direct messages sent back and forth between actors, for example a Supervisor and one of its subordinates.
[More info](https://gridworks.readthedocs.io/en/latest/g-node-instance.html).
- Parameters:
MyHex (str) –
YourLastHex (str) –
TypeName (Literal['heartbeat.a']) –
Version (str) –
- MyHex:
Description: Hex character getting sent
Format: HexChar
- YourLastHex:
Description: Last hex character received from heartbeat partner
Format: HexChar
- class gridworks.types.heartbeat_a.check_is_hex_char(v)
HexChar format: single-char string in ‘0123456789abcdefABCDEF’
- Raises:
ValueError – if not HexChar format
- Parameters:
v (str) –
- class gridworks.types.HeartbeatA_Maker(my_hex, your_last_hex)
- Parameters:
my_hex (str) –
your_last_hex (str) –
- classmethod tuple_to_type(tuple)
Given a Python class object, returns the serialized JSON type object
- Parameters:
tuple (HeartbeatA) –
- Return type:
str
- classmethod type_to_tuple(t)
Given a serialized JSON type object, returns the Python class object
- Parameters:
t (str) –
- Return type: