Package org.openmuc.framework.data
Enum Flag
- java.lang.Object
-
- java.lang.Enum<Flag>
-
- org.openmuc.framework.data.Flag
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Flag>
public enum Flag extends java.lang.Enum<Flag>
Flags indicates the state of a record. It identifies which type of error occurred or if the value is valid.
More informations of the occurred errors can often seen in the OpenMUC log files in the "log" folder.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ACCESS_METHOD_NOT_SUPPORTED
Flag 6: If a access method is chosen which is not supported or implemented.CANNOT_WRITE_NULL_VALUE
Flag 27: It is not allowed to write null values.CHANNEL_DELETED
Flag 14: The channel was deleted.COMM_DEVICE_NOT_CONNECTED
Flag 17: The communication device is not connected.CONNECTING
Flag 8: The driver tries to connect to the device.CONNECTION_EXCEPTION
Flag 29: Connection exception.CUSTOM_ERROR_0
Flag 50: Error flags for custom record states.CUSTOM_ERROR_1
Flag 51: Error flags for custom record states.CUSTOM_ERROR_2
Flag 52: Error flags for custom record states.CUSTOM_ERROR_3
Flag 53: Error flags for custom record states.CUSTOM_ERROR_4
Flag 54: Error flags for custom record states.CUSTOM_ERROR_5
Flag 55: Error flags for custom record states.CUSTOM_ERROR_6
Flag 56: Error flags for custom record states.CUSTOM_ERROR_7
Flag 57: Error flags for custom record states.CUSTOM_ERROR_8
Flag 58: Error flags for custom record states.CUSTOM_ERROR_9
Flag 59: Error flags for custom record states.DATA_LOGGING_NOT_ACTIVE
Flag 32: Data logging is not activated in the configuration.DEVICE_OR_INTERFACE_BUSY
Flag 5: The device was still busy while sampling.DISABLED
Flag 13: The channel is disabled.DISCONNECTING
Flag 10: The driver is disconnecting.DRIVER_ERROR_CHANNEL_ADDRESS_SYNTAX_INVALID
Flag 18: The configured channel address does not fit to the driver channel address syntax.DRIVER_ERROR_CHANNEL_NOT_ACCESSIBLE
Flag 20: The channel is not accessible.DRIVER_ERROR_CHANNEL_NOT_PART_OF_SAMPLING_GROUP
Flag 26: The channel is not part of the group.DRIVER_ERROR_CHANNEL_TEMPORARILY_NOT_ACCESSIBLE
Flag 21: The channel is temporarily not accessible.DRIVER_ERROR_CHANNEL_VALUE_TYPE_CONVERSION_EXCEPTION
Flag 22: The protocol value type is not convertible to this OpenMUC value type.DRIVER_ERROR_CHANNEL_WITH_THIS_ADDRESS_NOT_FOUND
Flag 19: The driver was not able to find a channel with the configured name.DRIVER_ERROR_DECODING_RESPONSE_FAILED
Flag 31: The driver was not able to decoding the received response.DRIVER_ERROR_READ_FAILURE
Flag 28: Error while reading.DRIVER_ERROR_SAMPLING_GROUP_NOT_ACCESSIBLE
Flag 25: The group is not accessibleDRIVER_ERROR_SAMPLING_GROUP_NOT_FOUND
Flag 24: The driver could not find the group with the configured name.DRIVER_ERROR_TIMEOUT
Flag 30: Timeout occurred in driver.DRIVER_ERROR_UNSPECIFIED
Flag 33: The driver error is not specified.DRIVER_THREW_UNKNOWN_EXCEPTION
Flag 16: The driver was not able to identify the error.DRIVER_UNAVAILABLE
Flag 11: The driver with the configured driver id could not found.INFEASIBLE_TO_SAMPLE_CHANNEL_GROUP_IN_ONE_REQUEST
Flag 23: Infeasible to sample this group in one request.NO_VALUE_RECEIVED_YET
Flag 7: This flag is mostly shown in listening mode and no value are received.SAMPLING_AND_LISTENING_DISABLED
Flag 12: Neither sampling nor listening are activatedSTARTED_LATE_AND_TIMED_OUT
Flag 15: Started sampling task too late and timed out due to a timeout of the previous sampling task.TIMEOUT
Flag 2: Timeout occurred in a DataManager task.UNKNOWN_ERROR
Flag 3: If the error could not be specified.VALID
Flag 1: Valid data.VALUE_IS_INFINITY
Flag 35: Got a "infinity" value.VALUE_IS_NAN
Flag 34: Got a "not a number" value.WAITING_FOR_CONNECTION_RETRY
Flag 9: The driver was not able to connect and retries to connect after the configured time.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte
getCode()
static Flag
newFlag(int code)
static Flag
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Flag[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
VALID
public static final Flag VALID
Flag 1: Valid data.
-
TIMEOUT
public static final Flag TIMEOUT
Flag 2: Timeout occurred in a DataManager task. For example, if the sampling task took longer then the specified samplingTimeout then this flag is set.
-
UNKNOWN_ERROR
public static final Flag UNKNOWN_ERROR
Flag 3: If the error could not be specified.
-
DEVICE_OR_INTERFACE_BUSY
public static final Flag DEVICE_OR_INTERFACE_BUSY
Flag 5: The device was still busy while sampling. This case can happen if the previous sampling failed due to a timeout (Flag 15). The sampling task couldn't start because an other sampling task is still running.
-
ACCESS_METHOD_NOT_SUPPORTED
public static final Flag ACCESS_METHOD_NOT_SUPPORTED
Flag 6: If a access method is chosen which is not supported or implemented.
-
NO_VALUE_RECEIVED_YET
public static final Flag NO_VALUE_RECEIVED_YET
Flag 7: This flag is mostly shown in listening mode and no value are received.
-
CONNECTING
public static final Flag CONNECTING
Flag 8: The driver tries to connect to the device.
-
WAITING_FOR_CONNECTION_RETRY
public static final Flag WAITING_FOR_CONNECTION_RETRY
Flag 9: The driver was not able to connect and retries to connect after the configured time.
-
DISCONNECTING
public static final Flag DISCONNECTING
Flag 10: The driver is disconnecting.
-
DRIVER_UNAVAILABLE
public static final Flag DRIVER_UNAVAILABLE
Flag 11: The driver with the configured driver id could not found. Possible reasons:
- the driver bundle is missing
- the configured driver id is wrong
-
SAMPLING_AND_LISTENING_DISABLED
public static final Flag SAMPLING_AND_LISTENING_DISABLED
Flag 12: Neither sampling nor listening are activated
-
DISABLED
public static final Flag DISABLED
Flag 13: The channel is disabled.
-
CHANNEL_DELETED
public static final Flag CHANNEL_DELETED
Flag 14: The channel was deleted.
-
STARTED_LATE_AND_TIMED_OUT
public static final Flag STARTED_LATE_AND_TIMED_OUT
Flag 15: Started sampling task too late and timed out due to a timeout of the previous sampling task.
-
DRIVER_THREW_UNKNOWN_EXCEPTION
public static final Flag DRIVER_THREW_UNKNOWN_EXCEPTION
Flag 16: The driver was not able to identify the error.
-
COMM_DEVICE_NOT_CONNECTED
public static final Flag COMM_DEVICE_NOT_CONNECTED
Flag 17: The communication device is not connected.
-
DRIVER_ERROR_CHANNEL_ADDRESS_SYNTAX_INVALID
public static final Flag DRIVER_ERROR_CHANNEL_ADDRESS_SYNTAX_INVALID
Flag 18: The configured channel address does not fit to the driver channel address syntax.
-
DRIVER_ERROR_CHANNEL_WITH_THIS_ADDRESS_NOT_FOUND
public static final Flag DRIVER_ERROR_CHANNEL_WITH_THIS_ADDRESS_NOT_FOUND
Flag 19: The driver was not able to find a channel with the configured name.
-
DRIVER_ERROR_CHANNEL_NOT_ACCESSIBLE
public static final Flag DRIVER_ERROR_CHANNEL_NOT_ACCESSIBLE
Flag 20: The channel is not accessible.
-
DRIVER_ERROR_CHANNEL_TEMPORARILY_NOT_ACCESSIBLE
public static final Flag DRIVER_ERROR_CHANNEL_TEMPORARILY_NOT_ACCESSIBLE
Flag 21: The channel is temporarily not accessible.
-
DRIVER_ERROR_CHANNEL_VALUE_TYPE_CONVERSION_EXCEPTION
public static final Flag DRIVER_ERROR_CHANNEL_VALUE_TYPE_CONVERSION_EXCEPTION
Flag 22: The protocol value type is not convertible to this OpenMUC value type.
-
INFEASIBLE_TO_SAMPLE_CHANNEL_GROUP_IN_ONE_REQUEST
public static final Flag INFEASIBLE_TO_SAMPLE_CHANNEL_GROUP_IN_ONE_REQUEST
Flag 23: Infeasible to sample this group in one request. Perhaps the group is to big.
-
DRIVER_ERROR_SAMPLING_GROUP_NOT_FOUND
public static final Flag DRIVER_ERROR_SAMPLING_GROUP_NOT_FOUND
Flag 24: The driver could not find the group with the configured name.
-
DRIVER_ERROR_SAMPLING_GROUP_NOT_ACCESSIBLE
public static final Flag DRIVER_ERROR_SAMPLING_GROUP_NOT_ACCESSIBLE
Flag 25: The group is not accessible
-
DRIVER_ERROR_CHANNEL_NOT_PART_OF_SAMPLING_GROUP
public static final Flag DRIVER_ERROR_CHANNEL_NOT_PART_OF_SAMPLING_GROUP
Flag 26: The channel is not part of the group.
-
CANNOT_WRITE_NULL_VALUE
public static final Flag CANNOT_WRITE_NULL_VALUE
Flag 27: It is not allowed to write null values.
-
DRIVER_ERROR_READ_FAILURE
public static final Flag DRIVER_ERROR_READ_FAILURE
Flag 28: Error while reading.
-
CONNECTION_EXCEPTION
public static final Flag CONNECTION_EXCEPTION
Flag 29: Connection exception. Connection is now disconnected or temporarily disconnected.
-
DRIVER_ERROR_TIMEOUT
public static final Flag DRIVER_ERROR_TIMEOUT
Flag 30: Timeout occurred in driver. Try to increase device specific timeout in deviceSettings.
-
DRIVER_ERROR_DECODING_RESPONSE_FAILED
public static final Flag DRIVER_ERROR_DECODING_RESPONSE_FAILED
Flag 31: The driver was not able to decoding the received response.
-
DATA_LOGGING_NOT_ACTIVE
public static final Flag DATA_LOGGING_NOT_ACTIVE
Flag 32: Data logging is not activated in the configuration.
-
DRIVER_ERROR_UNSPECIFIED
public static final Flag DRIVER_ERROR_UNSPECIFIED
Flag 33: The driver error is not specified.
-
VALUE_IS_NAN
public static final Flag VALUE_IS_NAN
Flag 34: Got a "not a number" value.
-
VALUE_IS_INFINITY
public static final Flag VALUE_IS_INFINITY
Flag 35: Got a "infinity" value.
-
CUSTOM_ERROR_0
public static final Flag CUSTOM_ERROR_0
Flag 50: Error flags for custom record states.
-
CUSTOM_ERROR_1
public static final Flag CUSTOM_ERROR_1
Flag 51: Error flags for custom record states.
-
CUSTOM_ERROR_2
public static final Flag CUSTOM_ERROR_2
Flag 52: Error flags for custom record states.
-
CUSTOM_ERROR_3
public static final Flag CUSTOM_ERROR_3
Flag 53: Error flags for custom record states.
-
CUSTOM_ERROR_4
public static final Flag CUSTOM_ERROR_4
Flag 54: Error flags for custom record states.
-
CUSTOM_ERROR_5
public static final Flag CUSTOM_ERROR_5
Flag 55: Error flags for custom record states.
-
CUSTOM_ERROR_6
public static final Flag CUSTOM_ERROR_6
Flag 56: Error flags for custom record states.
-
CUSTOM_ERROR_7
public static final Flag CUSTOM_ERROR_7
Flag 57: Error flags for custom record states.
-
CUSTOM_ERROR_8
public static final Flag CUSTOM_ERROR_8
Flag 58: Error flags for custom record states.
-
CUSTOM_ERROR_9
public static final Flag CUSTOM_ERROR_9
Flag 59: Error flags for custom record states.
-
-
Method Detail
-
values
public static Flag[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Flag c : Flag.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Flag valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getCode
public byte getCode()
-
newFlag
public static Flag newFlag(int code)
-
-