Vareka, Bill wrote: > I'm new to RTnet (using LXRT exclusively for now) and trying to figure out > the new TDMA v2 structure. Within each cycle, each participant must be > assigned at least one slot and slot 0 is the default RT slot and slot 1 (if > present) is the default NRT slot. The readme file (tdma.spec) states that > "a user or service ... explicitly provides the desired slot ID". How? I've > looked through the code and can't find how this is done. Then, the example > in the readme file shows slave A using slot 0 (RT/NRT) and slot 2 (RT), > slave B uses slot 0 (RT) and slot 1 (NRT). This agrees with the statement > that slot 1 is NRT if present otherwise slot 0 is both RT and NRT. But then > slave C is defined as useing slot 0 (RT/NRT), slot 2 (NRT) and slot 3 (RT). > For slot 2 to be a NRT slot, there must be some mechanism to link it to the > RTmac outside of the conf file. How is this done? Sorry if these seem like > dumb questions but all I really need is a pointer to the right place in the > code or a quick overview. Unfortunately, all of the examples define how you > 'use' RTnet and none help explain the options you have for setting it up. > Of course, that's hard to do given that everyone's network is different. >
Yea, the old problem: development was faster than documentation. The information you are looking for is hidden inside the socket priority field. Use ioctl_rt(socket, RTNET_RTIOC_PRIORITY, &prio); to set this value for an open socket. The lower 16 bits still encode the transmission priority while the upper 16 bit describe the "channel", i.e. the slot number (0..n) in case of RTmac+TDMA. I just noticed that the user API (rtnet.h) is unfortunately lacking some macro to build a socket priority value from both parameter, will fix this before the next release. For system services like RTcfg or ICMP, you will find defines for the socket prio value to be used in the RTnet source code. These services use fixed values, no runtime reconfiguration available yet (would be straightforward to implement, though). Jan ------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click _______________________________________________ RTnet-users mailing list RTnet-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rtnet-users