Ejemplo n.º 1
0
  public int write(DataOutputStream ostream) throws IOException {
    preWrite();
    int retVal = 0;

    {
      /** fix dependent sizes for header * */
    }

    {
      /** fix dependent sizes for StatusfieldCheckInstance * */
    }
    {
      /** fix dependent sizes for CaEntries* */
    }

    // write header
    if (header != null) retVal += header.write(ostream);
    // write length
    ostream.writeByte(length);
    retVal += 1;
    // write programIndex
    ostream.writeByte(programIndex);
    retVal += 1;
    // write txnId
    ostream.writeByte(txnId);
    retVal += 1;
    // write ltsid
    ostream.writeByte(ltsid);
    retVal += 1;
    // write programNumber
    ostream.writeShort(programNumber);
    retVal += 2;
    // write sourceId
    ostream.writeShort(sourceId);
    retVal += 2;
    // write caPmtCmdId
    ostream.writeByte(caPmtCmdId);
    retVal += 1;
    // write bf2
    ostream.writeShort(bf2.getValue());
    retVal += 2;
    // write StatusfieldCheckInstance
    if (StatusfieldCheckInstance != null) retVal += StatusfieldCheckInstance.write(ostream);
    // write CaEntries
    {
      ArrayList<CaPmtModeMsg> temp1 = CaEntries;
      for (int iIdx = 0; iIdx < temp1.getCount(); iIdx++) {
        CaPmtModeMsg temp2 = temp1.get(iIdx);
        if (temp2 != null) retVal += temp2.write(ostream);
      }
    }
    postWrite();
    return retVal;
  }
Ejemplo n.º 2
0
  public int write(DataOutputStream ostream) throws IOException {
    preWrite();
    int retVal = 0;

    {
        /** fix dependent sizes for programInfo * */
      if (programInfo != null) setProgramInfoLength((short) programInfo.getSize());
    }

    // write bf1
    ostream.writeShort(bf1.getValue());
    retVal += 2;
    // write programInfo
    if (programInfo != null) retVal += programInfo.write(ostream);
    postWrite();
    return retVal;
  }
Ejemplo n.º 3
0
 public void setProgramInfoLength(int val) {
   bf1.setValue((bf1.getValue() & 0xfffff000) | ((val << 0) & 0x00000fff));
 }
Ejemplo n.º 4
0
 public int getProgramInfoLength() {
   return (bf1.getValue() & 0x00000fff) >> 0;
 }
Ejemplo n.º 5
0
 public void setReserved2(int val) {
   bf1.setValue((bf1.getValue() & 0xffff0fff) | ((val << 12) & 0x0000f000));
 }
Ejemplo n.º 6
0
 public int getReserved2() {
   return (bf1.getValue() & 0x0000f000) >> 12;
 }
Ejemplo n.º 7
0
 public void setReserved(int val) {
   bf2.setValue((bf2.getValue() & 0xffff0f7f) | ((val << 7) & 0x0000f080));
 }
Ejemplo n.º 8
0
 public int getReserved() {
   return (bf2.getValue() & 0x0000f080) >> 7;
 }