Package org.openwebnet4j.message
Class EnergyManagement
- java.lang.Object
-
- org.openwebnet4j.message.OpenMessage
-
- org.openwebnet4j.message.BaseOpenMessage
-
- org.openwebnet4j.message.EnergyManagement
-
public class EnergyManagement extends BaseOpenMessage
OpenWebNet Energy Management messages (WHO=18)- Author:
- Andrea Conte - Initial contribution
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EnergyManagement.DIM
static class
EnergyManagement.WHAT
-
Field Summary
-
Fields inherited from class org.openwebnet4j.message.BaseOpenMessage
FORMAT_DIMENSION_REQUEST, FORMAT_DIMENSION_WRITING_1P_1V, FORMAT_DIMENSION_WRITING_1V, FORMAT_DIMENSION_WRITING_2V, FORMAT_REQUEST, FORMAT_STATUS, MAX_FRAME_LENGTH, where, whereStr, who
-
Fields inherited from class org.openwebnet4j.message.OpenMessage
FRAME_ACK, FRAME_ACK_NACK_BUSY_START, FRAME_BUSY_NACK, FRAME_END, FRAME_NACK, FRAME_START, FRAME_START_DIM, frameValue
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
EnergyManagement(String value)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description OpenDeviceType
detectDeviceType()
Tries to return aOpenDeviceType
based on frame valueprotected Dim
dimFromValue(int i)
protected void
parseWhere()
Parse WHERE and assigns it toBaseOpenMessage.where
attributestatic EnergyManagement
requestActivePower(String where)
OpenWebNet message request to get active power*#18*WHERE*113##
.static EnergyManagement
setActivePowerNotificationsTime(String where, int time)
OpenWebNet message to set for how many minutes instantaneous active power change notifications will be sent*#18*WHERE*#1200#1*TIME##
.protected What
whatFromValue(int i)
-
Methods inherited from class org.openwebnet4j.message.BaseOpenMessage
addValues, getCommandParams, getDim, getDimParams, getDimValues, getWhat, getWhere, getWho, isCommand, isCommandTranslation, isDimWriting, parse, toStringVerbose
-
Methods inherited from class org.openwebnet4j.message.OpenMessage
equals, getFrameValue, isACK, isBUSY_NACK, isNACK, toString
-
-
-
-
Constructor Detail
-
EnergyManagement
protected EnergyManagement(String value)
-
-
Method Detail
-
parseWhere
protected void parseWhere() throws FrameException
Description copied from class:BaseOpenMessage
Parse WHERE and assigns it toBaseOpenMessage.where
attribute- Specified by:
parseWhere
in classBaseOpenMessage
- Throws:
FrameException
- in case of error in frame
-
dimFromValue
protected Dim dimFromValue(int i)
- Specified by:
dimFromValue
in classBaseOpenMessage
-
whatFromValue
protected What whatFromValue(int i)
- Specified by:
whatFromValue
in classBaseOpenMessage
-
detectDeviceType
public OpenDeviceType detectDeviceType() throws FrameException
Description copied from class:BaseOpenMessage
Tries to return aOpenDeviceType
based on frame value- Specified by:
detectDeviceType
in classBaseOpenMessage
- Returns:
- recognized device type or null if not device can be recognized
- Throws:
FrameException
- in case of error in frame
-
requestActivePower
public static EnergyManagement requestActivePower(String where)
OpenWebNet message request to get active power*#18*WHERE*113##
.- Parameters:
where
- WHERE string- Returns:
- message
-
setActivePowerNotificationsTime
public static EnergyManagement setActivePowerNotificationsTime(String where, int time)
OpenWebNet message to set for how many minutes instantaneous active power change notifications will be sent*#18*WHERE*#1200#1*TIME##
.- Parameters:
where
- WHERE stringtime
- For how many minutes (0-255) active power change notifications will be sent. With time=0 active power change notifications will be stopped.- Returns:
- message
-
-