Package org.eso.ias.converter
Class ValueMapper
java.lang.Object
org.eso.ias.converter.ValueMapper
The function to convert a string received from a plugin
(i.e. a
MonitorPointData
) to a value to send
to the core of the AIS (i.e. a IASValue
.
If something went wrong during the mapping, the exception is masked and a log issued for investigation. In that case the received monitor point is lost.
- Author:
- acaproni
-
Field Summary
-
Constructor Summary
ConstructorDescriptionValueMapper
(IasioConfigurationDAO configDao, IasValueStringSerializer iasValueStrSerializer, String converterID) Constructor -
Method Summary
Modifier and TypeMethodDescriptionEffectively translate the string received from the plugin in the string to send to the core of the IASgetId
(org.eso.ias.types.Identifier identifier) Get the id taking template into accountIASValue<?>
translate
(org.eso.ias.types.Identifier identifier, MonitorPointData remoteSystemData, IASTypes type, long receptionTStamp, Optional<Integer> minTemplateIndex, Optional<Integer> maxTemplateIndex) Convert theMonitorPointData
received by a plugin to aIASValue
to send to the core of the IAS
-
Field Details
-
logger
public static final org.slf4j.Logger loggerThe logger
-
-
Constructor Details
-
ValueMapper
public ValueMapper(IasioConfigurationDAO configDao, IasValueStringSerializer iasValueStrSerializer, String converterID) Constructor- Parameters:
configDao
- The DAO to get the configuration of monitor pointsiasValueStrSerializer
- The serializer to transform a IASValue in the proper stringconverterID
- The identifier of the converter
-
-
Method Details
-
translate
public IASValue<?> translate(org.eso.ias.types.Identifier identifier, MonitorPointData remoteSystemData, IASTypes type, long receptionTStamp, Optional<Integer> minTemplateIndex, Optional<Integer> maxTemplateIndex) Convert theMonitorPointData
received by a plugin to aIASValue
to send to the core of the IAS- Parameters:
identifier
- : the Identifier of the monitor pointremoteSystemData
- the monitor point to translatetype
- the type of the monitor pointreceptionTStamp
- the timestamp when the monitor point data has been received- Returns:
- the IASValue corresponding on the monitor point
-
getId
Get the id taking template into account- Parameters:
identifier
- The identifier- Returns:
- the ID cleaned of the template index
-
apply
Effectively translate the string received from the plugin in the string to send to the core of the IAS
-