HolonTransformer.java 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. package classes;
  2. public class HolonTransformer extends CpsObject {
  3. /* Ratio of the transformer */
  4. float transformRatio;
  5. /* Fixed transform value */
  6. float transformFixed;
  7. float maxInput;
  8. float maxOutput;
  9. /**
  10. * Constructor Set type of object (Transformer), its transform ratio and the
  11. * default name ("Transformer");
  12. */
  13. public HolonTransformer(String ObjName) {
  14. super(ObjName);
  15. }
  16. public HolonTransformer(String ObjName, String obj) {
  17. super(ObjName);
  18. super.setName(obj);
  19. }
  20. public HolonTransformer(CpsObject obj) {
  21. super(obj);
  22. this.setTransformRatio(((HolonTransformer) obj).getTransformRatio());
  23. this.setTransformFixed(((HolonTransformer) obj).getTransformFixed());
  24. }
  25. /**
  26. * Set transform ratio
  27. *
  28. * @param ratio
  29. * desired ratio
  30. */
  31. public void setTransformRatio(float ratio) {
  32. this.transformRatio = ratio;
  33. }
  34. /**
  35. * Output the actual ratio of the transformer
  36. *
  37. * @return actual ratio of the transformer
  38. */
  39. public float getTransformRatio() {
  40. return this.transformRatio;
  41. }
  42. /**
  43. * Set fixed Transform Value
  44. *
  45. * @param fixed
  46. * desired fixed Transform Value
  47. */
  48. public void setTransformFixed(float fixed) {
  49. this.transformFixed = fixed;
  50. }
  51. /**
  52. * Output the actual fixed Transform Value
  53. *
  54. * @return actual fixed Transform Value
  55. */
  56. public float getTransformFixed() {
  57. return this.transformFixed;
  58. }
  59. public float getOutput() {
  60. float output = 0;
  61. return output;
  62. }
  63. }