use of org.openmuc.jdlms.SetParameter in project open-smart-grid-platform by OSGP.
the class SetPushSetupAlarmCommandExecutor method getSetParameterPushObjectList.
private SetParameter getSetParameterPushObjectList(final PushSetupAlarmDto pushSetupAlarm) {
final AttributeAddress pushObjectListAddress = new AttributeAddress(CLASS_ID, OBIS_CODE, ATTRIBUTE_ID_PUSH_OBJECT_LIST);
final DataObject value = DataObject.newArrayData(this.pushSetupMapper.mapAsList(pushSetupAlarm.getPushObjectList(), DataObject.class));
return new SetParameter(pushObjectListAddress, value);
}
use of org.openmuc.jdlms.SetParameter in project open-smart-grid-platform by OSGP.
the class SetPushSetupAlarmCommandExecutor method setSendDestinationAndMethod.
private AccessResultCode setSendDestinationAndMethod(final DlmsConnectionManager conn, final PushSetupAlarmDto pushSetupAlarm) throws ProtocolAdapterException {
LOGGER.info("Setting Send destination and method of Push Setup Alarm: {}", pushSetupAlarm.getSendDestinationAndMethod());
final SetParameter setParameterSendDestinationAndMethod = this.getSetParameterSendDestinationAndMethod(pushSetupAlarm);
final AccessResultCode resultCode = this.doSetRequest("PushSetupAlarm, Send destination and method", conn, setParameterSendDestinationAndMethod);
if (resultCode != null) {
return resultCode;
} else {
throw new ProtocolAdapterException("Error setting Alarm push setup data (destination and method.");
}
}
use of org.openmuc.jdlms.SetParameter in project open-smart-grid-platform by OSGP.
the class SetPushSetupAlarmCommandExecutor method setPushObjectList.
private AccessResultCode setPushObjectList(final DlmsConnectionManager conn, final PushSetupAlarmDto pushSetupAlarm) throws ProtocolAdapterException {
LOGGER.info("Setting Push Object List of Push Setup Alarm: {}", pushSetupAlarm.getPushObjectList());
// Before setting the push object list, verify if the objects in the list are really present in
// the meter
this.verifyPushObjects(pushSetupAlarm.getPushObjectList(), conn);
final SetParameter setParameterPushObjectList = this.getSetParameterPushObjectList(pushSetupAlarm);
final AccessResultCode resultCode = this.doSetRequest("PushSetupAlarm, push object list", conn, setParameterPushObjectList);
if (resultCode != null) {
return resultCode;
} else {
throw new ProtocolAdapterException("Error setting Alarm push setup data (push object list).");
}
}
use of org.openmuc.jdlms.SetParameter in project open-smart-grid-platform by OSGP.
the class SetPushSetupAlarmCommandExecutor method getSetParameterSendDestinationAndMethod.
private SetParameter getSetParameterSendDestinationAndMethod(final PushSetupAlarmDto pushSetupAlarm) {
final AttributeAddress sendDestinationAndMethodAddress = new AttributeAddress(CLASS_ID, OBIS_CODE, ATTRIBUTE_ID_SEND_DESTINATION_AND_METHOD);
final DataObject value = this.pushSetupMapper.map(pushSetupAlarm.getSendDestinationAndMethod(), DataObject.class);
return new SetParameter(sendDestinationAndMethodAddress, value);
}
use of org.openmuc.jdlms.SetParameter in project open-smart-grid-platform by OSGP.
the class SetPushSetupSmsCommandExecutor method getSetParameter.
private SetParameter getSetParameter(final PushSetupSmsDto pushSetupSms) throws ProtocolAdapterException {
this.checkPushSetupSms(pushSetupSms);
final AttributeAddress sendDestinationAndMethodAddress = new AttributeAddress(CLASS_ID, OBIS_CODE, ATTRIBUTE_ID_SEND_DESTINATION_AND_METHOD);
final DataObject value = this.pushSetupMapper.map(pushSetupSms.getSendDestinationAndMethod(), DataObject.class);
return new SetParameter(sendDestinationAndMethodAddress, value);
}
Aggregations