Beamline Instrument Software Support |
|
SPEC Macro documentation:
[ Macro Index |
BCU Home ]
|
DEEPDEVICE.MAC | ||||||
[ source code | installed at | configured at ] | ||||||
See other macros in category: All | ||||||
Description:
| ||||||
Documentation:
These macros simplify scommunication with a family of electronic modules that follows certain communication conventions defined in the Detyector & Electronics Group and adopted in a number of in-house developements at ESRF. This kind of modules are called deep devices in the following description. To use these macros, a name (a non-numeric string) must be first assigned to each isgdevice with deepdev_add() macro function. Once a isgdevice has been succesfully configured, commands and request can be sent to it by means of deepdev_comm() or deep_comm_ack() macros. Communication can be flushed by deepdev_flush(). Other macros are deepdevice that shows a list of devices currently configured, and deepdebug that toggles a special debug mode. EXAMPLE DEPENDENCIES These macros make use of the following macro sets: | ||||||
Macros:
Usage: deepdev_add (<name>, <comdev>, <type>, <id>) Checks for the presence of a deep device. If succesful the device gets configured and <name> is internally assigned to it. This macro must be invoked before any other access can be done to the device. The communication device <comdev> must be either a number (a serial interface in the config file), a string representing a ethernet device or an ESRF device name recognised as a Serial Line Device Server. The parameters <type> and <id> allow to identify a specific deep device when more than one are chained in the same physical communication interface. The value of <type> selects the meaning of the identifier <id> as follows: deepdev_remove Usage: deepdev_remove (<name>) Removes a currently configured deep device from the internal list. deepdev_check Usage: deepdev_check (<name>, <type>, <id>) Checks if <name> is a valid deep device identified by the parameters <type> and <id>. Returns -1 if the device is not a registered device, 0 if it does not match the identification parameters and 1 otherwise. The meaning of <type> and <id> is the same that in the macro function deepdev_add(). deepdev_comm_ack Usage: deepdev_comm_ack (<name>, <comm>, [<bindata>]) Sends the command <comm> to the device identified by <name> with acknowledge request. If the command is sent succesfully, this macro function returns the constant DEEPDEV_OK. If and error happens in the device, DEEPDEV_ERRANSW is returned. If there is a communication error, this macro function returns the constant DEEPDEV_ERR. deepdev_comm Usage: deepdev_comm (<name>, <comm>, [<bindata>]) Sends the command <comm> to the device identified by <name>. If there is any answer from the device it is returned. If there is no answer the macro function returns either DEEPDEV_OK (if the command was sent with no error), DEEPDEV_ERR in case of error ot DEEPDEV_ERRANSW. deepdev_flush Usage: deepdev_flush (<name>) deepdevice Usage: deepdevice Displays a table with the isgdevices currently configured deepdebug Usage: deepdebug Switches debug mode for communication with isgdevices deep Usage: deep [hostname] Launch interactive communication program in a separated xterm. Requires the "deep" shell command installed on the current machine. | ||||||
Internal Macros: | ||||||
Usage: deepdev_scan(comdev) deepdev__flush Usage: deepdev__flush(mode, comdev, prflag) deepdev_read_line Usage: deepdev_read_line(mode, comdev) deepdev__read_array Usage: deepdev__read_array(mode, dev, myarray) deepdev__read_binary Usage: deepdev__read_binary(mode, comdev, myarray) deepdev__read_ascii Usage: deepdev__read_ascii(mode, comdev, naked) deepdev__read Usage: deepdev__read(mode, comdev, naked, bindata) deepdev__print_binary_header Usage: deepdev__print_binary_header(header) deepdev__send_binary Usage: deepdev__send_binary(mode, comdev, bindata) deepdev__send_ascii Usage: deepdev__send_ascii(mode, comdev, comm) deepdev__send Usage: deepdev__send(mode, comdev, comm, myarray) deepdev_lowcomm Usage: deepdev_lowcomm(comm, mode, comdev, prefix, bindata) deepdev__commode Usage: deepdev__commode(comdev) DEEPDEBUG Usage: DEEPDEBUG deep_getfile Usage: deep_getfile(name, remote_file, local_file) deepdev_setdefault Usage: deepdev_setdefault (appname, devicename) | ||||||
|