Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

Commit

Permalink
added nfc config parameter
Browse files Browse the repository at this point in the history
set values to undef, when no tag is read or an error happened (default is false)

Signed-off-by: André Kühnert [email protected] (github: andiikaa)
Signed-off-by: andiikaa <[email protected]>
  • Loading branch information
andiikaa committed May 16, 2019
1 parent 1d593cd commit 2d0a87e
Show file tree
Hide file tree
Showing 13 changed files with 772 additions and 578 deletions.
1 change: 1 addition & 0 deletions bundles/binding/org.openhab.binding.tinkerforge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2882,6 +2882,7 @@ After that, the switch must be triggered to start the scanning again.
| delayAfterScan | The delay after a nfc tag was read and the next autoscan is triggered. | any time in ms e.g. 3000(default) |
| resetOldValues | Resets the values of all subdevices, when a new tag is read. | True(default), False |
| triggeredScan | If set to true, the scan for tags is triggered via *ON* command. Otherwise it is scanned permanently for tags. | False(default), True |
| clearValuesOnError | If set to true, each time no tag is read due to an error or when no tag is available, the item states are set to UNDEF | False(default), True |

| subdevice | description |
|-----------|-------------|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1453,6 +1453,7 @@ class BrickletOLEDConfiguration extends TFConfig {
}

class NFCConfiguration extends TFConfig{
boolean clearValuesOnError = "false"
boolean resetOldValues = "true"
boolean triggeredScan = "false"
int delayAfterScan = "3000"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32878,6 +32878,16 @@ public interface ModelPackage extends EPackage {
*/
int NFC_CONFIGURATION = 217;

/**
* The feature id for the '<em><b>Clear Values On Error</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
* @ordered
*/
int NFC_CONFIGURATION__CLEAR_VALUES_ON_ERROR = TF_CONFIG_FEATURE_COUNT + 0;

/**
* The feature id for the '<em><b>Reset Old Values</b></em>' attribute.
* <!-- begin-user-doc -->
Expand All @@ -32886,7 +32896,7 @@ public interface ModelPackage extends EPackage {
* @generated
* @ordered
*/
int NFC_CONFIGURATION__RESET_OLD_VALUES = TF_CONFIG_FEATURE_COUNT + 0;
int NFC_CONFIGURATION__RESET_OLD_VALUES = TF_CONFIG_FEATURE_COUNT + 1;

/**
* The feature id for the '<em><b>Triggered Scan</b></em>' attribute.
Expand All @@ -32896,7 +32906,7 @@ public interface ModelPackage extends EPackage {
* @generated
* @ordered
*/
int NFC_CONFIGURATION__TRIGGERED_SCAN = TF_CONFIG_FEATURE_COUNT + 1;
int NFC_CONFIGURATION__TRIGGERED_SCAN = TF_CONFIG_FEATURE_COUNT + 2;

/**
* The feature id for the '<em><b>Delay After Scan</b></em>' attribute.
Expand All @@ -32906,7 +32916,7 @@ public interface ModelPackage extends EPackage {
* @generated
* @ordered
*/
int NFC_CONFIGURATION__DELAY_AFTER_SCAN = TF_CONFIG_FEATURE_COUNT + 2;
int NFC_CONFIGURATION__DELAY_AFTER_SCAN = TF_CONFIG_FEATURE_COUNT + 3;

/**
* The number of structural features of the '<em>NFC Configuration</em>' class.
Expand All @@ -32916,7 +32926,7 @@ public interface ModelPackage extends EPackage {
* @generated
* @ordered
*/
int NFC_CONFIGURATION_FEATURE_COUNT = TF_CONFIG_FEATURE_COUNT + 3;
int NFC_CONFIGURATION_FEATURE_COUNT = TF_CONFIG_FEATURE_COUNT + 4;

/**
* The number of operations of the '<em>NFC Configuration</em>' class.
Expand Down Expand Up @@ -42941,6 +42951,20 @@ public interface ModelPackage extends EPackage {
*/
EClass getNFCConfiguration();

/**
* Returns the meta object for the attribute
* '{@link org.openhab.binding.tinkerforge.internal.model.NFCConfiguration#isClearValuesOnError <em>Clear Values On
* Error</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @return the meta object for the attribute '<em>Clear Values On Error</em>'.
* @see org.openhab.binding.tinkerforge.internal.model.NFCConfiguration#isClearValuesOnError()
* @see #getNFCConfiguration()
* @generated
*/
EAttribute getNFCConfiguration_ClearValuesOnError();

/**
* Returns the meta object for the attribute
* '{@link org.openhab.binding.tinkerforge.internal.model.NFCConfiguration#isResetOldValues <em>Reset Old
Expand Down Expand Up @@ -51381,6 +51405,15 @@ interface Literals {
*/
EClass NFC_CONFIGURATION = eINSTANCE.getNFCConfiguration();

/**
* The meta object literal for the '<em><b>Clear Values On Error</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
EAttribute NFC_CONFIGURATION__CLEAR_VALUES_ON_ERROR = eINSTANCE.getNFCConfiguration_ClearValuesOnError();

/**
* The meta object literal for the '<em><b>Reset Old Values</b></em>' attribute feature.
* <!-- begin-user-doc -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
* The following features are supported:
* </p>
* <ul>
* <li>{@link org.openhab.binding.tinkerforge.internal.model.NFCConfiguration#isClearValuesOnError <em>Clear Values On
* Error</em>}</li>
* <li>{@link org.openhab.binding.tinkerforge.internal.model.NFCConfiguration#isResetOldValues <em>Reset Old
* Values</em>}</li>
* <li>{@link org.openhab.binding.tinkerforge.internal.model.NFCConfiguration#isTriggeredScan <em>Triggered
Expand All @@ -24,6 +26,37 @@
* @generated
*/
public interface NFCConfiguration extends TFConfig {
/**
* Returns the value of the '<em><b>Clear Values On Error</b></em>' attribute.
* The default value is <code>"false"</code>.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Clear Values On Error</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
*
* @return the value of the '<em>Clear Values On Error</em>' attribute.
* @see #setClearValuesOnError(boolean)
* @see org.openhab.binding.tinkerforge.internal.model.ModelPackage#getNFCConfiguration_ClearValuesOnError()
* @model default="false" unique="false"
* @generated
*/
boolean isClearValuesOnError();

/**
* Sets the value of the
* '{@link org.openhab.binding.tinkerforge.internal.model.NFCConfiguration#isClearValuesOnError <em>Clear Values On
* Error</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @param value the new value of the '<em>Clear Values On Error</em>' attribute.
* @see #isClearValuesOnError()
* @generated
*/
void setClearValuesOnError(boolean value);

/**
* Returns the value of the '<em><b>Reset Old Values</b></em>' attribute.
* The default value is <code>"true"</code>.
Expand Down
Loading

0 comments on commit 2d0a87e

Please sign in to comment.