|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ProcessCommunicator
Provides process communication with a KNX network.
The process communicator uses application layer group services for communication. Its interface uses high level interaction based on Java data types and blocking read/write functionality.
Field Summary | |
---|---|
static java.lang.String |
ANGLE
Represents the scaling format of datapoint type Angle (DPT ID 5.003). |
static boolean |
BOOL_DECREASE
Represents "decrease" of datapoint type Step (DPT ID 1.007), value = false. |
static boolean |
BOOL_DOWN
Represents "down" of datapoint type Up/Down (DPT ID 1.008), value = true. |
static boolean |
BOOL_INCREASE
Represents "increase" of datapoint type Step (DPT ID 1.007), value = true. |
static boolean |
BOOL_OFF
Represents "off" of datapoint type Switch (DPT ID 1.001), value = false. |
static boolean |
BOOL_ON
Represents "on" of datapoint type Switch (DPT ID 1.001), value = true. |
static boolean |
BOOL_START
Represents "start" of datapoint type Start (DPT ID 1.010), value = true. |
static boolean |
BOOL_STOP
Represents "stop" of datapoint type Start (DPT ID 1.010), value = false. |
static boolean |
BOOL_UP
Represents "up" of datapoint type Up/Down (DPT ID 1.008), value = false. |
static java.lang.String |
SCALING
Represents the scaling format of datapoint type Scaling (DPT ID 5.001). |
static java.lang.String |
UNSCALED
Represents the unscaled format, no scaling is used (like in datapoint types Unsigned count (DPT ID 5.010) or Decimal factor (DPT ID 5.005) ). |
Method Summary | |
---|---|
void |
addProcessListener(ProcessListener l)
Adds the specified event listener l to receive events from this
process communicator. |
KNXNetworkLink |
detach()
Detaches the network link from this process communicator. |
Priority |
getPriority()
Returns the current used KNX message priority for KNX messages. |
int |
getResponseTimeout()
Returns the response timeout used when waiting for a KNX response message to arrive. |
java.lang.String |
read(Datapoint dp)
Reads a datapoint value from a group destination. |
boolean |
readBool(GroupAddress dst)
Reads a boolean datapoint value from a group destination. |
byte |
readControl(GroupAddress dst)
Reads a 3 Bit controlled datapoint value from a group destination. |
float |
readFloat(GroupAddress dst)
Reads a 2 byte KNX float datapoint value from a group destination. |
java.lang.String |
readString(GroupAddress dst)
Reads a string datapoint value from a group destination. |
short |
readUnsigned(GroupAddress dst,
java.lang.String scale)
Reads an unsigned 8 bit datapoint value from a group destination. |
void |
removeProcessListener(ProcessListener l)
Removes the specified event listener l , so it does no longer
receive events from this process communicator. |
void |
setPriority(Priority p)
Sets the KNX message priority for KNX messages to send. |
void |
setResponseTimeout(int timeout)
Sets the response timeout to wait for a KNX response message to arrive to complete a message exchange. |
void |
write(Datapoint dp,
java.lang.String value)
Writes a datapoint value to a group destination. |
void |
write(GroupAddress dst,
boolean value)
Writes a boolean datapoint value to a group destination. |
void |
write(GroupAddress dst,
boolean control,
byte stepcode)
Writes a 3 bit controlled datapoint value to a group destination. |
void |
write(GroupAddress dst,
float value)
Writes a 2 byte KNX float datapoint value to a group destination. |
void |
write(GroupAddress dst,
int value,
java.lang.String scale)
Writes a 8 bit unsigned datapoint value to a group destination. |
void |
write(GroupAddress dst,
java.lang.String value)
Writes a string datapoint value to a group destination. |
Field Detail |
---|
static final java.lang.String ANGLE
This format scales the 8 Bit unsigned value range from 0 to 360.
readUnsigned(GroupAddress, String)
,
write(GroupAddress, int, String)
,
Constant Field Valuesstatic final boolean BOOL_DECREASE
write(GroupAddress, boolean)
,
write(GroupAddress, boolean, byte)
,
Constant Field Valuesstatic final boolean BOOL_DOWN
write(GroupAddress, boolean)
,
write(GroupAddress, boolean, byte)
,
Constant Field Valuesstatic final boolean BOOL_INCREASE
write(GroupAddress, boolean)
,
write(GroupAddress, boolean, byte)
,
Constant Field Valuesstatic final boolean BOOL_OFF
write(GroupAddress, boolean)
,
write(GroupAddress, boolean, byte)
,
Constant Field Valuesstatic final boolean BOOL_ON
write(GroupAddress, boolean)
,
write(GroupAddress, boolean, byte)
,
Constant Field Valuesstatic final boolean BOOL_START
write(GroupAddress, boolean)
,
write(GroupAddress, boolean, byte)
,
Constant Field Valuesstatic final boolean BOOL_STOP
write(GroupAddress, boolean)
,
write(GroupAddress, boolean, byte)
,
Constant Field Valuesstatic final boolean BOOL_UP
write(GroupAddress, boolean)
,
write(GroupAddress, boolean, byte)
,
Constant Field Valuesstatic final java.lang.String SCALING
This format scales the 8 Bit unsigned value range from 0 to 100.
readUnsigned(GroupAddress, String)
,
write(GroupAddress, int, String)
,
Constant Field Valuesstatic final java.lang.String UNSCALED
readUnsigned(GroupAddress, String)
,
write(GroupAddress, int, String)
,
Constant Field ValuesMethod Detail |
---|
void addProcessListener(ProcessListener l)
l
to receive events from this
process communicator.
If l
was already added as listener, no action is performed.
l
- the listener to addKNXNetworkLink detach()
If no network link is attached, no action is performed.
Note that a detach does not trigger a close of the used network link.
null
if already
detachedPriority getPriority()
int getResponseTimeout()
java.lang.String read(Datapoint dp) throws KNXException
The used KNX message priority is according the supplied datapoint priority.
dp
- the datapoint for read
KNXTimeoutException
- on a timeout during send or no read response was
received
KNXInvalidResponseException
- on invalid read response message
KNXLinkClosedException
- if network link to KNX network is closed
KNXFormatException
- on translation problem of the response data
KNXException
- if no appropriate DPT translator for the datapoint type is
availableboolean readBool(GroupAddress dst) throws KNXException
dst
- group destination to read from
KNXTimeoutException
- on a timeout during send or no read response was
received
KNXInvalidResponseException
- on invalid read response message
KNXLinkClosedException
- if network link to KNX network is closed
KNXFormatException
- on translation problem of the response data
KNXException
- on other read problemsbyte readControl(GroupAddress dst) throws KNXException
The returned value is either positive or negative according to the read control information. For control bit orientation, the DPT Dimming (DPT ID 3.007) is used (i.e. control bit type Step). A control value of "decrease" results in a negative value return, a control value of "increase" results in a positive value return. The possible value range is -7 (decrease 7) to +7 (increase 7).
dst
- group destination to read from
KNXTimeoutException
- on a timeout during send or no read response was
received
KNXInvalidResponseException
- on invalid read response message
KNXLinkClosedException
- if network link to KNX network is closed
KNXFormatException
- on translation problem of the response data
KNXException
- on other read problemsfloat readFloat(GroupAddress dst) throws KNXException
dst
- group destination to read from
KNXTimeoutException
- on a timeout during send or no read response was
received
KNXInvalidResponseException
- on invalid read response message
KNXLinkClosedException
- if network link to KNX network is closed
KNXFormatException
- on translation problem of the response data
KNXException
- on other read problemsjava.lang.String readString(GroupAddress dst) throws KNXException
The supported character set covers at least ISO-8859-1 (Latin 1), with an allowed string length of 14 characters.
dst
- group destination to read from
KNXTimeoutException
- on a timeout during send or no read response was
received
KNXInvalidResponseException
- on invalid read response message
KNXLinkClosedException
- if network link to KNX network is closed
KNXFormatException
- on translation problem of the response data
KNXException
- on other read problemsshort readUnsigned(GroupAddress dst, java.lang.String scale) throws KNXException
The predefined scaling format constants are equal to DPT identifiers of the 8 Bit DPT translator, any other suiting IDs of that type might be specified as well.
dst
- group destination to read fromscale
- scaling of the read value before return, one of SCALING
,
UNSCALED
, ANGLE
KNXTimeoutException
- on a timeout during send or no read response was
received
KNXInvalidResponseException
- on invalid read response message
KNXLinkClosedException
- if network link to KNX network is closed
KNXFormatException
- on translation problem of the response data
KNXException
- on other read problemsvoid removeProcessListener(ProcessListener l)
l
, so it does no longer
receive events from this process communicator.
If l
was not added in the first place, no action is performed.
l
- the listener to removevoid setPriority(Priority p)
p
- new priority to usevoid setResponseTimeout(int timeout)
timeout
- time in secondsvoid write(Datapoint dp, java.lang.String value) throws KNXException
The used KNX message priority is according the supplied datapoint priority.
dp
- the datapoint for writevalue
- datapoint value in textual representation according the datapoint its
type
KNXTimeoutException
- on a timeout during send
KNXFormatException
- on translation problem of the supplied datapoint value
KNXLinkClosedException
- if network link to KNX network is closed
KNXException
- if no appropriate DPT translator for the datapoint type is
availablevoid write(GroupAddress dst, boolean value) throws KNXTimeoutException, KNXLinkClosedException
dst
- group destination to write tovalue
- boolean value to write, consider the predefined BOOL_* constants (e.g.
BOOL_ON
)
KNXTimeoutException
- on a timeout during send
KNXLinkClosedException
- if network link to KNX network is closedvoid write(GroupAddress dst, boolean control, byte stepcode) throws KNXException
dst
- group destination to write tocontrol
- control information, one of the predefined BOOL_* constants of DPT
Step and DPT Up/Downstepcode
- stepcode value, 0 <= value <= 7
KNXTimeoutException
- on a timeout during send
KNXFormatException
- on translation problem of the supplied datapoint value
KNXLinkClosedException
- if network link to KNX network is closed
KNXException
- on other write problemsvoid write(GroupAddress dst, float value) throws KNXException
dst
- group destination to write tovalue
- float value to write
KNXTimeoutException
- on a timeout during send
KNXFormatException
- on translation problem of the supplied datapoint value
KNXLinkClosedException
- if network link to KNX network is closed
KNXException
- on other write problemsvoid write(GroupAddress dst, int value, java.lang.String scale) throws KNXException
The predefined scaling format constants are equal to DPT identifiers of the 8 Bit DPT translator, any other suiting IDs of that type might be specified as well.
dst
- group destination to write tovalue
- unsigned scaled value to write, 0 <= value <= scale format
specific upper valuescale
- scaling of the read value before return, one of SCALING
,
UNSCALED
, ANGLE
KNXTimeoutException
- on a timeout during send
KNXFormatException
- on translation problem of the supplied datapoint value
KNXLinkClosedException
- if network link to KNX network is closed
KNXException
- on other write problemsvoid write(GroupAddress dst, java.lang.String value) throws KNXException
The supported character set covers at least ISO-8859-1 (Latin 1), with an allowed string length of 14 characters.
dst
- group destination to write tovalue
- string value to write
KNXTimeoutException
- on a timeout during send
KNXFormatException
- on translation problem of the supplied datapoint value
KNXLinkClosedException
- if network link to KNX network is closed
KNXException
- on other write problems
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |