Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1017039
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:38:30+00:00 2026-05-16T10:38:30+00:00

I’m having an incomprehensible problem in Scicoslab in the last few days. I’ve been

  • 0

I’m having an incomprehensible problem in Scicoslab in the last few days.
I’ve been writing some communication blocks (to send data to an external application) for scicos in C and then wrap them with it’s own code. The problem is that, even if the code is working (I’ve checked every output possible), scicos gives me this error message: sicosim: error. Type 0 not yet supported by outtb. Error Screenshot

Here is the code for the c function of the Sensor Dispatcher Block:

    int bro_sens_send (scicos_block *block)
{
    int rc, i;
    bro_fist_t packet[BUFFER_SIZE];

    for (i = 1; i < block->nin; i++) {
        bro_encode_sci_datablock(&packet[i-1], block->inptr[i]);
    };

    printf ("Data for first block: %i, %i, %.2f\n", packet[0].port, packet[0].operation, packet[0].data);

    rc = send(block->inptr[0][0], packet, sizeof(bro_fist_t) * BUFFER_SIZE, 0);

    if (rc < 0)
    {
        perror("send() failed");
        return -1;
    }

    printf("%d bytes of data were sent\n", rc);
    return 0;
}

int bro_sens_read (scicos_block *block)
{
    int rc, i;
    bro_fist_t packet[BUFFER_SIZE];

    rc = recv(block->inptr[0][0], packet, sizeof(bro_fist_t) * BUFFER_SIZE, 0);
    printf("%d bytes of data were received\n", rc);
    if (rc < 0)
    {
        perror("recv() failed");
        return -1;
    }

    printf("Starting to set outputs :3 [%i]\n", block->nout);

    for (i = 0; i < block->nout; i++) {
        printf("Next Step defining outputs :D [%i]\n", i);
        bro_decode_sci_datablock(&packet[i], &block->outptr[i][0]);
        printf("Output value for port %i is: %.2f[%i]\n", i, block->outptr[i][0], block->outsz[(2*block->nout)+i]);

    }

    return 0;
}

void bro_comm_sens_disp (scicos_block *block, int flag)
{
    switch (flag) {
        case 1: /* set output */
            bro_sens_send(block);
            bro_sens_read(block);
            break;
        case 2: /* get input */
            break;
        case 4: /* initialisation */
            break;
        case 5: /* ending */
            break;
        default:
            break;
    }
}

And this is the code for the block definition (In scilab code):

function [x,y,typ] = SENS_Disp(job,arg1,arg2)
    x=[];y=[];typ=[];
    select job
    case 'plot' then
        exprs=arg1.graphics.exprs;

        standard_draw(arg1)
    case 'getinputs' then
        [x,y,typ]=standard_inputs(arg1)
    case 'getoutputs' then
        [x,y,typ]=standard_outputs(arg1)
    case 'getorigin' then
        [x,y]=standard_origin(arg1)
    case 'set' then
        x=arg1
        model=arg1.model;graphics=arg1.graphics;
        exprs=graphics.exprs;
    case 'define' then
        model       = scicos_model()
        model.sim   = list('bro_comm_sens_disp',4)
        model.out   = [1;1;1;1;1;1;1]
        model.out2  = [1;1;1;1;1;1;1]
        model.outtyp= [1;1;1;1;1;1;1]
        model.in    = [1;3;3;3;3;3;3;3]
        model.in2   = [1;1;1;1;1;1;1;1]
        model.intyp = [3;1;1;1;1;1;1;1]
        model.evtin = []
        model.rpar  = []
        model.ipar  = []
        model.dstate=[1];
        model.blocktype='c'
        model.dep_ut=[%t %f]
        exprs=[]
        gr_i=['xstringb(orig(1),orig(2),[''Sensors'';+''Dispatcher''],sz(1),sz(2),''fill'');']
        x=standard_define([3 2],model,exprs,gr_i)
    end
endfunction

The first inpput port for the block is the socket descriptor for communications while the other seven are connected to setup blocks. The outputs returns the data received from the external application.
I’ve tried to navigate through Scilab code and I’ve understood that the error I’m getting tells me that the type of data has been set wrongly, but I’ve checked and it’s not quite the case.
Here is the code of Scicoslab that outputs the error:

