Package org.openwebnet4j.message
Class GatewayMgmt
- java.lang.Object
 - 
- org.openwebnet4j.message.OpenMessage
 - 
- org.openwebnet4j.message.BaseOpenMessage
 - 
- org.openwebnet4j.message.GatewayMgmt
 
 
 
 
- 
public class GatewayMgmt extends BaseOpenMessage
- Author:
 - M. Valla - Initial contribution
 
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGatewayMgmt.DIMstatic classGatewayMgmt.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 protectedGatewayMgmt(String value) 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description OpenDeviceTypedetectDeviceType()Tries to return aOpenDeviceTypebased on frame valueprotected DimdimFromValue(int i)static StringparseFirmwareVersion(GatewayMgmt msg)static byte[]parseMACAddress(GatewayMgmt msg)Parse MAC address in the OWN message and return values in byte[]protected voidparseWhere()Parse WHERE and assigns it toBaseOpenMessage.whereattributestatic GatewayMgmtrequestFirmwareVersion()OpenWebNet message request for gateway firmware version*#13**16##.static GatewayMgmtrequestKeepConnect()OpenWebNet message request keep connect*13*60*##.static GatewayMgmtrequestMACAddress()OpenWebNet message request for gateway MAC address*#13**12##.static GatewayMgmtrequestModel()OpenWebNet message request for gateway model*#13**15##.static GatewayMgmtrequestProductInfo(int index)OpenWebNet message request for product information*#13**66*index##.static GatewayMgmtrequestScanNetwork()OpenWebNet message request to scan network*13*65*##.static GatewayMgmtrequestSupervisor()OpenWebNet message request for supervisor mode*13*66*##.protected WhatwhatFromValue(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
- 
GatewayMgmt
protected GatewayMgmt(String value)
 
 - 
 
- 
Method Detail
- 
whatFromValue
protected What whatFromValue(int i)
- Specified by:
 whatFromValuein classBaseOpenMessage
 
- 
dimFromValue
protected Dim dimFromValue(int i)
- Specified by:
 dimFromValuein classBaseOpenMessage
 
- 
requestSupervisor
public static GatewayMgmt requestSupervisor()
OpenWebNet message request for supervisor mode*13*66*##.- Returns:
 - GatewayMgmt message
 
 
- 
requestKeepConnect
public static GatewayMgmt requestKeepConnect()
OpenWebNet message request keep connect*13*60*##.- Returns:
 - GatewayMgmt message
 
 
- 
requestMACAddress
public static GatewayMgmt requestMACAddress()
OpenWebNet message request for gateway MAC address*#13**12##.- Returns:
 - GatewayMgmt message
 
 
- 
parseMACAddress
public static byte[] parseMACAddress(GatewayMgmt msg) throws FrameException
Parse MAC address in the OWN message and return values in byte[]- Parameters:
 msg- the message to parse- Returns:
 - byte[] MAC address values
 - Throws:
 FrameException- in case of error in frame
 
- 
requestModel
public static GatewayMgmt requestModel()
OpenWebNet message request for gateway model*#13**15##.- Returns:
 - GatewayMgmt message
 
 
- 
requestFirmwareVersion
public static GatewayMgmt requestFirmwareVersion()
OpenWebNet message request for gateway firmware version*#13**16##.- Returns:
 - GatewayMgmt message
 
 
- 
parseFirmwareVersion
public static String parseFirmwareVersion(GatewayMgmt msg) throws FrameException
- Throws:
 FrameException
 
- 
requestScanNetwork
public static GatewayMgmt requestScanNetwork()
OpenWebNet message request to scan network*13*65*##.- Returns:
 - GatewayMgmt message
 
 
- 
requestProductInfo
public static GatewayMgmt requestProductInfo(int index)
OpenWebNet message request for product information*#13**66*index##.NOTE Due to a bug in the USB gateway, request product info message must use
*to separate index instead of#:*#13**66*index##instead of*#13**66#index##as documented in OpenWebNet specs.- Parameters:
 index- The index of the product inside the gateway products database as returned from network scan. Index starts at 0.- Returns:
 - GatewayMgmt message
 
 
- 
parseWhere
protected void parseWhere() throws FrameExceptionDescription copied from class:BaseOpenMessageParse WHERE and assigns it toBaseOpenMessage.whereattribute- Specified by:
 parseWherein classBaseOpenMessage- Throws:
 FrameException- in case of error in frame
 
- 
detectDeviceType
public OpenDeviceType detectDeviceType()
Description copied from class:BaseOpenMessageTries to return aOpenDeviceTypebased on frame value- Specified by:
 detectDeviceTypein classBaseOpenMessage- Returns:
 - recognized device type or null if not device can be recognized
 
 
 - 
 
 -