Enum Class S7.DataType
- All Implemented Interfaces:
Serializable,Comparable<S7.DataType>,Constable
- Enclosing class:
S7
Data types.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAny data typeArray valueNumber of the data blockNumber of the function blockNumber of the functionNumber of the system data blockBoolean valueUnsigned 8-bit value8-bit characterNumber of the counterDate valueDate and time valueSigned 32-bit integerUnsigned 32-bit valueSigned 16-bit integerMulti-instance FBMulti-instance SFBMemory access32-bit floating-point valueS5 time valueString valueStructure valueSigned time spanTime of day valueNumber of the timerInvalid or unknownUnsigned 16-bit value -
Method Summary
Modifier and TypeMethodDescriptionstatic S7.DataTypefromId(int id) Retrieve a data type from its id.intintgetId()Get the data type id (or code), used for example in binary blocks interfaces or MC7 pointers.static S7.DataTypeReturns the enum constant of this class with the specified name.static S7.DataType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNKNOWN
Invalid or unknown -
BOOL
Boolean value -
BYTE
Unsigned 8-bit value -
CHAR
8-bit character -
WORD
Unsigned 16-bit value -
INT
Signed 16-bit integer -
DWORD
Unsigned 32-bit value -
DINT
Signed 32-bit integer -
REAL
32-bit floating-point value -
DATE
Date value -
TIME_OF_DAY
Time of day value -
TIME
Signed time span -
S5TIME
S5 time value -
DATE_AND_TIME
Date and time value -
ARRAY
Array value -
STRUCT
Structure value -
STRING
String value -
POINTER
Memory access -
MULTI_INST_FB
Multi-instance FB -
ANY
Any data type -
BLOCK_FB
Number of the function block -
BLOCK_FC
Number of the function -
BLOCK_DB
Number of the data block -
BLOCK_SDB
Number of the system data block -
MULTI_INST_SFB
Multi-instance SFB -
COUNTER
Number of the counter -
TIMER
Number of the timer
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getId
public int getId()Get the data type id (or code), used for example in binary blocks interfaces or MC7 pointers.- Returns:
- data type id
-
getBitsize
public int getBitsize()- Returns:
- bitsize in memory, -1 if unknown or variable
-
fromId
Retrieve a data type from its id.- Parameters:
id- data type id- Returns:
- data type, or
UNKNOWN
-