11 USAGE=
'send host:port'
20 print(
'len(argv)=%d'%(len(argv),))
21 if len(argv) != 2: print(USAGE); sys.exit()
22 node,port = argv[1].split(
':')
23 buf=
'MF: 01-Jan-1970 01:01:01'
29 buf+=
"|UDP Send MFMSG"
30 buf+=
"|udp_send_mfmsg.py"
32 buf+=
"|Run 0, Subrun 0, Event 0"
33 buf+=
"|UDP Test program"
34 buf+=
"|This is the ARTDAQ UDP test string.\n\t It contains exactly 111 characters, making for a total size of 113 bytes."
35 s = socket.socket( socket.AF_INET, socket.SOCK_DGRAM )
36 s.sendto( buf, (node,int(port)) )
40 if __name__ ==
"__main__": main(sys.argv)