(pat) The uplink assignment is always initiated by the MS using a RACH, so the MS is identified by the request reference, and this message does not contain a TLLI.
| 204 | // so the MS is identified by the request reference, and this message |
| 205 | // does not contain a TLLI. |
| 206 | void L3IAPacketAssignment::writePacketUplinkAssignment(MsgCommon &dest) const |
| 207 | { |
| 208 | // The IA Rest Octets start with some bits to indicate a Packet Uplink Assignment: |
| 209 | // GSM04.08 sec 10.5.2.16 |
| 210 | dest.writeH(); |
| 211 | dest.writeH(); |
| 212 | dest.write0(); |
| 213 | dest.write0(); |
| 214 | if (mPacketAssignmentType == PacketUplinkAssignFixed || |
| 215 | mPacketAssignmentType == PacketUplinkAssignDynamic) { |
| 216 | dest.write1(); |
| 217 | dest.WRITE_FIELD(mTFIAssignment, 5); |
| 218 | dest.WRITE_FIELD(mPolling, 1); |
| 219 | switch (mPacketAssignmentType) { |
| 220 | case PacketUplinkAssignDynamic: |
| 221 | dest.write0(); |
| 222 | dest.WRITE_FIELD(mUSF, 3); |
| 223 | dest.WRITE_FIELD(mUSFGranularity, 1); |
| 224 | dest.write0(); // No downlink power parameters present. |
| 225 | // mPowerOption.writePower(dest,0); |
| 226 | break; |
| 227 | case PacketUplinkAssignFixed: |
| 228 | dest.write1(); |
| 229 | dest.WRITE_FIELD(mAllocationBitmapLength, 5); |
| 230 | if (mAllocationBitmapLength) { |
| 231 | dest.WRITE_FIELD(mAllocationBitmap, mAllocationBitmapLength); |
| 232 | } |
| 233 | dest.write0(); // No downlink power parameters present. |
| 234 | // mPowerOption.writePower(dest,0); |
| 235 | break; |
| 236 | default: assert(0); |
| 237 | } |
| 238 | dest.WRITE_FIELD(mChannelCodingCommand, 2); |
| 239 | dest.WRITE_FIELD(mTLLIBlockChannelCoding, 1); |
| 240 | if (dest.write01(mAlphaPresent)) { dest.WRITE_FIELD(mAlpha,4); } |
| 241 | dest.WRITE_FIELD(mGamma,5); |
| 242 | if (dest.write01(mTimingAdvanceIndexPresent)) { |
| 243 | dest.WRITE_FIELD(mTimingAdvanceIndex,4); |
| 244 | } |
| 245 | if (dest.write01(mTBFStartingTimePresent)) { |
| 246 | writeStartTime(dest,mTBFStartingTime); |
| 247 | } |
| 248 | } else { // single block assignment. |
| 249 | dest.write0(); // uplink assignment type designator |
| 250 | if (dest.write01(mAlphaPresent)) { dest.WRITE_FIELD(mAlpha,4); } |
| 251 | dest.WRITE_FIELD(mGamma,5); |
| 252 | dest.write0(); dest.write1(); // As per 10.5.2.16 Note 1. |
| 253 | assert(mTBFStartingTimePresent); // required for single block uplink assignment. |
| 254 | writeStartTime(dest,mTBFStartingTime); |
| 255 | dest.writeL(); // No downlink power parameters present. |
| 256 | //mPowerOption.writePower(dest,1); |
| 257 | } |
| 258 | } |
| 259 | |
| 260 | // (pat) The downlink assignment may be (normally is) initiated by the network, |
| 261 | // in which case the "request reference" in the Immediate Assignment message |