int List_of_Balises_in_SR_Authority_Core_1_Encode_Bit(Bitstream* stream, const List_of_Balises_in_SR_Authority_Core_1* p) { if (Bitstream_Normal(stream, LIST_OF_BALISES_IN_SR_AUTHORITY_CORE_1_CORE_BITSIZE)) { if (List_of_Balises_in_SR_Authority_Core_1_UpperBitsNotSet(p)) { //@ ghost const uint32_t pos = stream->bitpos; Bitstream_Write(stream, 1, p->Q_NEWCOUNTRY); if (p->Q_NEWCOUNTRY == 1) { Bitstream_Write(stream, 10, p->NID_C); } Bitstream_Write(stream, 14, p->NID_BG); //@ assert Q_NEWCOUNTRY: EqualBits(stream, pos, pos + 1, p->Q_NEWCOUNTRY); return 1; } else { return -2; } } else { return -1; } }
int List_of_Balises_in_SR_Authority_UpperBitsNotSet(const List_of_Balises_in_SR_Authority_Core* p) { bool status = true; status = status && UpperBitsNotSet64(p->Q_DIR, 2) ; status = status && UpperBitsNotSet64(p->L_PACKET, 13); status = status && UpperBitsNotSet64(p->N_ITER_1, 5) ; for (uint32_t i = 0; i < p->N_ITER_1; ++i) { status = status && List_of_Balises_in_SR_Authority_Core_1_UpperBitsNotSet(&(p->sub_1[i])); } if (status) { return 1; } else { return 0; } }