org.capi.capi20
Interface CapiMessage

All Known Implementing Classes:
JcapiMessage

public interface CapiMessage

CapiMessage interface to handle CAPI messages.

© 2002 Holger Gräfe

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

Contact to author: holger.graefe@gmx.de

Project website: http://jcapi.sourceforge.net


Field Summary
static int ALERT_CONF
           
static int ALERT_REQ
           
static int CONNECT_ACTIVE_IND
           
static int CONNECT_ACTIVE_RESP
           
static int CONNECT_B3_ACTIVE_IND
           
static int CONNECT_B3_ACTIVE_RESP
           
static int CONNECT_B3_CONF
           
static int CONNECT_B3_IND
           
static int CONNECT_B3_REQ
           
static int CONNECT_B3_RESP
           
static int CONNECT_B3_T90_ACTIVE_IND
           
static int CONNECT_B3_T90_ACTIVE_RESP
           
static int CONNECT_CONF
           
static int CONNECT_IND
           
static int CONNECT_REQ
           
static int CONNECT_RESP
           
static int DATA_B3_CONF
           
static int DATA_B3_IND
           
static int DATA_B3_REQ
           
static int DATA_B3_RESP
           
static int DISCONNECT_B3_CONF
           
static int DISCONNECT_B3_IND
           
static int DISCONNECT_B3_REQ
           
static int DISCONNECT_B3_RESP
           
static int DISCONNECT_CONF
           
static int DISCONNECT_IND
           
static int DISCONNECT_REQ
           
static int DISCONNECT_RESP
           
static int FACILITY_CONF
           
static int FACILITY_IND
           
static int FACILITY_REQ
           
static int FACILITY_RESP
           
static int INFO_CONF
           
static int INFO_IND
           
static int INFO_REQ
           
static int INFO_RESP
           
static int LISTEN_CONF
           
static int LISTEN_REQ
           
static int MANUFACTURER_CONF
           
static int MANUFACTURER_IND
           
static int MANUFACTURER_REQ
           
static int MANUFACTURER_RESP
           
static int RESET_B3_CONF
           
static int RESET_B3_IND
           
static int RESET_B3_REQ
           
static int RESET_B3_RESP
           
static int SELECT_B_PROTOCOL_CONF
           
static int SELECT_B_PROTOCOL_REQ
           
 
Method Summary
 int getAppID()
          returns the identification number of the application this messages is assigned to.
 byte[] getB3Data()
          returns the data block of a DATA_B3_IND or DATA_B3_REQ message.
 byte[] getBytes()
          calculates the encoded message as a byte array.
 int getMessageID()
          returns the identification number of this message.
 int getType()
          returns the type of this message.
 void setB3Data(byte[] data)
          assigns a data block to a DATA_B3_REQ message.
 

Field Detail

ALERT_REQ

public static final int ALERT_REQ

ALERT_CONF

public static final int ALERT_CONF

CONNECT_REQ

public static final int CONNECT_REQ

CONNECT_CONF

public static final int CONNECT_CONF

CONNECT_IND

public static final int CONNECT_IND

CONNECT_RESP

public static final int CONNECT_RESP

CONNECT_ACTIVE_IND

public static final int CONNECT_ACTIVE_IND

CONNECT_ACTIVE_RESP

public static final int CONNECT_ACTIVE_RESP

CONNECT_B3_ACTIVE_IND

public static final int CONNECT_B3_ACTIVE_IND

CONNECT_B3_ACTIVE_RESP

public static final int CONNECT_B3_ACTIVE_RESP

CONNECT_B3_REQ

public static final int CONNECT_B3_REQ

CONNECT_B3_CONF

public static final int CONNECT_B3_CONF

CONNECT_B3_IND

public static final int CONNECT_B3_IND

CONNECT_B3_RESP

public static final int CONNECT_B3_RESP

CONNECT_B3_T90_ACTIVE_IND

public static final int CONNECT_B3_T90_ACTIVE_IND

CONNECT_B3_T90_ACTIVE_RESP

public static final int CONNECT_B3_T90_ACTIVE_RESP

DATA_B3_REQ

public static final int DATA_B3_REQ

DATA_B3_CONF

public static final int DATA_B3_CONF

DATA_B3_IND

public static final int DATA_B3_IND

DATA_B3_RESP

public static final int DATA_B3_RESP

RESET_B3_REQ

public static final int RESET_B3_REQ

RESET_B3_CONF

public static final int RESET_B3_CONF

RESET_B3_IND

public static final int RESET_B3_IND

RESET_B3_RESP

public static final int RESET_B3_RESP

DISCONNECT_B3_REQ

public static final int DISCONNECT_B3_REQ

DISCONNECT_B3_CONF

public static final int DISCONNECT_B3_CONF

DISCONNECT_B3_IND

public static final int DISCONNECT_B3_IND

DISCONNECT_B3_RESP

public static final int DISCONNECT_B3_RESP

DISCONNECT_REQ

public static final int DISCONNECT_REQ

DISCONNECT_CONF

public static final int DISCONNECT_CONF

DISCONNECT_IND

public static final int DISCONNECT_IND

DISCONNECT_RESP

public static final int DISCONNECT_RESP

INFO_REQ

public static final int INFO_REQ

INFO_CONF

public static final int INFO_CONF

INFO_IND

public static final int INFO_IND

INFO_RESP

public static final int INFO_RESP

FACILITY_REQ

public static final int FACILITY_REQ

FACILITY_CONF

public static final int FACILITY_CONF

FACILITY_IND

public static final int FACILITY_IND

FACILITY_RESP

public static final int FACILITY_RESP

SELECT_B_PROTOCOL_REQ

public static final int SELECT_B_PROTOCOL_REQ

SELECT_B_PROTOCOL_CONF

public static final int SELECT_B_PROTOCOL_CONF

MANUFACTURER_REQ

public static final int MANUFACTURER_REQ

MANUFACTURER_CONF

public static final int MANUFACTURER_CONF

MANUFACTURER_IND

public static final int MANUFACTURER_IND

MANUFACTURER_RESP

public static final int MANUFACTURER_RESP

LISTEN_REQ

public static final int LISTEN_REQ

LISTEN_CONF

public static final int LISTEN_CONF
Method Detail

getType

public int getType()
returns the type of this message.
Returns:
the message type, which correspond with the CAPI message fields "command" and "subcommand"

getAppID

public int getAppID()
returns the identification number of the application this messages is assigned to.
Returns:
the application identification number

getMessageID

public int getMessageID()
returns the identification number of this message.
Returns:
the message identification number

getBytes

public byte[] getBytes()
calculates the encoded message as a byte array.
Returns:
the binary message

getB3Data

public byte[] getB3Data()
                 throws CapiException
returns the data block of a DATA_B3_IND or DATA_B3_REQ message. For other messages an exception is thrown.

Actual the data block of a DATA_B3_IND is copied to prevent the Java virtual machine from memory conflicts. Nevertheless the application has to respond to every DATA_B3_IND with a DATA_B3_RESP. Otherwise the native CAPI does not reuse the original memory block and would perhaps get a "buffer overrun".

Returns:
the data block

setB3Data

public void setB3Data(byte[] data)
               throws CapiException
assigns a data block to a DATA_B3_REQ message. For other messages an exception is thrown.
Parameters:
data - the data block