/*set vectors of outtb*/
                for (j=0; j<nlnk; j++) { /*for each link*/
                        subheader=(int *)(listentry(il_state_outtb,j+1)); /*get header of outtbl(j+1)*/
                        outtbsz[j]=subheader[1]; /*store dimensions*/
                        outtbsz[j+nlnk]=subheader[2];

                        switch (subheader[0]) { /*store type and address*/
                                /*matrix of double*/
                        case 1  :
                                switch (subheader[3]) {
                                case 0  :
                                        outtbtyp[j]=SCSREAL_N;  /*double real matrix*/
                                        outtbptr[j]=(SCSREAL_COP *)(subheader+4);
                                        break;

                                case 1  :
                                        outtbtyp[j]=SCSCOMPLEX_N;  /*double complex matrix*/
                                        outtbptr[j]=(SCSCOMPLEX_COP *)(subheader+4);
                                        break;

                                default :
                                        Scierror(888,\
                                                 "%s : error. Type %d of double scalar matrix not yet supported "
                                                 "for outtb.\n",\
                                                 fname,subheader[3]);
                                        FREE(outtbptr);
                                        FREE(outtbtyp);
                                        FREE(outtbsz);
                                        FREE(opar);
                                        FREE(oparsz);
                                        FREE(opartyp);
                                        FREE(oz);
                                        FREE(ozsz);
                                        FREE(oztyp);
                                        FREE(lfunpt);
                                        freeparam;
                                        FREE(outtb_elem);
                                        break;
                                }
                                break;

                                /*matrix of integers*/
                        case 8  :
                                switch (subheader[3]) {
                                case 1  :
                                        outtbtyp[j]=SCSINT8_N;  /*int8*/
                                        outtbptr[j]=(SCSINT8_COP *)(subheader+4);
                                        break;

                                case 2  :
                                        outtbtyp[j]=SCSINT16_N;  /*int16*/
                                        outtbptr[j]=(SCSINT16_COP *)(subheader+4);
                                        break;

                                case 4  :
                                        outtbtyp[j]=SCSINT32_N;  /*int32*/
                                        outtbptr[j]=(SCSINT32_COP *)(subheader+4);
                                        break;

                                case 11 :
                                        outtbtyp[j]=SCSUINT8_N; /*uint8*/
                                        outtbptr[j]=(SCSUINT8_COP *)(subheader+4);
                                        break;

                                case 12 :
                                        outtbtyp[j]=SCSUINT16_N; /*uint16*/
                                        outtbptr[j]=(SCSUINT16_COP *)(subheader+4);
                                        break;

                                case 14 :
                                        outtbtyp[j]=SCSUINT32_N; /*uint32*/
                                        outtbptr[j]=(SCSUINT32_COP *)(subheader+4);
                                        break;

                                default :
                                        Scierror(888,\
                                                 "%s : error. Type %d of integer scalar matrix not yet supported "
                                                 "for outtb.\n",\
                                                 fname,subheader[3]);
                                        FREE(outtbptr);
                                        FREE(outtbtyp);
                                        FREE(outtbsz);
                                        FREE(opar);
                                        FREE(oparsz);
                                        FREE(opartyp);
                                        FREE(oz);
                                        FREE(ozsz);
                                        FREE(oztyp);
                                        FREE(lfunpt);
                                        freeparam;
                                        FREE(outtb_elem);
                                        break;
                                }
                                break;

                        default :
                                Scierror(888,"%s : error. Type %d not yet supported for outtb.\n",fname,subheader[0]);
                                FREE(outtbptr);
                                FREE(outtbtyp);
                                FREE(outtbsz);
                                FREE(opar);
                                FREE(oparsz);
                                FREE(opartyp);
                                FREE(oz);
                                FREE(ozsz);
                                FREE(oztyp);
                                FREE(lfunpt);
                                freeparam;
                                FREE(outtb_elem);
                                return 0;
                                break;
                        }
  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T10:38:30+00:00Added an answer on May 16, 2026 at 10:38 am

    Ok. After a lot of time I’ve solved the problem. There was a function that was setting a value in a wrong memory space. The problem was that there weren’t any error messages nor warnings.
    The problem was in a function that did this:

    block->outptr[0][3] = 0;
    

    In a block that had only 3 output ports. This wrote the wrong data inside the data registry. After I removed it everything works fine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have been unable to fix a problem with Java Unicode and encoding. The
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I've tracked down a weird MySQL problem to the two different ways I was
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I want to construct a data frame in an Rcpp function, but when I
I'm having trouble keeping the paragraph square between the quote marks. In firefox the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.