|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface HCIMessage
An instance of HCIMessage is used to get access to the content of a received HCI message.
Sub interfaces will typically have additional methods for sending HCI service specific HCI messages.
Instances of HCIMessage hide the fragmentation of messages on the HCI layer (see TS 102 622). However, as receive and send buffers with limited capacity will be used (size depends on the application itself) it provides methods to check if a message is complete (see isHeading() and isComplete()) in order to support streaming of long messages. (editors note: move statements about buffer sizes from getReceiveBuffer()to the previous paragraph.) (editor's note: check what the following sentence means:) in order to chain multiple trigger session the application will need to use applicative callback for consume or produce the message.
Notes:
getReceiveBuffer()
HCIListener| Field Summary | |
|---|---|
static byte |
INS_ANY_CLOSE_PIPE
The command to close a pipe |
static byte |
INS_ANY_GET_PARAMETER
The command to get a parameter from a registry |
static byte |
INS_ANY_OPEN_PIPE
The command to open a pipe |
static byte |
INS_ANY_SET_PARAMETER
The command to set a parameter in a registry |
static byte |
RESP_ADM_E_NO_PIPES_AVAILABLE
no more dynamic pipes can be created |
static byte |
RESP_ANY_E_CMD_NOT_SUPPORTED
the command is not supported by the gate |
static byte |
RESP_ANY_E_CMD_PAR_UNKNOWN
the format of the command parameters is wrong |
static byte |
RESP_ANY_E_INHIBITED
command is inhibited due to failure of lower layer identity check |
static byte |
RESP_ANY_E_NOK
command was rejected and/or not completed |
static byte |
RESP_ANY_E_NOT_CONNECTED
the destination host is not connected |
static byte |
RESP_ANY_E_PIPE_ACCESS_DENIED
Permission denied to create a pipe due to a WHITELIST violation |
static byte |
RESP_ANY_E_PIPE_NOT_OPENED
the pipe is not open |
static byte |
RESP_ANY_E_REG_ACCESS_DENIED
permission denied to write/read a value to/from a registry |
static byte |
RESP_ANY_E_REG_PAR_UNKNOWN
the registry parameter identifier is either unknown to the registry or an optional registry parameter is not implemented |
static byte |
RESP_ANY_OK
command completed successfully (with optional parameters) |
static byte |
TYPE_COMMAND
a command |
static byte |
TYPE_EVENT
an event |
static byte |
TYPE_RESPONSE
a response |
| Method Summary | |
|---|---|
byte |
getInstruction()
editor's note: check if needed and reword or delete accordingly). |
byte[] |
getReceiveBuffer()
return the underlying receive message buffer. |
short |
getReceiveLength()
This method returns the length of the received message data. |
short |
getReceiveOffset()
This method returns the offset to the received message data in the receive buffer. |
byte |
getType()
return the message type (b8-b7 of the message header) editor's note: check if this method is still needed. |
boolean |
isComplete()
return true if the message is complete. |
boolean |
isHeading()
return true if the current message part is the heading part of the message e.g the first part of an incoming message (and possibly the last if message is complete). |
| Field Detail |
|---|
static final byte TYPE_COMMAND
static final byte TYPE_EVENT
static final byte TYPE_RESPONSE
static final byte INS_ANY_SET_PARAMETER
static final byte INS_ANY_GET_PARAMETER
static final byte INS_ANY_OPEN_PIPE
static final byte INS_ANY_CLOSE_PIPE
static final byte RESP_ANY_OK
static final byte RESP_ANY_E_NOT_CONNECTED
static final byte RESP_ANY_E_CMD_PAR_UNKNOWN
static final byte RESP_ANY_E_NOK
static final byte RESP_ADM_E_NO_PIPES_AVAILABLE
static final byte RESP_ANY_E_REG_PAR_UNKNOWN
static final byte RESP_ANY_E_PIPE_NOT_OPENED
static final byte RESP_ANY_E_CMD_NOT_SUPPORTED
static final byte RESP_ANY_E_INHIBITED
static final byte RESP_ANY_E_REG_ACCESS_DENIED
static final byte RESP_ANY_E_PIPE_ACCESS_DENIED
| Method Detail |
|---|
boolean isHeading()
Note that preparing an outgoing message (command response or event) will reset the current HCI message states according the outgoing message.
boolean isComplete()
Please note that preparing an outgoing message (command response or event) will reset the current HCI message states according the outgoing message.
byte getType()
Please note that in the case of a fragmented incoming message the type is keep in memory even if the data processed is no more in the first heading packet.
byte getInstruction()
Please note that in the case of a fragmented incoming message the instruction is kept in memory even if the data processed is no more in the first heading packet.
Please note that preparing an outgoing message (command response or event) will reset the current HCI message states according to the outgoing message.
byte[] getReceiveBuffer()
When the listener is triggered with an incoming message the usable data
may be found at getReceiveOffset() offset up to getReceiveLength()
length.
Notes:
getReceiveOffset()
getReceiveOffset()
and after the length given by getReceiveLength(). For example it
may use it as working buffer when preparing an output message.
getReceiveOffset() offset include).
short getReceiveOffset()
short getReceiveLength()
This methods may be used to detect how many bytes are available for processing in the receive buffer.
Note: The data will be considered as consumed when the Applet returns from the callback method even when the data were not accessed.
isComplete()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||