Class BlueRSCmdInt
- java.lang.Object
-
- org.deepjava.runtime.ppc32.Task
-
- org.deepjava.runtime.mpc555.driver.BlueRSCmdInt
-
- All Implemented Interfaces:
Ippc32,Actionable
public class BlueRSCmdInt extends Task
Interface for the BlueRS driver to send and receive positive integer values.
-
-
Field Summary
Fields Modifier and Type Field Description static intbufferEmptyNo received command to read.static intconnectedThe BlueRS module is connected to a partner module.static intconnectingTry to connect to a partner module.static intdisconnectedNo connection to a partner module established.static intdisconnectingTry to disconnect from a partner module.static intillegalCmdIllegal command format.static intsuccessCommand successfully executedstatic intwrongModeThe command can not be executed in the actual mode-
Fields inherited from class org.deepjava.runtime.ppc32.Task
done, firstErr, maxNofTasks, nofActivations, period, safe
-
Fields inherited from interface org.deepjava.runtime.ppc32.Ippc32
CR, CTR, DAR, DEC, DSISR, FPR0, FPR1, FPR10, FPR11, FPR12, FPR13, FPR14, FPR15, FPR16, FPR17, FPR18, FPR19, FPR2, FPR20, FPR21, FPR22, FPR23, FPR24, FPR25, FPR26, FPR27, FPR28, FPR29, FPR3, FPR30, FPR31, FPR4, FPR5, FPR6, FPR7, FPR8, FPR9, FPSCR, LR, MSR, R0, R1, R10, R11, R12, R13, R14, R15, R16, R17, R18, R19, R2, R20, R21, R22, R23, R24, R25, R26, R27, R28, R29, R3, R30, R31, R4, R5, R6, R7, R8, R9, SPR1, SPR18, SPR19, SPR22, SPR26, SPR268, SPR269, SPR27, SPR272, SPR273, SPR274, SPR275, SPR287, SPR8, SPR9, SPRG0, SPRG1, SPRG2, SPRG3, SRR0, SRR1, TBLread, TBUread, XER
-
-
Constructor Summary
Constructors Constructor Description BlueRSCmdInt()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaction()Action to be performed by the taskstatic intconnect(String partner)Tries to connect to a partner modulestatic intdisconnect()Tries to disconnect from a partner module.static intgetReceivedCmd()Get a received commandstatic intgetStatus()Returns the status of the interfacestatic intsendCommand(int cmd)Sends a command to the partner module
-
-
-
Field Detail
-
disconnected
public static final int disconnected
No connection to a partner module established.- See Also:
- Constant Field Values
-
connecting
public static final int connecting
Try to connect to a partner module.- See Also:
- Constant Field Values
-
connected
public static final int connected
The BlueRS module is connected to a partner module.- See Also:
- Constant Field Values
-
disconnecting
public static final int disconnecting
Try to disconnect from a partner module.- See Also:
- Constant Field Values
-
success
public static final int success
Command successfully executed- See Also:
- Constant Field Values
-
wrongMode
public static final int wrongMode
The command can not be executed in the actual mode- See Also:
- Constant Field Values
-
illegalCmd
public static final int illegalCmd
Illegal command format. (The command to send is less the 1)- See Also:
- Constant Field Values
-
bufferEmpty
public static final int bufferEmpty
No received command to read.- See Also:
- Constant Field Values
-
-
Method Detail
-
action
public void action()
Description copied from class:TaskAction to be performed by the task- Specified by:
actionin interfaceActionable- Overrides:
actionin classTask
-
sendCommand
public static int sendCommand(int cmd)
Sends a command to the partner module- Parameters:
cmd- , the command to send- Returns:
successif the command was successfully sent,illegalCmdif the command is less then 0,wrongModeif no connection is established
-
connect
public static int connect(String partner)
Tries to connect to a partner module
-
disconnect
public static int disconnect()
Tries to disconnect from a partner module.
-
getReceivedCmd
public static int getReceivedCmd()
Get a received command- Returns:
- the received command,
bufferEmptyif no command is available.
-
getStatus
public static int getStatus()
Returns the status of the interface- Returns:
disconnected,connecting,connected,disconnecting
-
-