public class KexFaxSender extends Object
Modifier and Type | Class and Description |
---|---|
static class |
KexFaxSender.FaxClass
Fax Klasse.
|
Modifier and Type | Field and Description |
---|---|
protected int |
baudrate
Baudrate.
|
protected byte[] |
buffer
Puffer.
|
protected String |
com
ComPort.
|
protected static byte |
CR
Carriage-return.
|
protected static byte[] |
ENDL
Endline.
|
protected static byte |
EOM
End-of-message.
|
protected static byte |
EOP
End-of-page.
|
protected static byte |
ETX
End-of-Trasnmission.
|
protected static byte[] |
FAX_2_EOP
Fax 2 EOP.
|
protected static byte[] |
FAX_20_EOP
Letzte Seite.
|
protected static byte[] |
FAX_20_MPS
Seite Ende, es kommt noch eine andere.
|
protected String |
gsmPin
Pin-Kode fuer die Authentifizierung im GSM-Netz.
|
protected static int |
HDR_SIZE
Headersize in G3 Fax Files generiert mit GhostScript ueber dem
dfaxhigh/dfaxlow device.
|
protected String |
initSeq
Initialisierungsequenz.
|
protected static int |
KILO_BYTE
KByte.
|
protected static byte |
LF
Line-feed.
|
protected static de.bsvrz.sys.funclib.debug.Debug |
LOGGER
LOGGER.
|
protected AsyncSerialPortCommunicator.ModemType |
modemType
Typ des Faxgeraetes.
|
protected static byte |
MPS
More-Pages.
|
protected String |
prefix
Prefix fuer alle Nummer.
|
protected static int |
PUFFER_SIZE
Puffergroesse.
|
protected static String |
READY
Antwort auf +CPIN?
|
protected static String |
SIM_PIN
Antwort auf +CPIN?
|
protected long |
timeout
Standardtimeout.
|
Constructor and Description |
---|
KexFaxSender(String com,
int baud,
long timeout,
AsyncSerialPortCommunicator.ModemType typ,
String gsmPin,
String init,
String prefix)
Standardkonstruktor.
|
Modifier and Type | Method and Description |
---|---|
VersandStatus |
send(String faxKennung,
String nummer,
boolean hochAufloesend,
File rasterGrafik)
Versendet eine Mitteilung.
|
VersandStatus |
send2(AsyncSerialPortCommunicator comm,
String faxKennung,
String waehlstring,
boolean hochAufloesend,
File rasterGrafik)
Versendet eine Mitteilung mit dem Protokol der Fax Klasse 2.
|
VersandStatus |
send20(AsyncSerialPortCommunicator comm,
String faxKennung,
String waehlstring,
boolean hochAufloesend,
File rasterGrafik)
Versendet eine Mitteilung mit dem Protokol der Fax Klasse 2.0.
|
void |
setCpinReady(AsyncSerialPortCommunicator comm,
String pin)
Entsperrt ein GSM-Faxmodem.
|
boolean |
ueberPruefeAntwort(Collection<String> antwort,
String gesucht,
String fehlermeldung)
Überprüft ob die Antwort einen gesuchten String enthält.
|
boolean |
ueberPruefeAntwort(Collection<String> antworten,
String antwort,
String antwortwert,
String fehlermeldung)
Überprüft ob die Antwort einen gesuchten String enthält.
|
protected static final de.bsvrz.sys.funclib.debug.Debug LOGGER
protected static final int KILO_BYTE
protected static final byte CR
protected static final byte LF
protected static final byte[] ENDL
protected static final byte ETX
protected static final byte EOP
protected static final byte EOM
protected static final byte MPS
protected static final int HDR_SIZE
protected static final String READY
protected static final String SIM_PIN
protected static final int PUFFER_SIZE
protected static final byte[] FAX_2_EOP
protected static final byte[] FAX_20_EOP
protected static final byte[] FAX_20_MPS
protected long timeout
protected String gsmPin
protected String initSeq
protected String prefix
protected AsyncSerialPortCommunicator.ModemType modemType
protected String com
protected int baudrate
protected byte[] buffer
public KexFaxSender(String com, int baud, long timeout, AsyncSerialPortCommunicator.ModemType typ, String gsmPin, String init, String prefix) throws Exception
com
- Com-Portbaud
- Baudratetimeout
- Timeout in Sekundentyp
- Modem TypgsmPin
- Pin Codeinit
- Init Sequenzprefix
- Wahl-PraefixException
- Wenn kein Zugriff zum COM-Port moeglich istpublic VersandStatus send(String faxKennung, String nummer, boolean hochAufloesend, File rasterGrafik)
faxKennung
- FaxKennung des Versendersnummer
- Nummer des Empfaengers (ohne Standardpraefix)hochAufloesend
- true, wenn mitteilung Hochaufloesend istrasterGrafik
- File, das die Mitteilung enthaeltpublic VersandStatus send2(AsyncSerialPortCommunicator comm, String faxKennung, String waehlstring, boolean hochAufloesend, File rasterGrafik)
comm
- ComPortfaxKennung
- FaxKennung des Versenderswaehlstring
- Wählstring (Prefix+Nummer)hochAufloesend
- true, wenn mitteilung Hochaufloesend istrasterGrafik
- File, das die Mitteilung enthältpublic VersandStatus send20(AsyncSerialPortCommunicator comm, String faxKennung, String waehlstring, boolean hochAufloesend, File rasterGrafik)
comm
- ComPortfaxKennung
- FaxKennung des Versenderswaehlstring
- Wählstring (Prefix+Nummer)hochAufloesend
- true, wenn mitteilung Hochaufloesend istrasterGrafik
- File, das die Mitteilung enthaeltpublic void setCpinReady(AsyncSerialPortCommunicator comm, String pin) throws CommunicationException
comm
- ComPortpin
- Pin-CodeCommunicationException
- bei Ausnahmenpublic boolean ueberPruefeAntwort(Collection<String> antwort, String gesucht, String fehlermeldung) throws CommunicationException
antwort
- Antwort des Faxgeraetsgesucht
- Gesuchte Zeichenkettefehlermeldung
- Fehlermeldung, wenn gesuchte Zeichenkette nicht gefunden istCommunicationException
- wird geworfen, wenn gesuchte Zeichenkette nicht gefunden istpublic boolean ueberPruefeAntwort(Collection<String> antworten, String antwort, String antwortwert, String fehlermeldung) throws CommunicationException
antworten
- Antwort des Faxgeraetsantwort
- Gesuchte Zeichenketteantwortwert
- Wert der Antwortfehlermeldung
- Fehlermeldung, wenn gesuchte Zeichenkette nicht gefunden istCommunicationException
- wird geworfen, wenn gesuchte Zeichenkette nicht gefunden istCopyright © 2017 BitCtrl Systems GmbH. All rights reserved.