SMR Clips Interface
At Automation we have made a special version of CLIPS with an interface to our Small Mobile Robots. This version is available both in GNU/Linux and MS Windows.
The interface provides the following 3 CLIPS functions.
SMRConnect() SMRConnect(hostname) SMRConnect(hostname, port)
In the first form, CLIPS must be running on the SMR itself. In the second form, CLIPS can be running on any computer on the network. In the third form, a non-standard port number can be specified - this is not normally needed.
hostname: The SMR to connect to. A string or symbol. port: The TCP port to connect to. An integer.
A connection is established to the SMR server program. The return value is a Boolean, indicating success or failure.
NB! Before the SMRConnect call is performed the clipsserver must be started on the used SMR i.e. logon the SMR using ssh, start the server /usr/local/smr/bin/clipsserver and choose menupoint 17.
SMRTalk(command) command: The command to send to the SMR server. A string.
A command is sent to the SMR server program and the response is returned. The return value is a string.
Any existing connection to an SMR is terminated. The return value is the Boolean TRUE.
$ /usr/local/smr/bin/smrclips CLIPS (V6.21 06/15/03) CLIPS> (SMRConnect smr4) TRUE CLIPS> (SMRTalk "fwd 1 @v0.2") "ID1" CLIPS> (SMRTalk "eval $odox") "0.997012 " CLIPS> (SMRTalk "getevent 5") "ID1 stopcond 0.000000" CLIPS> (SMRDisconnect) TRUE CLIPS>