Search in sources :

Example 1 with AsnClassNumber

use of org.openmuc.jasn1.compiler.model.AsnClassNumber in project jasn1 by openmuc.

the class BerClassWriter method addAutomaticTagsIfNeeded.

private void addAutomaticTagsIfNeeded(List<AsnElementType> componentTypes) throws IOException {
    if (tagDefault != TagDefault.AUTOMATIC) {
        return;
    }
    for (AsnElementType element : componentTypes) {
        if (getTag(element) != null) {
            return;
        }
    }
    int i = 0;
    for (AsnElementType element : componentTypes) {
        element.tag = new AsnTag();
        element.tag.classNumber = new AsnClassNumber();
        element.tag.classNumber.num = i;
        i++;
    }
}
Also used : AsnClassNumber(org.openmuc.jasn1.compiler.model.AsnClassNumber) AsnElementType(org.openmuc.jasn1.compiler.model.AsnElementType) AsnTag(org.openmuc.jasn1.compiler.model.AsnTag)

Aggregations

AsnClassNumber (org.openmuc.jasn1.compiler.model.AsnClassNumber)1 AsnElementType (org.openmuc.jasn1.compiler.model.AsnElementType)1 AsnTag (org.openmuc.jasn1.compiler.model.AsnTag)1