Andrey Gursky wrote:
> Hi Eric!
> 
> Regarding your (old) posting with mig and C interface.
> I've did at last a successfully test of the using TOSSIM-SF and
> write_sf_packet()-function (from sdk/c/sf) from the same simulation
> driver program.
> 
> To properly write values one needs to define some nx_* variables to get
> the offset (7 byte) where the serial header in a packet is placed. It
> could be done also, I suppose, with only one array with 7 elements.
> 
> So the TestMig.h looks like:
> 
> #ifndef TEST_MIG_H
> #define TEST_MIG_H
> 
> typedef nx_struct test_mig_msg {
>   nx_uint32_t dummyHeader1;
>   nx_uint16_t dummyHeader2;
>   nx_uint8_t dummyHeader3;
>   nx_uint16_t counterIn;
>   nx_uint32_t counterOut;
> } test_mig_msg_t;
> 
> enum {
>   AM_TEST_MIG_MSG = 9,
> };
> #endif
> 

It was a bad idea. On the PC side it works of course, but not on the
mote's side. So I must add in TestMigMsg.c:
#define OFFSET 56
and alter all set/get-functions by hand considering this OFFSET.

Maybe I try to look into the mig code, that generates these .c/.h.

Andrey


> then e.g.
>      TestMig_counterIn_set(msg, counterIn);
> 
> 
> It seems, mig for the C interface is not yet complete. Are there any
> plans to complete it? Maybe any alternative implementation?
> 
> Andrey
> 
> 
> P.S. Of course it is good, it works with only this small addition :)
> 
> 
> 
> 
> Andrey Gursky wrote:
>> Hi all!
>>
>> Ok, I've found in support/sdk/c/sf/ the program prettylisten.c. It could
>> be, what I'm looking for, to send/receive packets through (simulated)
>> serial interface out of the simulation program using TOSSIM.
>>
>> Would you suggest to use the C sf? The C++ sf claims there were issues
>> with packet loss in the original implementation. Does it still applies?
>>
>> In the C++ sf readme it is claimed also that the same functionality is
>> covered (with some improvements) but I couldn't find these functions:
>> read_sf_packet(), write_sf_packet()
>> Could any of the maintainers point me to the appropriate functions in
>> C++ sf or the best way/place to implement them?
>>
>> Eric, you tried to work with mig using C:
>> https://www.millennium.berkeley.edu/pipermail/tinyos-help/2008-March/032102.html
>> Have you got this work?
>>
>> I'm going to switch from Java to C/C++ and I'm wondering whether it is
>> working out-of-the-box or not yet.
>>
>> Thanks,
>> Andrey
>>
>>
>> Andrey Gursky wrote:
>>> Hi!
>>>
>>> I'm looking now for the implementation of java classes such as 
>>> PhoenixSource, MoteIF in C/C++. With another words is there any project 
>>> (may be some external) that gives a simple way to communicate with motes 
>>> (real or simulated) from C/C++ program? The support of java and python 
>>> is very well, of course. But for C/C++ (with exception of serial 
>>> forwarder) this all seems to be missing. Hope, someone could point me to 
>>> the solution, or the only way is to reprogram the presented sf?
>>>
>>> Thanks,
>>> Andrey
>>> _______________________________________________
>>> Tinyos-help mailing list
>>> [email protected]
>>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>>
>>>
>> _______________________________________________
>> Tinyos-help mailing list
>> [email protected]
>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>
>>
> 
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> 
> 

_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to