arbitrator
Classes
TransportArbitrator
Shares a transport between a server and multiple clients.
Source code in heartkit/backends/erpc/arbitrator.py
Functions
prepare_client_receive
Add a client request to the client list.
This call is made by the client thread prior to sending the invocation to the server. It Ensures that the transport arbitrator has the client's response message buffer ready in case it sees the response before the client even has a chance to call client_receive().
Parameters:
-
(requestContextRequestContext) –description
Returns:
-
int(int) –A token value to be passed to client_receive().
Source code in heartkit/backends/erpc/arbitrator.py
client_receive
Receive method for the client.
Blocks until the a reply message is received with the expected sequence number that is associated with @a token. The client must have called prepare_client_receive() previously.
Parameters:
-
(tokenint) –The token previously returned by prepare_client_receive().
Returns:
-
bytearray(bytearray) –containing the received message.