|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectftcomputing.robo.JavaFish
public class JavaFish
Basisklasse mit native Deklarationen für javaFish40.DLL. javaFish40.DLL ist
eine Wrapper.DLL, die umFish40.DLL javakonform 1:1 kapselt. Zusätzlich
enthalten sind einige Win32-API Funktionen (escape, getTickCount, sleep). Es
wird nicht empfoheln diese Klasse in Programme zu verwenden, sondern die
FishFace
-Klasse.
Field Summary | |
---|---|
static int |
jrError
allgemeiner Fehlercode, |
Constructor Summary | |
---|---|
JavaFish()
|
Method Summary | |
---|---|
static int |
escape()
Prüfen ob Escape-Taste gedrückt ist |
static int |
getTickCount()
Systemfunktion Timer-Ticks |
int |
jrClearCounters(int iHandle)
Löschen aller Counter |
int |
jrCloseInterface(int iHandle)
Beenden der Verbindung zum Interface |
int |
jrGetActDeviceFirmwareNr(int iHandle)
Abfrage der Firmwareversion |
int |
jrGetActDeviceSerialNr(int iHandle)
Abfrage der Seriennummer |
int |
jrGetActDeviceType(int iHandle)
Abfrage des akutellen Device-Typs |
int |
jrGetAnalog(int iHandle,
int AnalogNr)
Auslesen eines Analogeinganges |
int |
jrGetCounter(int iHandle,
int CounterNr)
Abfragen des Counter an einem I-Eingang |
int |
jrGetDistanceValue(int iHandle,
int SensorNr)
Auslesen des aktuellen Werte in cm des angegebenenUltraschallsensors, DistanceMode muss bei jrOpenInterface = UltraSonic sein |
int |
jrGetInput(int iHandle,
int InputNr)
Auslesen des Zustandes des angegebenen I-Einganges |
int |
jrGetInputs(int iHandle)
Auslesen aller I-Eingänge |
int |
jrGetIRKey(int iHandle,
int Code,
int KeyNr)
Auslesen des Zustandes des angegebenen IR-Keys des IR-Senders |
int |
jrGetModeStatus(int iHandle,
int MotNr)
Abfragen des Mode-Status eines M-Ausganges |
int |
jrGetMotors(int iHandle)
Einschaltstatus aller M-Ausgänge (M1 rechts, 2bit) abfragen |
int |
jrGetVoltage(int iHandle,
int VoltNr)
Auslesen des Volt-Wertes des angegebenen A-Einganges (A1 – A2) Möglich ist auch die Nutzung von D1 und D2 bei Open mit DistanceMode = Voltage Vorsicht : Sicherstellen, dass wirklich der richtige DistanceMode eingestellt wurde, man kann auch vorsichtshalber Vorwiderstände nutzen (220 – 470 Ohm) |
int |
jrOpenInterfaceCOM(int ifTyp,
int ComNr,
int AnalogZyklen)
Verbindung über COM herstellen. |
int |
jrOpenInterfaceUSB(int ifTyp,
int SerialNr)
Verbindung über USB herstellen ggf. über das RF-Datalink. |
int |
jrOpenInterfaceUSBdis(int ifTyp,
int SerialNr,
int DistanceMode)
Deprecated. Distance-Mode sollte nicht manuell eingestellt werden! |
int |
jrRobMotor(int iHandle,
int MotNr,
int Dir,
int Speed,
int ICount)
Starten eines M-Ausganges im RobMode (mit angeschlossenem Motor und Impulsrädchen an den zugehörenden I-Eingängen. |
int |
jrRobMotors(int iHandle,
int MotorStatus,
int SpeedStatus,
int SpeedStatus16,
int ModeStatus)
Starten aller M-Ausgänge im RobMode (mit angeschlossenem Motor und Impulsrädchen an den zugehörenden I-Eingängen. |
int |
jrSetCounter(int iHandle,
int CounterNr,
int ICount)
Setzen eines Counters auf 0 |
int |
jrSetLamp(int iHandle,
int LampNr,
int OnOff)
Schalten eines O-Ausgangs |
int |
jrSetLampEx(int iHandle,
int LampNr,
int OnOff,
int Power)
Schalten eines O-Ausgangs mit Angabe der Helligkeit |
int |
jrSetModeStatus(int iHandle,
int MotNr,
int Mode)
Setzen des Mode-Status eines M-Ausganges |
int |
jrSetMotor(int iHandle,
int MotNr,
int Dir)
Setzen eines Motors mit voller Geschwindigkeit |
int |
jrSetMotorEx(int iHandle,
int MotNr,
int Dir,
int Speed)
Setzen eines Motors mit einer bestimmten Geschwindigkeit |
int |
jrSetMotors(int iHandle,
int MotorStatus)
Alle Motoren setzen |
int |
jrSetMotorsEx(int iHandle,
int MotorStatus,
int SpeedStatus,
int SpeedStatus16)
Alle Motoren setzen mit Angabe der Geschwindigkeit |
static void |
sleep(int MilliSec)
Anhalten des aktuellen Threads für eine bestimmte Zeitspanne |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int jrError
Constructor Detail |
---|
public JavaFish()
Method Detail |
---|
public int jrOpenInterfaceUSB(int ifTyp, int SerialNr)
ifTyp
- Interface-TypSerialNr
- Seriennummer
public int jrOpenInterfaceUSBdis(int ifTyp, int SerialNr, int DistanceMode)
ifTyp
- Interface-TypSerialNr
- SeriennummerDistanceMode
-
public int jrOpenInterfaceCOM(int ifTyp, int ComNr, int AnalogZyklen)
ifTyp
- Interface-TypComNr
- COM-Port
public int jrCloseInterface(int iHandle)
iHandle
- iHandle
public int jrGetInput(int iHandle, int InputNr)
iHandle
- iHandleInputNr
- I-Eingang
public int jrGetInputs(int iHandle)
iHandle
- iHandle
public int jrGetAnalog(int iHandle, int AnalogNr)
iHandle
- iHandleAnalogNr
- Analogeingang
public int jrGetIRKey(int iHandle, int Code, int KeyNr)
iHandle
- iHandleCode
- Code des SendersKeyNr
- Nummer der Taste
public int jrGetVoltage(int iHandle, int VoltNr)
iHandle
- iHandleVoltNr
- Nummer des Eingangs
public int jrSetMotor(int iHandle, int MotNr, int Dir)
iHandle
- iHandleMotNr
- Nummer des MotorsDir
- Drehrichtung
public int jrSetMotorEx(int iHandle, int MotNr, int Dir, int Speed)
iHandle
- iHandleMotNr
- Nummder des MotorsDir
- DrehrichtungSpeed
- Geschwindigkeit
public int jrGetMotors(int iHandle)
iHandle
- iHandle
public int jrSetMotors(int iHandle, int MotorStatus)
iHandle
- iHandleMotorStatus
- Motorstatus
public int jrSetMotorsEx(int iHandle, int MotorStatus, int SpeedStatus, int SpeedStatus16)
iHandle
- iHandleMotorStatus
- MotorstatusSpeedStatus
- GeschwindigkeitSpeedStatus16
- Geschwindigkeit (nicht dokumentiert)
public int jrGetModeStatus(int iHandle, int MotNr)
iHandle
- iHandleMotNr
- der M-Ausgang
public int jrSetModeStatus(int iHandle, int MotNr, int Mode)
iHandle
- iHandleMotNr
- der M-AusgangMode
- der zu setzende Modus
public int jrSetLamp(int iHandle, int LampNr, int OnOff)
iHandle
- iHandleLampNr
- O-AusgangOnOff
- Zustand
public int jrSetLampEx(int iHandle, int LampNr, int OnOff, int Power)
iHandle
- iHandleLampNr
- O-AusgangOnOff
- ZustandPower
- Helligkeit
public int jrRobMotor(int iHandle, int MotNr, int Dir, int Speed, int ICount)
iHandle
- iHandleMotNr
- M-AusgangDir
- RichtungSpeed
- GeschwindigkeitICount
- Zahl der Impulse
public int jrRobMotors(int iHandle, int MotorStatus, int SpeedStatus, int SpeedStatus16, int ModeStatus)
iHandle
- iHandleMotorStatus
- MotorstatusSpeedStatus
- GeschwindigkeitSpeedStatus16
- Geschwindigkeit (nicht dokumentiert)ModeStatus
- Mode-Status
public int jrGetCounter(int iHandle, int CounterNr)
iHandle
- iHandleCounterNr
- die Nummer des Counters
public int jrSetCounter(int iHandle, int CounterNr, int ICount)
iHandle
- iHandleCounterNr
- die Nummer des CountersICount
- der Wert, der gesetzt werden soll
public int jrClearCounters(int iHandle)
iHandle
- iHandle
public int jrGetDistanceValue(int iHandle, int SensorNr)
iHandle
- iHandleSensorNr
- die Nummer des Distanzsensor
public int jrGetActDeviceType(int iHandle)
iHandle
- iHandle
public int jrGetActDeviceSerialNr(int iHandle)
iHandle
- iHandle
public int jrGetActDeviceFirmwareNr(int iHandle)
iHandle
- iHandle
public static int escape()
public static int getTickCount()
public static void sleep(int MilliSec)
MilliSec
- Zeit in Millisekunden
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |