@@ -57,11 +57,11 @@ nWdtApps = 4
57
57
```
58
58
59
59
### Fields
60
- ` name ` : Name of the application.
61
- ` start_delay ` : Delay in seconds before starting the application.
62
- ` ping_delay ` : Time in seconds to wait before expecting a ping from the application.
63
- ` ping_interval ` : Maximum time period in seconds between pings.
64
- ` cmd ` : Command to start the application.
60
+ - ` name ` : Name of the application.
61
+ - ` start_delay ` : Delay in seconds before starting the application.
62
+ - ` ping_delay ` : Time in seconds to wait before expecting a ping from the application.
63
+ - ` ping_interval ` : Maximum time period in seconds between pings.
64
+ - ` cmd ` : Command to start the application.
65
65
66
66
## Example Heartbeat Message Code
67
67
The managed processes must send a message containing their PID over UDP. Below are example heartbeat message codes in various languages.
@@ -91,7 +91,7 @@ public class ProcessHeartbeat {
91
91
```
92
92
93
93
<details >
94
- <summary >Click for other examples in C, C++, Qt, C#, Python and Shell Script </summary >
94
+ <summary >Click for example in C</summary >
95
95
96
96
### C
97
97
``` c
@@ -130,7 +130,10 @@ void sendPIDOverUDP(int port) {
130
130
close(sockfd);
131
131
}
132
132
```
133
-
133
+ </details>
134
+ <details>
135
+ <summary>Click for example in C++</summary>
136
+
134
137
### C++
135
138
```cpp
136
139
#include <iostream>
@@ -167,6 +170,9 @@ void sendPIDOverUDP(int port) {
167
170
close(sockfd);
168
171
}
169
172
```
173
+ </details >
174
+ <details >
175
+ <summary >Click for example in Qt</summary >
170
176
171
177
### Qt (C++)
172
178
``` cpp
@@ -182,6 +188,9 @@ void sendPIDOverUDP(int port) {
182
188
udpSocket.writeDatagram(data, QHostAddress::Broadcast, port);
183
189
}
184
190
```
191
+ </details>
192
+ <details>
193
+ <summary>Click for example in C#</summary>
185
194
186
195
### C#
187
196
```csharp
@@ -211,6 +220,9 @@ public class Program
211
220
}
212
221
}
213
222
```
223
+ </details >
224
+ <details >
225
+ <summary >Click for example in Python</summary >
214
226
215
227
### Python
216
228
``` python
@@ -222,6 +234,9 @@ pid = str(os.getpid())
222
234
data = ' p' + pid
223
235
sock.sendto(data.encode(' utf-8' ), (' localhost' , 12345 ))
224
236
```
237
+ </details >
238
+ <details >
239
+ <summary >Click for example in Shell Script</summary >
225
240
226
241
### Shell Script
227
242
``` bash
@@ -235,7 +250,6 @@ sendPIDOverUDP() {
235
250
236
251
sendPIDOverUDP 12345
237
252
```
238
-
239
253
</details >
240
254
241
255
## Statistics Logging
0 commit comments