Exemplo n.º 1
0
size_t
Msgtest_get_size(ast_runtime* rt, Msgtest* msgtest_v)
{
    size_t totalsize = 0;
    size_t fieldsize = 0;

    {
        fieldsize += Submsg_get_size(rt,msgtest_v->rmsg);
        fieldsize += ast_get_tagsize(rt,ast_counted,1);
        fieldsize += ast_get_size(rt,ast_uint32,&fieldsize);
        totalsize += fieldsize;
    }
    {
        if(msgtest_v->omsg.defined) {
            fieldsize += Submsg_get_size(rt,msgtest_v->omsg.value);
            fieldsize += ast_get_size(rt,ast_uint32,&fieldsize);
            fieldsize += ast_get_tagsize(rt,ast_counted,2);
        }
        totalsize += fieldsize;
    }
    {
        int i;
        for(i=0;i<msgtest_v->pmsg.count;i++) {
            fieldsize += Submsg_get_size(rt,msgtest_v->pmsg.values[i]);
            fieldsize += ast_get_size(rt,ast_uint32,&fieldsize);
            fieldsize += ast_get_tagsize(rt,ast_counted,3);
        }
        totalsize += fieldsize;
    }
    return totalsize;

} /*Msgtest_get_size*/
Exemplo n.º 2
0
size_t
BytesRepeated_get_size(ast_runtime* rt, BytesRepeated* bytesrepeated_v)
{
    size_t totalsize = 0;
    size_t fieldsize = 0;

    {
        int i;
        for(i=0;i<bytesrepeated_v->f_string.count;i++) {
            fieldsize += ast_get_tagsize(rt,ast_counted,1);
            fieldsize += ast_get_size(rt,ast_string,&bytesrepeated_v->f_string.values[i]);
        }
        totalsize += fieldsize;
    }
    {
        int i;
        for(i=0;i<bytesrepeated_v->f_bytes.count;i++) {
            fieldsize += ast_get_tagsize(rt,ast_counted,2);
            fieldsize += ast_get_size(rt,ast_bytes,&bytesrepeated_v->f_bytes.values[i]);
        }
        totalsize += fieldsize;
    }
    return totalsize;

} /*BytesRepeated_get_size*/
Exemplo n.º 3
0
size_t
BytesRequired_get_size(ast_runtime* rt, BytesRequired* bytesrequired_v)
{
    size_t totalsize = 0;
    size_t fieldsize = 0;

    {
        fieldsize += ast_get_tagsize(rt,ast_counted,1);
        fieldsize += ast_get_size(rt,ast_string,&bytesrequired_v->f_string);
        totalsize += fieldsize;
    }
    {
        fieldsize += ast_get_tagsize(rt,ast_counted,2);
        fieldsize += ast_get_size(rt,ast_bytes,&bytesrequired_v->f_bytes);
        totalsize += fieldsize;
    }
    return totalsize;

} /*BytesRequired_get_size*/
Exemplo n.º 4
0
size_t
Submsg_get_size(ast_runtime* rt, Submsg* submsg_v)
{
    size_t totalsize = 0;
    size_t fieldsize = 0;

    {
        fieldsize += ast_get_tagsize(rt,ast_counted,1);
        fieldsize += ast_get_size(rt,ast_int32,&submsg_v->f_int32);
        totalsize += fieldsize;
    }
    return totalsize;

} /*Submsg_get_size*/
Exemplo n.º 5
0
size_t
BytesOptional_get_size(ast_runtime* rt, BytesOptional* bytesoptional_v)
{
    size_t totalsize = 0;
    size_t fieldsize = 0;

    {
        if(bytesoptional_v->f_string.defined) {
            fieldsize += ast_get_tagsize(rt,ast_counted,1);
            fieldsize += ast_get_size(rt,ast_string,&bytesoptional_v->f_string.value);
        }
        totalsize += fieldsize;
    }
    {
        if(bytesoptional_v->f_bytes.defined) {
            fieldsize += ast_get_tagsize(rt,ast_counted,2);
            fieldsize += ast_get_size(rt,ast_bytes,&bytesoptional_v->f_bytes.value);
        }
        totalsize += fieldsize;
    }
    return totalsize;

} /*BytesOptional_get_size*/