MCPcopy Create free account
hub / github.com/RangeNetworks/openbts / writeHighSideTx

Method writeHighSideTx

TRXManager/TRXManager.cpp:194–222  ·  view source on GitHub ↗

(pat) renamed overloaded function to clarify code

Source from the content-addressed store, hash-verified

192
193// (pat) renamed overloaded function to clarify code
194void ::ARFCNManager::writeHighSideTx(const GSM::TxBurst& burst,const char *culprit)
195{
196 LOG(DEBUG) << culprit << " transmit at time " << gBTS.clock().get() << ": " << burst
197 <<" steal="<<(int)burst.peekField(60,1)<<(int)burst.peekField(87,1);
198 // format the transmission request message
199 static const int bufferSize = gSlotLen+1+4+1;
200 char buffer[bufferSize];
201 unsigned char *wp = (unsigned char*)buffer;
202 // slot
203 *wp++ = burst.time().TN();
204 // frame number
205 uint32_t FN = burst.time().FN();
206 *wp++ = (FN>>24) & 0x0ff;
207 *wp++ = (FN>>16) & 0x0ff;
208 *wp++ = (FN>>8) & 0x0ff;
209 *wp++ = (FN) & 0x0ff;
210 // power level
211 /// FIXME -- We hard-code gain to 0 dB for now.
212 *wp++ = 0;
213 // copy data
214 const char *dp = burst.begin();
215 for (unsigned i=0; i<gSlotLen; i++) {
216 *wp++ = (unsigned char)((*dp++) & 0x01);
217 }
218 // write to the socket
219 mDataSocketLock.lock();
220 mDataSocket.write(buffer,bufferSize);
221 mDataSocketLock.unlock();
222}
223
224
225

Callers 5

transmitMethod · 0.80
sendIdleFillMethod · 0.80
transmitMethod · 0.80
generateMethod · 0.80
dispatchMethod · 0.80

Calls 6

getMethod · 0.45
TNMethod · 0.45
timeMethod · 0.45
FNMethod · 0.45
beginMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected