Package jisa.addresses
Interface Address
-
- All Known Implementing Classes:
GPIBAddress
,IDAddress
,LXIAddress
,ModbusAddress
,PipeAddress
,SerialAddress
,TCPIPAddress
,USBAddress
,USBRawAddress
,USBTMCAddress
,VISAAddress
public interface Address
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
Address.AddressInstantiator<A extends Address>
-
Field Summary
Fields Modifier and Type Field Description static java.util.List<Address.AddressInstantiator<?>>
TYPES
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static Address
fromString(java.lang.String text)
Attempts to create an Address object, of class representing its type, from a VISA/JISA address string.default java.lang.String
getJISAString()
Returns the JISA text representation of this address (may vary from the VISA representation in some cases).java.util.Map<java.lang.String,java.lang.Object>
getParameters()
Returns a map of this address' configurable parameters.java.lang.String
getTypeName()
Returns a textual representation of this address' type.java.lang.String
getVISAString()
Returns the standard VISA text representation of this address.static Address
parse(java.lang.String text)
Attempts to create an Address object, of class representing its type, from a VISA/JISA address string, or failing that simply wraps the address in as VISAAddress object.void
parseString(java.lang.String text)
Parses a text representation of this type of address, setting its parameters based on those in the text.void
setParameters(java.util.Map<java.lang.String,java.lang.Object> parameters)
Set the parameters of this address from a given map.
-
-
-
Field Detail
-
TYPES
static final java.util.List<Address.AddressInstantiator<?>> TYPES
-
-
Method Detail
-
fromString
static Address fromString(java.lang.String text) throws InvalidAddressFormatException
Attempts to create an Address object, of class representing its type, from a VISA/JISA address string.- Parameters:
text
- Address string- Returns:
- Address object representing address
- Throws:
InvalidAddressFormatException
- Upon address format not being recognised
-
parse
static Address parse(java.lang.String text)
Attempts to create an Address object, of class representing its type, from a VISA/JISA address string, or failing that simply wraps the address in as VISAAddress object.- Parameters:
text
- Address string- Returns:
- Address object
-
getTypeName
java.lang.String getTypeName()
Returns a textual representation of this address' type.- Returns:
- Type of address
-
getVISAString
java.lang.String getVISAString()
Returns the standard VISA text representation of this address.- Returns:
- VISA text representation
-
getJISAString
default java.lang.String getJISAString()
Returns the JISA text representation of this address (may vary from the VISA representation in some cases).- Returns:
- JISA text representation
-
getParameters
java.util.Map<java.lang.String,java.lang.Object> getParameters()
Returns a map of this address' configurable parameters.- Returns:
- Map of parameters
-
setParameters
void setParameters(java.util.Map<java.lang.String,java.lang.Object> parameters)
Set the parameters of this address from a given map.- Parameters:
parameters
- Map of parameters to set
-
parseString
void parseString(java.lang.String text) throws InvalidAddressFormatException
Parses a text representation of this type of address, setting its parameters based on those in the text.- Parameters:
text
- VISA/JISA text representation- Throws:
InvalidAddressFormatException
- If the text representation is not formatted properly for this address type
-
-