Skip to content

Commit f667776

Browse files
authored
Merge pull request #3551 from ControlSystemStudio/alarm_talk_test
Alarm: Cmd line tool to 'talk' for testing kafka and annunciations
2 parents b9aec75 + 3139b1c commit f667776

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

app/alarm/examples/talk.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/sh
2+
#
3+
# Send talk message
4+
5+
if [ $# -ne 2 ]
6+
then
7+
echo "Usage: talk.sh Accelerator Message"
8+
exit 1
9+
fi
10+
11+
topic="$1"
12+
text="$2"
13+
14+
kafka/bin/kafka-console-producer.sh --broker-list localhost:9092 --property 'parse.key=true' --property key.separator=" : " --topic ${topic}Talk <<END
15+
talk:/$topic/pv : {"severity":"MAJOR", "standout":true, "talk":"$text"}
16+
END
17+
18+

0 commit comments

Comments
 (0)