public class Maq20
extends org.lsst.ccs.drivers.modbus.Modbus
| Modifier and Type | Class and Description |
|---|---|
static class |
Maq20.ModuleType
Public constants.
|
org.lsst.ccs.drivers.modbus.Modbus.ConnTypeorg.lsst.ccs.drivers.ascii.Ascii.DataBits, org.lsst.ccs.drivers.ascii.Ascii.FlowCtrl, org.lsst.ccs.drivers.ascii.Ascii.Option, org.lsst.ccs.drivers.ascii.Ascii.Parity, org.lsst.ccs.drivers.ascii.Ascii.StopBits, org.lsst.ccs.drivers.ascii.Ascii.Terminator| Modifier and Type | Field and Description |
|---|---|
static int |
NUM_MODULES |
static int |
OPER_ANALOG |
static int |
OPER_ANALOUT |
static int |
OPER_DISCRETE |
| Constructor and Description |
|---|
Maq20()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Maq20AnalogIn |
getAnalIn(int modId)
Gets the analog input object for a module.
|
Maq20Analog |
getAnalog(int modId)
Gets the common analog object for a module.
|
Maq20AnalogOut |
getAnalOut(int modId)
Gets the analog output object for a module.
|
String |
getDateCode(int modId)
Gets the date code.
|
Maq20DiscreteFreq |
getDiscFreq(int modId)
Gets the discrete frequency object for a module.
|
Maq20DiscretePulse |
getDiscPulse(int modId)
Gets the discrete pulse object for a module.
|
Maq20DiscretePWM |
getDiscPWM(int modId)
Gets the discrete PWM object for a module.
|
Maq20Discrete |
getDiscrete(int modId)
Gets the discrete object for a module.
|
String |
getFwRevision(int modId)
Gets the firmware revision number.
|
String |
getIPAddress()
Gets the IP address.
|
int |
getModuleId(String serial)
Gets a module's ID, given its serial number.
|
int[] |
getModuleIds()
Gets all valid module IDs.
|
String |
getModuleName(int modId)
Gets the module name.
|
int |
getModuleOpType(int modId)
Gets the module operation type.
|
static int |
getModuleOpType(Maq20.ModuleType modType)
Gets the module operation type.
|
Maq20.ModuleType |
getModuleType(int modId)
Gets the module type.
|
int |
getNumInputs(int modId)
Gets the number of input channels for a module.
|
int |
getNumOutputs(int modId)
Gets the number of output channels for a module.
|
String |
getSerialNumber(int modId)
Gets the serial number.
|
String |
getSubnetMask()
Gets the subnet mask.
|
boolean |
moduleExists(int modId)
Tests whether a module exists.
|
void |
open(org.lsst.ccs.drivers.modbus.Modbus.ConnType type,
String ident,
int parm1,
int parm2)
Opens a connection to the device.
|
int |
readRegister(short addr)
Reads a register.
|
int |
readRegisterPair(short addr)
Reads an integer from a pair of registers in big-endian order.
|
short[] |
readRegisters(short addr,
short count)
Reads a set of registers.
|
double |
readTemperature()
Reads the board temperature.
|
void |
register(String... serial)
Registers the modules.
|
void |
saveParameters()
Saves the board parameters.
|
void |
setAddressMode(boolean mode)
Sets whether entity numbers are direct addresses.
|
void |
setIPAddress(String ipAddr)
Sets the IP address.
|
void |
setSubnetMask(String mask)
Sets the subnet mask.
|
void |
writeRegister(short addr,
short value)
Writes a single register.
|
void |
writeRegisterPair(short addr,
int value)
Writes an integer to a pair of registers in big-endian order.
|
void |
writeRegisters(short addr,
short[] value)
Writes a set of registers.
|
isAddressMode, open, open, open, readCoils, readDiscretes, readInputs, readRegisters, writeCoil, writeCoils, writeRegister, writeRegistersclose, closeSilent, flush, getTimeout, isOpen, makeDataCharacteristics, open, open, openFtdi, openFtdi, openFtdi, openNet, openNet, openSerial, openSerial, openSerial, read, read, readBytes, readBytes, setCommandTerm, setDefaultParm, setMultidrop, setOptions, setResponseTerm, setTerminator, setTimeout, setTimeout, write, writeBytes, writeBytespublic static final int NUM_MODULES
public static final int OPER_ANALOG
public static final int OPER_ANALOUT
public static final int OPER_DISCRETE
public void open(org.lsst.ccs.drivers.modbus.Modbus.ConnType type,
String ident,
int parm1,
int parm2)
throws org.lsst.ccs.drivers.commons.DriverException
open in class org.lsst.ccs.drivers.modbus.Modbustype - The type of connection to makeident - The device identifier:
host name or IP address for network;
serial number for FTDI device;
port name for serialparm1 - The first device parameter:
port number for network;
baud rate for FTDI or serialparm2 - The second device parameter:
unused for network;
data characteristics for FTDI or serialorg.lsst.ccs.drivers.commons.DriverExceptionpublic void setAddressMode(boolean mode)
setAddressMode in class org.lsst.ccs.drivers.modbus.Modbusmode - Whether or not address mode is to be setpublic short[] readRegisters(short addr,
short count)
throws org.lsst.ccs.drivers.commons.DriverException
addr - The first register addresscount - The number of registers to readorg.lsst.ccs.drivers.commons.DriverExceptionpublic int readRegister(short addr)
throws org.lsst.ccs.drivers.commons.DriverException
addr - The register addressorg.lsst.ccs.drivers.commons.DriverExceptionpublic int readRegisterPair(short addr)
throws org.lsst.ccs.drivers.commons.DriverException
addr - The first register addressorg.lsst.ccs.drivers.commons.DriverExceptionpublic void writeRegister(short addr,
short value)
throws org.lsst.ccs.drivers.commons.DriverException
addr - The register addressvalue - The value to writeorg.lsst.ccs.drivers.commons.DriverExceptionpublic void writeRegisters(short addr,
short[] value)
throws org.lsst.ccs.drivers.commons.DriverException
addr - The first register addressvalue - The array of values to writeorg.lsst.ccs.drivers.commons.DriverExceptionpublic void writeRegisterPair(short addr,
int value)
throws org.lsst.ccs.drivers.commons.DriverException
addr - The first register addressvalue - The integer to writeorg.lsst.ccs.drivers.commons.DriverExceptionpublic boolean moduleExists(int modId)
modId - The module registration IDpublic String getModuleName(int modId) throws org.lsst.ccs.drivers.commons.DriverException
modId - The module registration IDorg.lsst.ccs.drivers.commons.DriverExceptionpublic Maq20.ModuleType getModuleType(int modId) throws org.lsst.ccs.drivers.commons.DriverException
modId - The module registration IDorg.lsst.ccs.drivers.commons.DriverExceptionpublic int getModuleOpType(int modId)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module registration IDorg.lsst.ccs.drivers.commons.DriverExceptionpublic static int getModuleOpType(Maq20.ModuleType modType)
modType - The module typepublic String getSerialNumber(int modId) throws org.lsst.ccs.drivers.commons.DriverException
modId - The module registration IDorg.lsst.ccs.drivers.commons.DriverExceptionpublic String getDateCode(int modId) throws org.lsst.ccs.drivers.commons.DriverException
modId - The module registration IDorg.lsst.ccs.drivers.commons.DriverExceptionpublic String getFwRevision(int modId) throws org.lsst.ccs.drivers.commons.DriverException
modId - The module registration IDorg.lsst.ccs.drivers.commons.DriverExceptionpublic String getIPAddress() throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic void setIPAddress(String ipAddr) throws org.lsst.ccs.drivers.commons.DriverException
ipAddr - The IP address, as an IP stringorg.lsst.ccs.drivers.commons.DriverExceptionpublic String getSubnetMask() throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic void setSubnetMask(String mask) throws org.lsst.ccs.drivers.commons.DriverException
mask - The subnet mask, as an IP stringorg.lsst.ccs.drivers.commons.DriverExceptionpublic double readTemperature()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic void saveParameters()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic void register(String... serial) throws org.lsst.ccs.drivers.commons.DriverException
serial - The serial numbers of all the modules, in the desired orderorg.lsst.ccs.drivers.commons.DriverExceptionpublic int getModuleId(String serial) throws org.lsst.ccs.drivers.commons.DriverException
serial - The module's serial numberorg.lsst.ccs.drivers.commons.DriverExceptionpublic int[] getModuleIds()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic int getNumInputs(int modId)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module registration IDorg.lsst.ccs.drivers.commons.DriverExceptionpublic int getNumOutputs(int modId)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module registration IDorg.lsst.ccs.drivers.commons.DriverExceptionpublic Maq20AnalogIn getAnalIn(int modId) throws org.lsst.ccs.drivers.commons.DriverException
modId - The module registration IDorg.lsst.ccs.drivers.commons.DriverExceptionpublic Maq20AnalogOut getAnalOut(int modId) throws org.lsst.ccs.drivers.commons.DriverException
modId - The module registration IDorg.lsst.ccs.drivers.commons.DriverExceptionpublic Maq20Analog getAnalog(int modId) throws org.lsst.ccs.drivers.commons.DriverException
modId - The module registration IDorg.lsst.ccs.drivers.commons.DriverExceptionpublic Maq20Discrete getDiscrete(int modId) throws org.lsst.ccs.drivers.commons.DriverException
modId - The module registration IDorg.lsst.ccs.drivers.commons.DriverExceptionpublic Maq20DiscreteFreq getDiscFreq(int modId) throws org.lsst.ccs.drivers.commons.DriverException
modId - The module registration IDorg.lsst.ccs.drivers.commons.DriverExceptionpublic Maq20DiscretePulse getDiscPulse(int modId) throws org.lsst.ccs.drivers.commons.DriverException
modId - The module registration IDorg.lsst.ccs.drivers.commons.DriverExceptionpublic Maq20DiscretePWM getDiscPWM(int modId) throws org.lsst.ccs.drivers.commons.DriverException
modId - The module registration IDorg.lsst.ccs.drivers.commons.DriverExceptionCopyright © 2019 LSST. All rights reserved.