/*
 * SPDX-FileCopyrightText: (c) 2003, 2004 Lev Walkin <vlm@lionet.info>. All rights reserved.
 * SPDX-License-Identifier: BSD-1-Clause
 * Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
 * From ASN.1 module "ULP-Components"
 *     found in "../supl-common.asn"
 */

#include "CellMeasuredResults.h"

static int memb_cellIdentity_constraint_1(asn_TYPE_descriptor_t *td,
    const void *sptr,
    asn_app_constraint_failed_f *ctfailcb,
    void *app_key)
{
    long value;

    if (!sptr)
        {
            _ASN_CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)",
                td->name, __FILE__, __LINE__);
            return -1;
        }

    value = *(const long *)sptr;

    if ((value >= 0 && value <= 268435455))
        {
            /* Constraint check succeeded */
            return 0;
        }
    else
        {
            _ASN_CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)",
                td->name, __FILE__, __LINE__);
            return -1;
        }
}

static asn_per_constraints_t ASN_PER_TYPE_MODE_SPECIFIC_INFO_CONSTR_3 = {
    {APC_CONSTRAINED, 1, 1, 0, 1} /* (0..1) */,
    {APC_UNCONSTRAINED, -1, -1, 0, 0},
    0,
    0 /* No PER value map */
};
static asn_per_constraints_t ASN_PER_MEMB_CELL_IDENTITY_CONSTR_2 = {
    {APC_CONSTRAINED, 28, -1, 0, 268435455} /* (0..268435455) */,
    {APC_UNCONSTRAINED, -1, -1, 0, 0},
    0,
    0 /* No PER value map */
};
static asn_TYPE_member_t asn_MBR_fdd_4[] = {
    {ATF_NOFLAGS, 0, offsetof(struct fdd, primaryCPICH_Info),
        (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */
        &asn_DEF_PrimaryCPICH_Info,
        0, /* Defer constraints checking to the member type */
        0, /* No PER visible constraints */
        0, "primaryCPICH-Info"},
    {ATF_POINTER, 3, offsetof(struct fdd, cpich_Ec_N0),
        (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */
        &asn_DEF_CPICH_Ec_N0,
        0, /* Defer constraints checking to the member type */
        0, /* No PER visible constraints */
        0, "cpich-Ec-N0"},
    {ATF_POINTER, 2, offsetof(struct fdd, cpich_RSCP),
        (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */
        &asn_DEF_CPICH_RSCP, 0,                 /* Defer constraints checking to the member type */
        0,                                      /* No PER visible constraints */
        0, "cpich-RSCP"},
    {ATF_POINTER, 1, offsetof(struct fdd, pathloss),
        (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */
        &asn_DEF_Pathloss, 0,                   /* Defer constraints checking to the member type */
        0,                                      /* No PER visible constraints */
        0, "pathloss"},
};
static int asn_MAP_fdd_oms_4[] = {1, 2, 3};
static ber_tlv_tag_t asn_DEF_fdd_tags_4[] = {
    (ASN_TAG_CLASS_CONTEXT | (0 << 2)), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))};
static asn_TYPE_tag2member_t asn_MAP_fdd_tag2el_4[] = {
    {(ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0,
        0},                                        /* primaryCPICH-Info at 163 */
    {(ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0}, /* cpich-Ec-N0 at 164 */
    {(ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0}, /* cpich-RSCP at 165 */
    {(ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0}  /* pathloss at 166 */
};
static asn_SEQUENCE_specifics_t asn_SPC_fdd_specs_4 = {
    sizeof(struct fdd),
    offsetof(struct fdd, _asn_ctx),
    asn_MAP_fdd_tag2el_4,
    4,                 /* Count of tags in the map */
    asn_MAP_fdd_oms_4, /* Optional members */
    3,
    0,  /* Root/Additions */
    -1, /* Start extensions */
    -1  /* Stop extensions */
};
static /* Use -fall-defs-global to expose */
    asn_TYPE_descriptor_t asn_DEF_fdd_4 = {
        "fdd",
        "fdd",
        SEQUENCE_free,
        SEQUENCE_print,
        SEQUENCE_constraint,
        SEQUENCE_decode_ber,
        SEQUENCE_encode_der,
        SEQUENCE_decode_xer,
        SEQUENCE_encode_xer,
        SEQUENCE_decode_uper,
        SEQUENCE_encode_uper,
        0, /* Use generic outmost tag fetcher */
        asn_DEF_fdd_tags_4,
        sizeof(asn_DEF_fdd_tags_4) / sizeof(asn_DEF_fdd_tags_4[0]) - 1, /* 1 */
        asn_DEF_fdd_tags_4,                                             /* Same as above */
        sizeof(asn_DEF_fdd_tags_4) / sizeof(asn_DEF_fdd_tags_4[0]),     /* 2 */
        0,                                                              /* No PER visible constraints */
        asn_MBR_fdd_4,
        4,                   /* Elements count */
        &asn_SPC_fdd_specs_4 /* Additional specs */
};

static asn_TYPE_member_t asn_MBR_tdd_9[] = {
    {ATF_NOFLAGS, 0, offsetof(struct tdd, cellParametersID),
        (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */
        &asn_DEF_CellParametersID,
        0, /* Defer constraints checking to the member type */
        0, /* No PER visible constraints */
        0, "cellParametersID"},
    {ATF_POINTER, 4, offsetof(struct tdd, proposedTGSN),
        (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */
        &asn_DEF_TGSN, 0,                       /* Defer constraints checking to the member type */
        0,                                      /* No PER visible constraints */
        0, "proposedTGSN"},
    {ATF_POINTER, 3, offsetof(struct tdd, primaryCCPCH_RSCP),
        (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */
        &asn_DEF_PrimaryCCPCH_RSCP,
        0, /* Defer constraints checking to the member type */
        0, /* No PER visible constraints */
        0, "primaryCCPCH-RSCP"},
    {ATF_POINTER, 2, offsetof(struct tdd, pathloss),
        (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */
        &asn_DEF_Pathloss, 0,                   /* Defer constraints checking to the member type */
        0,                                      /* No PER visible constraints */
        0, "pathloss"},
    {ATF_POINTER, 1, offsetof(struct tdd, timeslotISCP_List),
        (ASN_TAG_CLASS_CONTEXT | (4 << 2)), -1, /* IMPLICIT tag at current level */
        &asn_DEF_TimeslotISCP_List,
        0, /* Defer constraints checking to the member type */
        0, /* No PER visible constraints */
        0, "timeslotISCP-List"},
};
static int asn_MAP_tdd_oms_9[] = {1, 2, 3, 4};
static ber_tlv_tag_t asn_DEF_tdd_tags_9[] = {
    (ASN_TAG_CLASS_CONTEXT | (1 << 2)), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))};
static asn_TYPE_tag2member_t asn_MAP_tdd_tag2el_9[] = {
    {(ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0}, /* cellParametersID at 168 */
    {(ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0}, /* proposedTGSN at 169 */
    {(ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0,
        0},                                        /* primaryCCPCH-RSCP at 170 */
    {(ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0}, /* pathloss at 171 */
    {(ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0}  /* timeslotISCP-List at 172 */
};
static asn_SEQUENCE_specifics_t asn_SPC_tdd_specs_9 = {
    sizeof(struct tdd),
    offsetof(struct tdd, _asn_ctx),
    asn_MAP_tdd_tag2el_9,
    5,                 /* Count of tags in the map */
    asn_MAP_tdd_oms_9, /* Optional members */
    4,
    0,  /* Root/Additions */
    -1, /* Start extensions */
    -1  /* Stop extensions */
};
static /* Use -fall-defs-global to expose */
    asn_TYPE_descriptor_t asn_DEF_tdd_9 = {
        "tdd",
        "tdd",
        SEQUENCE_free,
        SEQUENCE_print,
        SEQUENCE_constraint,
        SEQUENCE_decode_ber,
        SEQUENCE_encode_der,
        SEQUENCE_decode_xer,
        SEQUENCE_encode_xer,
        SEQUENCE_decode_uper,
        SEQUENCE_encode_uper,
        0, /* Use generic outmost tag fetcher */
        asn_DEF_tdd_tags_9,
        sizeof(asn_DEF_tdd_tags_9) / sizeof(asn_DEF_tdd_tags_9[0]) - 1, /* 1 */
        asn_DEF_tdd_tags_9,                                             /* Same as above */
        sizeof(asn_DEF_tdd_tags_9) / sizeof(asn_DEF_tdd_tags_9[0]),     /* 2 */
        0,                                                              /* No PER visible constraints */
        asn_MBR_tdd_9,
        5,                   /* Elements count */
        &asn_SPC_tdd_specs_9 /* Additional specs */
};

static asn_TYPE_member_t asn_MBR_modeSpecificInfo_3[] = {
    {ATF_NOFLAGS, 0, offsetof(struct modeSpecificInfo, choice.fdd),
        (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, &asn_DEF_fdd_4,
        0, /* Defer constraints checking to the member type */
        0, /* No PER visible constraints */
        0, "fdd"},
    {ATF_NOFLAGS, 0, offsetof(struct modeSpecificInfo, choice.tdd),
        (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, &asn_DEF_tdd_9,
        0, /* Defer constraints checking to the member type */
        0, /* No PER visible constraints */
        0, "tdd"},
};
static asn_TYPE_tag2member_t asn_MAP_modeSpecificInfo_tag2el_3[] = {
    {(ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0}, /* fdd at 163 */
    {(ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0}  /* tdd at 168 */
};
static asn_CHOICE_specifics_t asn_SPC_modeSpecificInfo_specs_3 = {
    sizeof(struct modeSpecificInfo),
    offsetof(struct modeSpecificInfo, _asn_ctx),
    offsetof(struct modeSpecificInfo, present),
    sizeof(((struct modeSpecificInfo *)0)->present),
    asn_MAP_modeSpecificInfo_tag2el_3,
    2, /* Count of tags in the map */
    0,
    -1 /* Extensions start */
};
static /* Use -fall-defs-global to expose */
    asn_TYPE_descriptor_t asn_DEF_modeSpecificInfo_3 = {
        "modeSpecificInfo",
        "modeSpecificInfo",
        CHOICE_free,
        CHOICE_print,
        CHOICE_constraint,
        CHOICE_decode_ber,
        CHOICE_encode_der,
        CHOICE_decode_xer,
        CHOICE_encode_xer,
        CHOICE_decode_uper,
        CHOICE_encode_uper,
        CHOICE_outmost_tag,
        0, /* No effective tags (pointer) */
        0, /* No effective tags (count) */
        0, /* No tags (pointer) */
        0, /* No tags (count) */
        &ASN_PER_TYPE_MODE_SPECIFIC_INFO_CONSTR_3,
        asn_MBR_modeSpecificInfo_3,
        2,                                /* Elements count */
        &asn_SPC_modeSpecificInfo_specs_3 /* Additional specs */
};

static asn_TYPE_member_t asn_MBR_CellMeasuredResults_1[] = {
    {ATF_POINTER, 1, offsetof(struct CellMeasuredResults, cellIdentity),
        (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */
        &asn_DEF_NativeInteger, memb_cellIdentity_constraint_1,
        &ASN_PER_MEMB_CELL_IDENTITY_CONSTR_2, 0, "cellIdentity"},
    {ATF_NOFLAGS, 0, offsetof(struct CellMeasuredResults, modeSpecificInfo),
        (ASN_TAG_CLASS_CONTEXT | (1 << 2)), +1, /* EXPLICIT tag at current level */
        &asn_DEF_modeSpecificInfo_3,
        0, /* Defer constraints checking to the member type */
        0, /* No PER visible constraints */
        0, "modeSpecificInfo"},
};
static int asn_MAP_CellMeasuredResults_oms_1[] = {0};
static ber_tlv_tag_t asn_DEF_CellMeasuredResults_tags_1[] = {
    (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))};
static asn_TYPE_tag2member_t asn_MAP_CellMeasuredResults_tag2el_1[] = {
    {(ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0}, /* cellIdentity at 160 */
    {(ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0}  /* modeSpecificInfo at 166 */
};
static asn_SEQUENCE_specifics_t asn_SPC_CellMeasuredResults_specs_1 = {
    sizeof(struct CellMeasuredResults),
    offsetof(struct CellMeasuredResults, _asn_ctx),
    asn_MAP_CellMeasuredResults_tag2el_1,
    2,                                 /* Count of tags in the map */
    asn_MAP_CellMeasuredResults_oms_1, /* Optional members */
    1,
    0,  /* Root/Additions */
    -1, /* Start extensions */
    -1  /* Stop extensions */
};
asn_TYPE_descriptor_t asn_DEF_CellMeasuredResults = {
    "CellMeasuredResults",
    "CellMeasuredResults",
    SEQUENCE_free,
    SEQUENCE_print,
    SEQUENCE_constraint,
    SEQUENCE_decode_ber,
    SEQUENCE_encode_der,
    SEQUENCE_decode_xer,
    SEQUENCE_encode_xer,
    SEQUENCE_decode_uper,
    SEQUENCE_encode_uper,
    0, /* Use generic outmost tag fetcher */
    asn_DEF_CellMeasuredResults_tags_1,
    sizeof(asn_DEF_CellMeasuredResults_tags_1) /
        sizeof(asn_DEF_CellMeasuredResults_tags_1[0]), /* 1 */
    asn_DEF_CellMeasuredResults_tags_1,                /* Same as above */
    sizeof(asn_DEF_CellMeasuredResults_tags_1) /
        sizeof(asn_DEF_CellMeasuredResults_tags_1[0]), /* 1 */
    0,                                                 /* No PER visible constraints */
    asn_MBR_CellMeasuredResults_1,
    2,                                   /* Elements count */
    &asn_SPC_CellMeasuredResults_specs_1 /* Additional specs */
};
