Heartbeat server
If you implement a server device or simulator, you can use IHeartbeatServer to send heartbeats.
First of all, you have to register the heartbeat service when building server device:
After building a service, you can get it and, for example, register callbacks to modify the heartbeat payload being sent from the server:
IHeartbeatServer (source)
Defines the interface for a heartbeat server.
Method | Return Type | Description |
---|---|---|
|
| Sets the change callback for the heartbeat payload. |
|
| Sets the change callback for the |
IHeartbeatServer.Set
Parameter | Type | Description |
---|---|---|
|
| Callback that is invoked whenever the heartbeat payload is sent, allowing you to modify its fields before transmission. |
IHeartbeatServer.SetCustomMode
Parameter | Type | Description |
---|---|---|
|
| Callback that is invoked to modify the CustomMode bitfield of the heartbeat payload before it is sent. |