#!/usr/bin/env tclsh source streamtestlib.tcl # Define records, protocol and startup (text goes to files) # The asynPort "device" is connected to a network TCP socket # Talk to the socket with send/receive/assure # Send commands to the ioc shell with ioccmd set records { record (bo, "DZ:test1") { field (DTYP, "stream") field (OUT, "@test.proto test1 device") field (ZNAM, "OFF") field (ONAM, "ON") } } set protocol { test1 {out "%i %r %s";} } set startup { } set debug 0 startioc put DZ:test1 0 assure "0 \x00 OFF" put DZ:test1 1 assure "1 \x01 ON" finish