forked from epics_driver_modules/motorBase
9a54da0deb
- Added TCP/IP or UDP/IP ASYN port configuration.
133 lines
5.4 KiB
Plaintext
133 lines
5.4 KiB
Plaintext
# This configures the ASYN server stuff.
|
|
# "#!" marks lines that can be uncommented.
|
|
|
|
# Initialize the IP carriers; IPAC R2.8
|
|
# -------------------------------------
|
|
# ipacAdd{CarrierType}(char *cardParams)
|
|
# CarrierType - VIPC310, VIPC610, VIPC610_01, VIPC616, VIPC616_01,
|
|
# MVME162, or ATC40.
|
|
# cardParams - carrier-specific init parameters.
|
|
# ipacAddVIPC616_01(const char *cardParams);
|
|
# ipacAddMVME162(const char *cardParams)
|
|
#
|
|
# For SBS VIPC616-01 IP carrier board. A32 and A24 examples follow:
|
|
# - A32 addressing.
|
|
# - default I/O Base Address (0x6000).
|
|
# - IP modules occupy 32MB of memory from 0x9000 0000 to 0x91FF FFFF.
|
|
# - IP module A at 0x90000000,
|
|
# module B at 0x90800000,
|
|
# module C at 0x91000000,
|
|
# module D at 0x91800000
|
|
#!ipacAddVIPC616_01("6000,A0000000")
|
|
|
|
# - A24 addressing.
|
|
# - default I/O Base Address (0x6000).
|
|
# - default IP module base address at 0x00D0 0000
|
|
# occupies 512 bytes of memory from 0x00D0 0000 to 0x00D0 01FF.
|
|
# - IP module A at 0x0x00D0 007F,
|
|
# module B at 0x0x00D0 0100,
|
|
# module C at 0x0x00D0 017F,
|
|
# module D at 0x0x00D0 01FF
|
|
|
|
#!ipacAddVIPC616_01("6000,A0000000")
|
|
|
|
# For MVME162 and MVME172 CPU board IP carrier.
|
|
#!ipacAddMVME162("A:l=3,3 m=0xe0000000,64;B:l=3,3 m=0xe0010000,64;C:l=3,3 m=0xe0020000,64;D:l=3,3 m=0xe0030000,64")
|
|
|
|
# Allocate the number of tyGSOctal modules to support.
|
|
# ----------------------------------------------------
|
|
|
|
#!tyGSOctalDrv(1)
|
|
|
|
# Initialize IP Octal modules.
|
|
# ----------------------------
|
|
# tyGSOctalModuleInit(char *moduleID, char *ModuleType, int irq_num,
|
|
# char *carrier#, int slot#)
|
|
# moduleID - assign the IP module a name for future reference.
|
|
# ModuleType - "232", "422", or "485".
|
|
# irq_num - interrupt request number.
|
|
# carrier# - carrier# assigned from the ipacAddCarrierType() call.
|
|
# slot# - slot number on carrier; slot[A,B,C,D] -> slot#[0,1,2,3].
|
|
|
|
#!tyGSOctalModuleInit "Mod0", "232", 0x80, 0, 0
|
|
|
|
# Create tty devices.
|
|
# ------------------
|
|
# tyGSOctalDevCreate(char *portname, int moduleID, int port#, int rdBufSize,
|
|
# int wrtBufSize)
|
|
# portname - assign the port a name for future reference.
|
|
# moduleID - moduleID from the tyGSOctalModuleInit() call.
|
|
# port# - port number for this module [0-7].
|
|
# rdBufSize - read buffer size, in bytes.
|
|
# wrtBufSize - write buffer size, in bytes.
|
|
|
|
# Create two tty ports on Mod0 with portname based on the convention;
|
|
# "/tyGScarrier#/moduleID/port#".
|
|
|
|
#!tyGSOctalDevCreate "/tyGS0/Mod0/0", "Mod0", 0, 512, 512
|
|
#!tyGSOctalDevCreate "/tyGS0/Mod0/1", "Mod0", 1, 512, 512
|
|
|
|
# Create all uninitialized tty devices.
|
|
# ------------------------------------
|
|
# tyGSOctalDevCreateAll(char *base, char *moduleID, int rdBufSize,
|
|
# int wrtBufSize)
|
|
# base - base name for these devices.
|
|
# moduleID - module identifier from the call to tyGSOctalModuleInit().
|
|
# rdBufSize - read buffer size, in bytes.
|
|
# wrtBufSize - write buffer size, in bytes.
|
|
|
|
# Initialze all the remaining uninitialized Mod0 ports; i.e., /tyGS0/0/[2-7].
|
|
#!tyGSOctalDevCreateAll "/tyGS0/Mod0/", "Mod0", 512, 512
|
|
|
|
# Configurd asyn serial port.
|
|
# ---------------------------
|
|
# drvAsynSerialPortConfigure("portName","ttyName",priority,noAutoConnect,
|
|
# noProcessEosIn)
|
|
#
|
|
# portName - The portName that is registered with asynGpib.
|
|
# ttyName - The name of the local serial port (e.g. "/dev/ttyS0").
|
|
# priority - Priority at which the asyn I/O thread will run. If this is
|
|
# zero or missing,then epicsThreadPriorityMedium is used.
|
|
# noAutoConnect - Zero or missing indicates that portThread should
|
|
# automatically connect. Non-zero if explicit connect command
|
|
# must be issued.
|
|
# noProcessEos - If 0 then asynInterposeEosConfig is called specifying both
|
|
# processEosIn and processEosOut.
|
|
|
|
#!drvAsynSerialPortConfigure("L0","/tyGS0/Mod0/0",0,0,0)
|
|
#!drvAsynSerialPortConfigure("L1","/tyGS0/Mod0/1",0,0,0)
|
|
|
|
#!asynSetOption("L0", 0, "baud", "9600")
|
|
#!asynSetOption("L0", 0, "bits", "8")
|
|
#!asynSetOption("L0", 0, "parity", "none")
|
|
#!asynSetOption("L0", 0, "stop", "1")
|
|
#!asynSetOption("L0", 0, "clocal", "Y")
|
|
#!asynSetOption("L0", 0, "crtscts", "N")
|
|
|
|
#!asynSetOption("L1", 0, "baud", "9600")
|
|
#!asynSetOption("L1", 0, "bits", "8")
|
|
#!asynSetOption("L1", 0, "parity", "none")
|
|
#!asynSetOption("L1", 0, "stop", "1")
|
|
#!asynSetOption("L1", 0, "clocal", "Y")
|
|
#!asynSetOption("L1", 0, "crtscts", "N")
|
|
|
|
# TCP/IP or UDP/IP ASYN port configuration.
|
|
#
|
|
# drvAsynIPPortConfigure("portName", "hostInfo", priority, noAutoConnect,
|
|
# noProcessEos)
|
|
# (1) portName - The portName that is registered with asynGpib.
|
|
# (2) hostInfo - The Internet host name, port number and optional IP protocol
|
|
# of the device (e.g. "164.54.9.90:4002", "serials8n3:4002",
|
|
# "serials8n3:4002 TCP" or "164.54.17.43:5186 udp"). If no
|
|
# protocol is specified, TCP will be used.
|
|
# (3) priority - Priority at which the asyn I/O thread will run. If zero or
|
|
# missing, then epicsThreadPriorityMedium is used.
|
|
# (4) noAutoConnect - Zero or missing indicates that portThread should
|
|
# automatically connect. Non-zero if explicit connect
|
|
# command must be issued.
|
|
# (5) noProcessEos - If 0 then asynInterposeEosConfig is called specifying
|
|
# both processEosIn and processEosOut.
|
|
#!drvAsynIPPortConfigure("tcp1","164.54.160.124:5001 tcp", 0, 0, 1)
|
|
#!drvAsynIPPortConfigure("tcp2","164.54.160.131:5001 tcp", 0, 0, 1)
|
|
|