aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-05-28 18:41:19 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2021-05-28 18:42:42 +0200
commitc9880b97cf13130dbd541f11c35c1586f48a08fa (patch)
treed9e6fb96e4b78a96aa840ad5c207fe175c7bb1e4
parent4c2387026a270d65c59e4022d8bb0c527dfb9532 (diff)
csn1: Implement CSN_CALLBACK type in encoder
Picked code from the Decoder function. I gave it a try callback_init_Cell_Selection_Params_FREQUENCY_DIFF and looks like working fine. Change-Id: Iac962ae3e9f52f417f394060b64fc4d0ebf3d0bf
-rw-r--r--src/csn1.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/csn1.c b/src/csn1.c
index 0a3c88c7..2be03923 100644
--- a/src/csn1.c
+++ b/src/csn1.c
@@ -2694,7 +2694,13 @@ gint16 csnStreamEncoder(csnStream_t* ar, const CSN_DESCR* pDescr, struct bitvec
case CSN_CALLBACK:
{
- return ProcessError(writeIndex,"csnStreamEncoder Callback not implemented", -1, pDescr);
+ guint16 no_of_bits;
+ DissectorCallbackFcn_t callback = (DissectorCallbackFcn_t)pDescr->aux_fn;
+ LOGPC(DCSN1, LOGL_DEBUG, "CSN_CALLBACK(%s) | ", pDescr->sz);
+ no_of_bits = callback(vector, writeIndex, pvDATA(data, pDescr->i), pvDATA(data, pDescr->offset));
+ remaining_bits_len -= no_of_bits;
+ bit_offset += no_of_bits;
+ pDescr++;
break;
}