Main Page | Features | Central Services | csv-Files | Types | Transfer | Access | API-C | API-.NET | API-Java | Examples | Downloads
page generated on 31.05.2023 - 04:45
Public Member Functions | Static Public Member Functions | List of all members
de.desy.tine.definitions.TAccess Class Reference

Data access flags. More...

Public Member Functions

 TAccess (int newMode)
 Constructor. More...
 
void clear ()
 Sets the access mode to CA_NULL.
 
String toString ()
 Returns a string representation of the access mode. More...
 
short toShort ()
 Returns the access mode bits as a short integer. More...
 
boolean includes (short pattern)
 Returns true if all bits which are set in pattern are also set in this object. More...
 
boolean isRead ()
 Returns true if read bit is set. More...
 
boolean isWrite ()
 Returns true if write bit is set. More...
 
boolean isNetwork ()
 Returns true if network bit is set. More...
 
boolean isFirst ()
 Returns true if FIRST bit is set. More...
 
boolean isLast ()
 Returns true if LAST bit is set. More...
 
boolean isNull ()
 Returns true if no bit is set. More...
 
boolean canRetry ()
 
boolean equals (TAccess acc)
 Returns true if all bits are equal. More...
 
boolean includes (TAccess acc)
 Returns true if all mode bits which are set in another object are also set in this object. More...
 
void add (short mode)
 Appends the input access mode flag.
 
void add (TAccess acc)
 Appends the input access mode flag.
 

Static Public Member Functions

static short getAccessCode (String accessString)
 Gets the TINE access code for the given access string. More...
 
static boolean hasExclusiveRead (String accessString)
 Determines whether the given input access string has 'exclusive read' access. More...
 
static boolean isEnforceOutput (String accessString)
 Determines whether the given input property access string enforces the output data type and length. More...
 
static boolean hasUnlockedExclusiveRead (String accessString)
 Determines whether the given input access string has 'exclusive read' access even without an access lock. More...
 
static short toBase (short access)
 converts to the principal access required (combination of CA_READ or CA_WRITE). More...
 
static TAccess valueOf (short mode)
 Converts the given input to a TAccess object. More...
 
static String toString (short access)
 Returns a string representation of the access mode given. More...
 
static boolean isRead (byte access)
 Returns true if read bit is set. More...
 
static boolean isWrite (byte access)
 Returns true if write bit is set. More...
 
static boolean isNetwork (short access)
 Returns true if network bit is set. More...
 
static boolean isFirst (byte access)
 Returns true if FIRST bit is set. More...
 
static boolean isLast (byte access)
 Returns true if LAST bit is set. More...
 
static byte removeBits (byte access, short bits)
 Returns the input access byte with the appropriate bits removed. More...
 
static boolean isSynchronous (byte access)
 Returns true if both the FIRST and LAST bits are set. More...
 

Detailed Description

Data access flags.

The access word in a TLink will contain information pertaining to the type of access requested by the caller or by the subsystem. A client can specify 'CA_READ' or 'CA_WRITE' and in addition ask for a data link over a connected (TCP/IP) socket by specifying 'CA_CONNECT'. A server can examine the access word when handling the call. A server can also determine whether the call is coming from the local alarm server or local history server. Likewise, a server can examine the scope of the call, that is whether the link is starting up (the 'CA_FIRST' bit is set) or going out of scope (the 'CA_LAST' bit is set).

Constructor & Destructor Documentation

◆ TAccess()

de.desy.tine.definitions.TAccess.TAccess ( int  newMode)

Constructor.

Used for when CF-constants are OR-ed

Parameters
newMode

Member Function Documentation

◆ canRetry()

boolean de.desy.tine.definitions.TAccess.canRetry ( )
Returns
true if the access contains the CA_RETRY flag

◆ equals()

boolean de.desy.tine.definitions.TAccess.equals ( TAccess  acc)

Returns true if all bits are equal.

Parameters
acc
Returns

◆ getAccessCode()

static short de.desy.tine.definitions.TAccess.getAccessCode ( String  accessString)
static

Gets the TINE access code for the given access string.

Parameters
accessStringis the access string of the form "READ", "READ|WRITE", "XREAD|WRITE", etc.
Returns
the TINE access code

◆ hasExclusiveRead()

static boolean de.desy.tine.definitions.TAccess.hasExclusiveRead ( String  accessString)
static

Determines whether the given input access string has 'exclusive read' access.

Parameters
accessStringis the access string of the form "READ", "READ|WRITE", "XREAD|WRITE", etc.
Returns
true or false

◆ hasUnlockedExclusiveRead()

static boolean de.desy.tine.definitions.TAccess.hasUnlockedExclusiveRead ( String  accessString)
static

Determines whether the given input access string has 'exclusive read' access even without an access lock.

Parameters
accessStringis the access string of the form "READ", "READ|WRITE", "XREAD|WRITE", etc.
Returns
true of false

◆ includes() [1/2]

boolean de.desy.tine.definitions.TAccess.includes ( short  pattern)

Returns true if all bits which are set in pattern are also set in this object.

Parameters
patternA Bit pattern.
Returns

Referenced by de.desy.tine.definitions.TAccess.includes().

◆ includes() [2/2]

boolean de.desy.tine.definitions.TAccess.includes ( TAccess  acc)

Returns true if all mode bits which are set in another object are also set in this object.

Parameters
acc
Returns

References de.desy.tine.definitions.TAccess.includes().

◆ isEnforceOutput()

static boolean de.desy.tine.definitions.TAccess.isEnforceOutput ( String  accessString)
static

Determines whether the given input property access string enforces the output data type and length.

Parameters
accessStringis the access string of the form "READ", "READ|WRITE", "XREAD|WRITE", etc.
Returns
true or false

◆ isFirst() [1/2]

boolean de.desy.tine.definitions.TAccess.isFirst ( )

Returns true if FIRST bit is set.

Returns
true if FIRST bit is set.

◆ isFirst() [2/2]

static boolean de.desy.tine.definitions.TAccess.isFirst ( byte  access)
static

Returns true if FIRST bit is set.

Parameters
accessis the access byte to test
Returns
true if FIRST bit is set.

◆ isLast() [1/2]

boolean de.desy.tine.definitions.TAccess.isLast ( )

Returns true if LAST bit is set.

Returns
true if LAST bit is set.

◆ isLast() [2/2]

static boolean de.desy.tine.definitions.TAccess.isLast ( byte  access)
static

Returns true if LAST bit is set.

Parameters
accessis the access byte to test
Returns
true if LAST bit is set.

◆ isNetwork() [1/2]

boolean de.desy.tine.definitions.TAccess.isNetwork ( )

Returns true if network bit is set.

Returns
true if read bit is set.

◆ isNetwork() [2/2]

static boolean de.desy.tine.definitions.TAccess.isNetwork ( short  access)
static

Returns true if network bit is set.

Parameters
accessis the access byte to test
Returns
true if read bit is set.

◆ isNull()

boolean de.desy.tine.definitions.TAccess.isNull ( )

Returns true if no bit is set.

Returns

◆ isRead() [1/2]

boolean de.desy.tine.definitions.TAccess.isRead ( )

Returns true if read bit is set.

Returns
true if read bit is set.

Referenced by de.desy.tine.queryUtils.TQuery.getDeviceServerReport(), and de.desy.tine.server.properties.TExportProperty.setAccessMode().

◆ isRead() [2/2]

static boolean de.desy.tine.definitions.TAccess.isRead ( byte  access)
static

Returns true if read bit is set.

Parameters
accessis the access byte to test
Returns
true if read bit is set.

◆ isSynchronous()

static boolean de.desy.tine.definitions.TAccess.isSynchronous ( byte  access)
static

Returns true if both the FIRST and LAST bits are set.

Parameters
accessis the access byte to test
Returns
true if both the FIRST and LAST bits are set.

◆ isWrite() [1/2]

boolean de.desy.tine.definitions.TAccess.isWrite ( )

◆ isWrite() [2/2]

static boolean de.desy.tine.definitions.TAccess.isWrite ( byte  access)
static

Returns true if write bit is set.

Parameters
accessis the access byte to test
Returns
true if write bit is set.

◆ removeBits()

static byte de.desy.tine.definitions.TAccess.removeBits ( byte  access,
short  bits 
)
static

Returns the input access byte with the appropriate bits removed.

Parameters
accessis the access byte from which to remove the bit
bitsare the access bits to remove
Returns
the input access byte with the appropriate bit removed

◆ toBase()

static short de.desy.tine.definitions.TAccess.toBase ( short  access)
static

converts to the principal access required (combination of CA_READ or CA_WRITE).

Parameters
accessis the access mode for which the base mode is desired
Returns
the base access mode (one of CA_NULL, CA_READ, CA_WRITE, or CA_READ|CA_WRITE)

◆ toShort()

short de.desy.tine.definitions.TAccess.toShort ( )

Returns the access mode bits as a short integer.

Returns

Referenced by de.desy.tine.server.equipment.TEquipmentModule.callProperty().

◆ toString() [1/2]

String de.desy.tine.definitions.TAccess.toString ( )

Returns a string representation of the access mode.

Returns
the string representation of the access mode

References de.desy.tine.definitions.TAccess.toString().

Referenced by de.desy.tine.definitions.TAccess.toString().

◆ toString() [2/2]

static String de.desy.tine.definitions.TAccess.toString ( short  access)
static

Returns a string representation of the access mode given.

Parameters
accessis the access mode for which the string representation is desired
Returns
the string representation of the access mode

References de.desy.tine.definitions.TAccess.add().

◆ valueOf()

static TAccess de.desy.tine.definitions.TAccess.valueOf ( short  mode)
static

Converts the given input to a TAccess object.

Parameters
modeis the access mode for which a TAccess object is desired
Returns
a TAccess Object representative of the input mode

The documentation for this class was generated from the following file: