Example #1
0
 /**
  * The constructor for the <code> Transmission </code> class creates a new transmission with
  * several properties like start and end times, first and last bit to be transmitted and the
  * data itself.
  *
  * @param o Transmitter object
  * @param pow Power for the transmission
  * @param freq the frequency for the transmission
  */
 protected Transmission(Transmitter o, double pow, double freq) {
   origin = o;
   power = pow;
   Pt = pow;
   f = freq;
   start = o.clock.getCount();
   end = Long.MAX_VALUE;
   long l = start + o.leadCycles;
   firstBit = origin.getBitNum(l);
   lastBit = Long.MAX_VALUE;
   data = new byte[Arithmetic.roundup(o.medium.maxLength, BYTE_SIZE)];
 }