|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectikayaki.squid.SquidEmulator
public class SquidEmulator
This class tries to emulate behavior of real squid-system. It starts 3 threads (handler,magnetometer,degausser), opens COM-ports for them and adds SerialIO Listeners. Threads generates random data values or loaded values as results and generates random error situations to see that program using real squid system does survive those. Uses 2-3 COM ports. Usage SquidEmulator x z.. filename where x is 0 or 1 and indicates if Magnetometer and Demagnetizer are on same COM port. z... values are COM ports (Handler,Magnetometer,Degausser). filename is name of log file we are using or it is existing log file, which is used to generate same sequence used to verify that old and new program behaves same way.
Nested Class Summary | |
---|---|
private static class |
SquidEmulator.DegausserEmu
Deprecated. Runs degausser emulation process. |
private static class |
SquidEmulator.HandlerEmu
Deprecated. Runs handler emulation process. |
private static class |
SquidEmulator.MagnetometerEmu
Deprecated. Runs magnetometer emulation process. |
Field Summary | |
---|---|
private static int |
acceleration
Deprecated. value between 0 and 127 default 5. |
private static int |
commandedDistance
Deprecated. value between 1 and 16,777,215 |
private static int |
commandedRotation
Deprecated. angles are between 0 (0) and 2000 (360) |
private static int |
currentPosition
Deprecated. value between 1 and 16,777,215 |
private static int |
currentRotation
Deprecated. angles are between 0 (0) and 2000 (360) |
private static int |
deceleration
Deprecated. value between 0 and 127 default 10. |
private static SquidEmulator.DegausserEmu |
degausser
Deprecated. |
private static int |
degausserAmplitude
Deprecated. 0->3000 default amp 0 |
private static int |
degausserCoil
Deprecated. (X, Y, Z) = (0,1,2) default axis Z |
private static int |
degausserDelay
Deprecated. 1-9 seconds default delay 1 second |
private static SerialIO |
degausserPort
Deprecated. |
private static int |
degausserRamp
Deprecated. (3, 5, 7, 9) default 3 |
private static char |
degausserStatus
Deprecated. Z=Zero, T=Tracking, ? |
private static SquidEmulator.HandlerEmu |
handler
Deprecated. |
private static SerialIO |
handlerPort
Deprecated. starts Threads which reads messages from selected COM port. |
private static String |
handlerStatus
Deprecated. 5 end of move, previous G command complete, 7 hard limit stop, G motor is currently indexing |
private static int |
homePosition
Deprecated. value between 1 and 16,777,215 |
private static File |
logFile
Deprecated. log file we are using read or write |
private static FileWriter |
logWriter
Deprecated. |
private static SquidEmulator.MagnetometerEmu |
magnetometer
Deprecated. |
private static SerialIO |
magnetometerPort
Deprecated. |
private static boolean |
online
Deprecated. indicates if system have been started |
private static boolean |
running
Deprecated. |
private static boolean |
usingOldLog
Deprecated. indicates have we loaded log file for using or are we writing it |
private static int |
velocity
Deprecated. value between 50 and 12 000. |
Constructor Summary | |
---|---|
SquidEmulator()
Deprecated. |
Method Summary | |
---|---|
private void |
jbInit()
Deprecated. |
static void |
main(String[] args)
Deprecated. First creates or loads log file and sets settings. |
static void |
writeMessage(String message,
SerialIO port)
Deprecated. send message to SerialIO to be sented. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static boolean online
private static File logFile
private static boolean usingOldLog
private static int acceleration
private static int deceleration
private static int velocity
private static String handlerStatus
private static int commandedDistance
private static int currentPosition
private static int homePosition
private static int commandedRotation
private static int currentRotation
private static int degausserCoil
private static int degausserAmplitude
private static int degausserDelay
private static int degausserRamp
private static char degausserStatus
private static SerialIO handlerPort
private static SerialIO magnetometerPort
private static SerialIO degausserPort
private static FileWriter logWriter
private static SquidEmulator.HandlerEmu handler
private static SquidEmulator.MagnetometerEmu magnetometer
private static SquidEmulator.DegausserEmu degausser
private static boolean running
Constructor Detail |
---|
public SquidEmulator()
Method Detail |
---|
public static void writeMessage(String message, SerialIO port)
message
- any message reply we are sending backport
- port number to be sentpublic static void main(String[] args)
private void jbInit() throws Exception
Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |