1.0 Introduction ================ This preliminary document describes the caennet tcl/tk dynamically loadable package. This package can be loaded from any tcl/tk derived script by invoking the: package require caennet command. Caennet commands live in the caennet namespace. 2.0 Commands: ============= The commands supported by this package are: caennet::create - Create a new controller 'object' caennet::delete - Delete an existing caennet controller caennet::reset - Resets a caennet controller to a known state caennet::send - Send a command to a caennet slave through a controller, receiving the reply information. 2.1 caennet::create =================== Syntax: caennet::create base Creates a caennet controller object and associated VME map. Returns the name of the controller created. This name should be supplied in subsequent caennet commands. Typical use: set controller [caennet::create $somebase] 2.2 caennet::delete ================== syntax: caennet::delete controller Deletes an existing caennet controller. The controller parameter is a controller name returned from caennet::create. Typical use: set controller [caennet::create $base] ... caennet::delete $controller 2.3 caennet::reset ================== Syntax: caennet::reset controller Resets the named controller. The controller parameter was returned from a caennet::create command. Typical Usage: set caen [caennet::create $base] caennet::reset $caen ... caennet::delete $caen 2.4 caennet::send ================= Syntax: caennet::send controller slave function [data] Sends a data packet to a slave from the controller. The reply is returned as result of the command. Parameters: controller - Controller returned from the caennet::create command. slave - ID of a valid slave on the caennet daisy chain. function - Message function code (these are slave type dependent). data - optional data block to send along with the function. The data blocks are slave and function dependent. The data block is optional (not all functions require it). It is empty if not supplied. If more than one data word are in the data block the parameter must be a valid Tcl list.