Changes
Page history
docu technologies
authored
Feb 26, 2023
by
Peggy
Hide whitespace changes
Inline
Side-by-side
follow-up-II/RFID-reader.md
View page @
5b8201f7
...
...
@@ -209,6 +209,14 @@ sensorSubmodel.addSubmodelElement(writeTagOperation);
For writing a tag the text has to be passed. To do so, a propterty is initialized and its modeling kind and value type are set additionally. The created submodel is returned and used to host, upload and register it in the following step.
```
java
Property
lastResult
=
new
Property
(
"lastResult"
,
"{}"
);
Supplier
<
Object
>
readLastResultFunction
=
()
->
rfid
.
getLastResult
().
toString
();
AASLambdaPropertyHelper
.
setLambdaValue
(
lastResult
,
readLastResultFunction
,
null
);
```
With this property the last read result is made available. It is only possible to get the value, it cannot be set.
```
java
public
void
hostUploadAndRegister
(
IRfidReader
rfid
,
String
AASID
,
String
AASShortID
,
int
port
)
{
Submodel
sensorModel
=
createRfidModel
(
rfid
);
...
...
...
...