public LcMacroParaValue getMacroParameter(int macroNumber, int parameter) throws ProtocolException {
LcMacroParaValue result = null;
BidibMessage response =
delegate
.send(delegate.getRequestFactory().createLcMacroParaGet(macroNumber, parameter), RECEIVE_TIMEOUT, true,
LcMacroParaResponse.TYPE);
if (response instanceof LcMacroParaResponse) {
result = ((LcMacroParaResponse) response).getLcMacroParaValue();
}
else {
LOGGER
.warn("No response received for LcMacroParaGetMessage, macroNumber: {}, parameter: {}", macroNumber,
parameter);
throw new ProtocolNoAnswerException(String
.format("No response received for LcMacroParaGetMessage, macroNumber: %d, parameter: %d", macroNumber,
parameter));
}
return result;
}