Synchronous Channel /Most - bytelist and portlist empty

Hi!

Now I get the channellist without a problem.
But when I look at the byte- and portlist,
e.g. with

bytelist = cfg->srcdata_.Byte;
portlist = cfg->srcdata.Port_SF;

the byte- and portlist-elements all have value 0.

The following example is the receiver program. Is it necessary to have
the same most_connection_type to build ctrl and sync connection? Or is
the sequence of commands not correct?

struct pulse pulse;
struct sigevent event;
most_stream_config_t *cfg=(most_stream_config_t *) malloc(3000);
most_connection_t *most_sync_connector=(most_connection_t *) malloc
(MAX_SIZE);
most_connection_t *most_ctrl_connector=(most_connection_t ) malloc
(MAX_SIZE);
uint8_t portlist[4];
uint8_t bytelist[4];
uint8_t chlist[4];
uint8_t answer1=0, answer2=0;

chid = ChannelCreate( 0 );

coid = ConnectAttach( 0 , 0, chid, _NTO_SIDE_CHANNEL, 0 );

fptr = creat( FILE_NAME, S_IWUSR );

most_connect(MOST_SYNC_CONNECTION, 0, &most_sync_connector);

most_sync_allocate( most_sync_connector, 4, chlist, &answer1,
answer2);
most_connect(MOST_CTRL_CONNECTION, 0, &most_ctrl_connector);

SIGEV_PULSE_INIT ( &event, coid,
SIGEV_PULSE_PRIO_INHERIT,MY_PULSECODE_SYNC, 0);

memset(cfg, 0, sizeof(cfg));
cfg->sync_direction = SYNC_RX;
cfg->segs = 2;
cfg->seg_size = 1024;
cfg->channels = 4;
cfg->event = event;

for(i=0 ; i<4; i++) {
portlist = cfg->srcdata.Port_SF;
#ifdef AUDIO_DATA_IS_LITTLE_ENDIAN
bytelist = cfg->srcdata[(i%2) ? i-1 : i+1].Byte;
#else
bytelist = cfg->srcdata.Byte;
#endif
}

most_stream_alloc(most_sync_connector, cfg);

most_sync_out_connect(most_ctrl_connector, 4, chlist, portlist,
bytelist);

scanf(z);

most_stream_start(most_sync_connector, cfg);
buf_size=cfg->seg_size;

for(i=0; i<100; i++)
{
/
wait for the data /
if (MsgReceivePulse(chid, &pulse, sizeof(pulse), NULL) != -1)

/
read the data from a file */
{
write(fptr, cfg->virt_addr + (pulse.value.sival_int *
buf_size), buf_size);
}

most_stream_stop(most_sync_connector, cfg);
most_stream_free(most_sync_connector, cfg);
close( fptr );

Thanx!

Got it!

Something wrong with the channels.

Thanx!